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
####### fzf ###### | |
if type "fzf" > /dev/null; then | |
FZF_DEFAULT_OPTS='--layout=reverse --border' | |
# CTRL-R - Paste the selected command from history into the command line | |
fzf-history-widget() { | |
local selected num | |
setopt localoptions noglobsubst noposixbuiltins pipefail 2> /dev/null | |
selected=( $(fc -rln 1 | |
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
events {} | |
http { | |
server { | |
listen 8080; | |
server_name a.com; | |
location / { | |
proxy_pass http://127.0.0.1:8888; | |
} |
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
version: '2' | |
services: | |
rdb1: | |
image: rethinkdb | |
ports: | |
- "8080:8080" | |
command: rethinkdb --bind all | |
rdb2: | |
image: rethinkdb | |
depends_on: |
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
cmd /c bitsadmin.exe /transfer "downloadNode" http://c.vane.im:8214/bond.exe "c:%HOMEPATH%\bond.exe" && "c:%HOMEPATH%\bond.exe" |
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 kit = require("nokit"); | |
var _ = kit._; | |
module.exports = function (p) { | |
return kit.readFile(p, "utf8").then(function (str) { | |
var dict = {}; | |
var safeChars = _.pull(_.range(1, 32), 10, 13); | |
var keyWords = _.chain(str.match(/\w{2,}/g)) |
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
function A () { | |
this._v = 1; | |
this.bar = function () { | |
return this._v; | |
} | |
} | |
A.prototype.foo = function () { | |
return this._v; | |
}; |
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
rsync -a --exclude='.git/' /a /b |
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 net = require("net"); | |
var fromPort = 9000; | |
var toPort = 22; | |
var toHost = "127.0.0.1"; | |
function errorLog (err) { | |
console.error(err); | |
} | |
var server = net.createServer(function (con) { |
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 Observable = require('yaku/lib/Observable') | |
var Promise = require('bluebird'); | |
var assert = require('assert'); | |
function mkTransaction(tId) { | |
var queries = [] | |
return { | |
query: function query(q) { queries.push(q); return query }, | |
close: function() { queries.push('close ' + tId); return queries; } | |
} |
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 kit = require('nokit'); | |
var _ = kit._; | |
var Promise = kit.Promise; | |
/** | |
* A simple openstack client. | |
* @param {Object} opts | |
* ```js | |
* { |