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 <[email protected]> | |
# | |
# | |
# General | |
# |
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
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
# brew install bash-git-prompt | |
# this is a bash plugin hosted at https://github.com/magicmonty/bash-git-prompt | |
if [ -f "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" ]; then | |
GIT_PROMPT_THEME=Default | |
source "$(brew --prefix bash-git-prompt)/share/gitprompt.sh" | |
fi | |
export PATH=/usr/local/bin:$PATH |
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
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
[ | |
{ "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
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
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
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
{ | |
"env": { | |
"es6": true, | |
"node": true | |
}, | |
"parserOptions": { | |
"ecmaFeatures": { | |
"experimentalObjectRestSpread": true | |
} | |
}, |
OlderNewer