Author Archives: Huang Shiyang

Gravatar

http://en.gravatar.com/site/implement/   Base Request Gravatar images may be requested just like a normal image, using an IMG tag. To get an image specific to a user, you must first calculate their email hash. The most basic image request URL... Read More | Share it now!

php, html, javascript, mysql 之间的特殊字符处理

特殊字符指在程序中有具有特殊的控制意义的字符,一般来讲各个程序语言所使用 的特殊字符大部分都来源于传统的 C... Read More | Share it now!

PHP时间比较和时间差如何计算

<?php $zero1=date(“y-m-d h:i:s”); $zero2=”2010-11-29 21:07:00′; echo “zero1的时间为:”.$zero1.”<br>”; echo “zero2的时间为:”.$zero2.”<br>”; if(strtotime($zero1)<strtotime($zero2)){ echo... Read More | Share it now!

vi 常用命令行

删除m-n行: m,nd 删除所有: ctrl+G到行尾, :1,.d 删除所有   1. vim #在命令行中输入vim,进入vim编辑器 2. i #按一下i键,下端显示... Read More | Share it now!

Protected: sercle ballista

There is no excerpt because this is a protected post.

Fixing npm permissions

https://docs.npmjs.com/getting-started/fixing-npm-permissions   You may receive an EACCES error when you try to install a package globally. This indicates that you do not have permission to write to the directories that npm uses to store global... Read More | Share it now!

remove sudo install npm

/usr/local/lib/node_modules/ npm uninstall xxxx http://stackoverflow.com/questions/11177954/how-do-i-completely-uninstall-node-js-and-reinstall-from-beginning-mac-os-x   Apparently, there was a “/Users/myusername/local” folder that... Read More | Share it now!

Grunt wiredep:app no such file or directory bower.json

http://stackoverflow.com/questions/25709324/grunt-wiredepapp-no-such-file-or-directory-bower-json   Running “wiredep:app” (wiredep) task Warning: ENOENT, no such file or directory... Read More | Share it now!

npm-g_nosudo do npm without sudo

npm-g_nosudo https://github.com/glenpike/npm-g_nosudo sh: http://download.huangshiyang.com/shell/npm-g-nosudo.sh A shell script which will fix the problem where you want to stop using sudo for npm -g on Ubuntu. Inspired by a day trying to sort various... Read More | Share it now!