Skip to content

Instantly share code, notes, and snippets.

View elrrrrrrr's full-sized avatar
🐼
Hope it was happy

elrrrrrrr elrrrrrrr

🐼
Hope it was happy
  • alipay.com
  • Shanghai
View GitHub Profile
@elrrrrrrr
elrrrrrrr / docker.sh
Last active June 20, 2019 07:43
ecs docker install
curl -fsSL get.docker.com -o get-docker.sh
sh get-docker.sh
$.fn.bindUp = function(type, fn) {
type = type.split(/\s+/);
this.each(function() {
var len = type.length;
while( len-- ) {
$(this).bind(type[len], fn);
var evt = $.data(this, 'events')[type[len]];
@elrrrrrrr
elrrrrrrr / 0shell
Last active November 16, 2016 08:30
ubuntu add a user as sudo .
```
放一点命令行操作备忘
```
@elrrrrrrr
elrrrrrrr / fuck-gbk.sh
Last active November 16, 2016 08:19
shell ...
## curl http://invisible-island.net/luit/luit.html#download
## ./configure && ./make && ./make install
luit -encoding gbk ssh xxx
@elrrrrrrr
elrrrrrrr / Q_ss
Created January 3, 2016 08:53
vim 插入模式快捷键
*Q_ss* 插入模式特殊键
|i_CTRL-V| CTRL-V {char}.. 按本义插入字符,或插入十进制数的字节值
|i_<NL>| <NL> 或 <CR> 或 CTRL-M 或 CTRL-J
开始新行
|i_CTRL-E| CTRL-E 插入光标下方的字符
|i_CTRL-Y| CTRL-Y 插入光标上方的字符
|i_CTRL-A| CTRL-A 插入上次插入的文本
|i_CTRL-@| CTRL-@ 插入上次插入的文本并结束
@elrrrrrrr
elrrrrrrr / promise-wait.js
Created November 10, 2015 10:00
promise wait
function wait(ms) {
return new Promise(resolve => setTimeout(resolve, ms || 1))
}
@elrrrrrrr
elrrrrrrr / promise-test.js
Last active July 10, 2017 15:05
es6 promise retry
'use strict';
// 重试间隔
var INTERVAL = 1000;
// mock ajax data 只作演示
var success = false;
/**
* keepTry
@elrrrrrrr
elrrrrrrr / tmux-cheatsheet.markdown
Created November 3, 2015 09:57 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@elrrrrrrr
elrrrrrrr / ie
Created July 13, 2015 09:02
css hack for IE
#hack {
color:red; /* All browsers */
color:red !important;/* All browsers but IE6 */
_color:red; /* Only works in IE6 */
*color:red; /* IE6, IE7 */
+color:red;/* Only works in IE7*/
*+color:red; /* Only works in IE7 */
color:red\9; /* IE6, IE7, IE8, IE9 */
color:red\0; /* IE8, IE9 */
color:red\9\0;/*Only works in IE9*/
@elrrrrrrr
elrrrrrrr / es6
Created May 1, 2015 15:05
JS es6 default param
function complex({ name, email, phone = null }) {
//variables `name`, `email`, and `phone` are available here
}
var user = {
name: 'foo',
email: 'bar',
phone: '123456'
};