Skip to content

Instantly share code, notes, and snippets.

View slow-is-fast's full-sized avatar

slow-is-fast slow-is-fast

View GitHub Profile
@slow-is-fast
slow-is-fast / 佛祖保佑,哈哈
Created June 6, 2016 05:50 — forked from tailnode/佛祖保佑,哈哈
佛祖保佑,永不宕机,永无bug
//
// _oo8oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/'==='\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||_ \
@slow-is-fast
slow-is-fast / gist:f30fb903af6ad3ac9f4cdfc2b532a7bc
Created June 6, 2016 06:36
Mac phpstorm select word shortcut
Preferences -> KeyMap -> search "Extend Selection"
Alt+up,
since my hhkb,I switch to Ctrl+D .
Just add a new Keyboard Shortcuts.
$str = <<<EOD
Example of string
spanning multiple lines
using heredoc syntax.
EOD;
作者:一绊
链接:https://www.zhihu.com/question/20117388/answer/62263969
来源:知乎
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
问题:
服务器是ubuntu,用Mac的iterm2 ssh连上去,终端显示中文乱码,也不能输入中文,然而本地终端可以显示和输入。
解决方法:
这种情况一般是终端和服务器的字符集不匹配,MacOSX下默认的是utf8字符集。
输入locale可以查看字符编码设置情况,而我的对应值是空的。
@slow-is-fast
slow-is-fast / gist:e232e906bdeab8cf8dc17e7d7c6637a2
Created June 13, 2016 05:41
ubuntu install php 7.0 by apt-get
To use apt-add-repository cmd, you should ensure software-property-common package installed.
>> sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php-7.0
sudo apt-get update
sudo apt-get purge php5-fpm
sudo apt-get install php7.0-cli php7.0-common libapache2-mod-php7.0 php7.0 php7.0-mysql php7.0-fpm php7.0-curl php7.0-gd php7.0-mysql php7.0-bz2
composer config -g repo.packagist composer https://packagist.phpcomposer.com
//在项目内使用
composer config repo.packagist composer https://packagist.phpcomposer.com
:put =range(11,15)
:for i in range(1,10) | put ='192.168.0.'.i | endfor
http://vim.wikia.com/wiki/Making_a_list_of_numbers
@slow-is-fast
slow-is-fast / gist:171a2e085259e5b87c26b70dd2308c01
Created June 23, 2016 09:42
laravel login with username instead of email
在auth\AuthController.php里新增一个属性
protected $username = 'username';
svn propset svn:ignore cache .
svn客户端 authorization failed
近来在ubuntu上安装svn时发生了个错误,在客户端check时总是提示authorization failed
后来终于找到了解决的方法:
我把我的想关联的文件列出来:
svnserve.conf:
[general]
anon-access = none
auth-access = write,read
password-db = passwd