View spacesFollowedByTabs
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 |
View gist:10403425
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 |
View tabSpaceTab
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 |
View gist:11085439
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 |
View gist:2b9faa9133322c33b465
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() |
View async.js
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); | |
}); |
View nonconcurrent.js
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); |
View loadtest.js
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); }); | |
}); |
View gundo.py
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]) |
View trace.txt
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
2015-04-02_20:15:54.15087 # | |
2015-04-02_20:15:54.15088 # Fatal error in a, line 11 | |
2015-04-02_20:15:54.15089 # c | |
2015-04-02_20:15:54.15089 # | |
2015-04-02_20:15:54.15090 | |
2015-04-02_20:15:54.15153 {"name":"flurry","hostname":"ip-172-31-29-187","pid":7838,"level":30,"headers":{"host":"mobile.btrll.com","content-type":"application/json","user-agent":"Apache-HttpAsyncClient/4.0-beta4 (java 1.5)","x-openrtb-version":"2.1","x-forwarded-for":"216.52.203.134","x-forwarded-port":"80","x-forwarded-proto":"http","content-length":"1937","connection":"keep-alive"},"url":"/ad?integration=flurry","POST":{"id":"7bcd7068-08d5-4c63-a723-8f822b336b53","imp":[{"id":"1fc563cb-b6f6-4ec2-8cf8-b3e2863328d3","banner":{"w":480,"h":320,"ext":{"rewarded":0,"video":{"mimes":["video/mp4"],"linearity":1,"minduration":1,"maxduration":30,"minbitrate":0,"maxbitrate":500,"protocol":[1,2,3],"w":320,"h":480,"ext":{"rewarded":1,"video_skippable":"BLOCK_SKIPPABLE","skip_offset":30,"ad_group_id":"flurry_in_network"},"playbackmethod":[1]}},"pos":0,"bt |
OlderNewer