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
four spaces | |
two spaces and a tab | |
four spaces |
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
tab | |
space | |
tab |
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
space | |
tab | |
space |
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
# ==== Required configuration settings for Huginn ==== | |
# Replace the following with the output from "rake secret" | |
# (unnecessary, since we'll be using the OpenShift-provided secret) | |
# APP_SECRET_TOKEN=REPLACE_ME_NOW! | |
# This is the domain where your Huginn instance will be running. The default should work | |
# for development, but it needs to be changed to your Huginn domain when you deploy to a | |
# production environment (e.g., yourdomain.com, possibly including a port). | |
DOMAIN=$OPENSHIFT_APP_DNS |
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
" delete all buffers function | |
function! DeleteHiddenBuffers() | |
let tpbl=[] | |
call map(range(1, tabpagenr('$')), 'extend(tpbl, tabpagebuflist(v:val))') | |
for buf in filter(range(1, bufnr('$')), 'bufexists(v:val) && index(tpbl, v:val)==-1') | |
silent execute 'bwipeout' buf | |
endfor | |
endfunction | |
cabbrev bda call DeleteHiddenBuffers() |
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 express = require("express"); | |
var app = express(); | |
app.use(function(req, res, next) { | |
setTimeout(function() { | |
console.log("("+ process.pid +"): "+ new Date() +" XXX"); | |
res.end("X"); | |
},5000); | |
console.log("("+ process.pid +"): "+ new Date() +" handles="+ process._getActiveHandles().length +" requests="+ process._getActiveRequests().length); | |
}); |
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 dns = require("dns"); | |
var count = 0; | |
var gotResponse = true; | |
setInterval(function () { | |
var cnt = ++count; | |
if (gotResponse) { | |
gotResponse = false; | |
console.time("dnslookup"+ cnt); |
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
readFile("some/file.txt").then(function(stream) { | |
stream | |
.pipe(es.split('\n')) | |
.map(function(data) { return data.substring(5); }); | |
}); |
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
for (line, logstr) in zip(lines, text): | |
line = "".join(line) | |
if len(line.strip()) == 0: continue | |
result.append(["%-*s" % (2 * indentation_level, line), logstr]) |
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
x27[?25lx27[1Fx27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;0m x27[48;5;22m x27[48;5;64m x27[48;5;64m x27[48;5;2m x27[48;5;76m x27[48;5;76m x27[48;5;76m x27[48;5;76m x27[48;5;2m x27[48;5;64m x27[48;5;28m x27[48;5;22m x27[48;5;22m x27[48;5;64m x27[48;5;28m x27[48;5;34m x27[48;5;28m x27[48;5;64m x27[48;5;34m x27[48;5;64m x27[48;5;28m x27[48;5;28m x27[48;5;64m x27[48;5;34m x27[48;5;64m x27[48;5;64m x27[48;5;64m x27[48;5;64m x27[48;5;22m x27[48;5;22m x27[48;5;22m x27[48;5;22m x27[48;5;0m x27[48;5;22m x27[48;5;0m x27[48;5;0m x27[48;5;22m x27[48;5;0m x27[48 |
OlderNewer