This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["ctrl+shift+v"], "command": "paste" }, | |
{ "keys": ["ctrl+v"], "command": "paste_and_indent" }, | |
{ "keys": ["ctrl+t"], "command": "rebuild_tags"}, | |
{ "keys": ["ctrl+i"], "command": "hide_overlay"}, | |
//让sidebar和group的操作更符合vim的快捷键,这算是下策了 | |
{ "keys": ["ctrl+h"], "command": "focus_side_bar"}, | |
{ "keys": ["ctrl+l"], "command": "focus_group", "args": { "group": 0 } }, | |
{ "keys": ["ctrl+l", "ctrl+l"], "command": "focus_group", "args": { "group": 1 } }, | |
//Simple Rails Navigator的快捷键 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /etc/nginx/nginx.conf | |
# config: /etc/sysconfig/nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GitHubApi = require('github'); | |
var github = new GitHubApi({ | |
version: '3.0.0', | |
debug: false, | |
protocol: 'https', | |
host: 'api.github.com', // should be api.github.com for GitHub | |
timeout: 5000, | |
headers: { | |
'user-agent': 'MrHuxu-GitHub-APP' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const BitMap = function () { | |
this.data = []; | |
}; | |
BitMap.prototype.getIdx = num => parseInt(num / 32); | |
BitMap.prototype.getPos = num => num % 32; | |
BitMap.prototype.add = function (num) { | |
const index = this.getIdx(num); | |
const pos = this.getPos(num); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const PriorityQueue = function () { | |
this.data = []; | |
}; | |
PriorityQueue.prototype.isEmpty = function() { | |
return 0 === this.data.length; | |
}; | |
PriorityQueue.prototype.less = function(i, j) { | |
return this.data[i] < this.data[j]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
var colors = map[string]string{ | |
"black": "0;30", | |
"red": "0;31", | |
"green": "0;32", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# expose the 22 port for ssh login | |
iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT | |
# launch ss server and export port | |
ssserver -d start -c /etc/shadowsocks.json | |
iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 8398 -j ACCEPT | |
# launch nginx | |
sudo nginx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set Path /usr/local/bin $PATH | |
nvm use --delete-prefix v8.6.0 > /usr/local/etc/dev | |
rvm use 2.3.4 > /usr/local/etc/dev | |
gvm use go1.9.1 > /usr/local/etc/dev | |
set -x PATH $PATH $GOPATH/bin | |
set GOPATH $GOPATH:/Users/xhu/workspace/ui/ui-common/src/go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Sets Prezto options. | |
# | |
# Authors: | |
# Sorin Ionescu <sorin.ionescu@gmail.com> | |
# | |
# | |
# General | |
# |
OlderNewer