This file contains hidden or 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
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/4g9YSUNDX1BST0ZJTEUAAQEAAA9IYXBwbAIAAABtbnRyUkdCIFhZWiAH2gABAAIADwATABNhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWFwcGzj2hTkDtBLb0wAZvmFHCs5AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA5yWFlaAAABLAAAABRnWFlaAAABQAAAABRiWFlaAAABVAAAABR3dHB0AAABaAAAABRjaGFkAAABfAAAACxyVFJDAAABqAAAAA5nVFJDAAABuAAAAA5iVFJDAAAByAAAAA52Y2d0AAAB2AAABhJuZGluAAAH7AAABj5kZXNjAAAOLAAAAGRkc2NtAAAOkAAAAGxtbW9kAAAO/AAAAChjcHJ0AAAPJAAAACRYWVogAAAAAAAAW4oAADQZAAAIS1hZWiAAAAAAAAB3lQAAtaEAAChNWFlaIAAAAAAAACO3AAAWYQAAoo1YWVogAAAAAAAA81IAAQAAAAEWz3NmMzIAAAAAAAEMQgAABd7///MmAAAHkgAA/ZH///ui///9owAAA9wAAMBsY3VydgAAAAAAAAABAc0AAGN1cnYAAAAAAAAAAQHNAABjdXJ2AAAAAAAAAAEBzQAAdmNndAAAAAAAAAAAAAMBAAACAAABJAGmAnoDfAR8BX4GgAeCCIMJRAnFCocLiAyJDYwOthBoEZESkROSFJQVlRaVF5cYxRpvG5scmx2dHsggdSGiIqMjzyV7JqYn0Sl+Kqsr1i2CLq0v2jGHMrIz3zWMNrY34TmOOro75j2TPr4/6kGWQsJD7kWaRsZH8kmfSspL9k2iTs5P0FDQUdFS/FSqVdVW1lfXWNhaBFuxXNxd3V7eX99g4GIMY7lk5GXlZuZn52joaelrFWzBbe1u7m/vcPBx8XLyc/R09HX1dvZ393j4efl6+nv |
This file contains hidden or 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
def doit(&blk) | |
if blk.arity == 2 | |
blk.call("mydata", false) | |
blk.call(nil, true) | |
else | |
blk.call("mydata") | |
end | |
end | |
doit {|data, done| p [data, done] } |
This file contains hidden or 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
uint64((uint32(x) >> 1) ^ uint32((int32(x&1)<<31)>>31)) |
This file contains hidden or 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
# When anything, including nil, is a valid param and you need | |
# a clear way to know if a param was set or not, use `None`. | |
None = Object.new | |
def foo(a, b=None) | |
result = [a] | |
if b != None | |
result << b | |
end |
This file contains hidden or 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
ch := make(chan ResponseType) | |
go func() { | |
ch <- doSomething | |
}() | |
resp := doOtherThings() | |
doFinalThings(resp, <-ch) |
This file contains hidden or 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
setlocal noexpandtab | |
setlocal softtabstop=4 | |
setlocal shiftwidth=4 | |
setlocal tabstop=4 | |
setlocal listchars=tab:»\ | |
setlocal comments=:// | |
nmap gt mT?^func <CR>w"ayw:`T!gotest -match=<C-R>a<CR> |
This file contains hidden or 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
#!/usr/bin/env roundup | |
describe "redis-cli(1)" | |
# Start the redis server on port 9999 | |
port=9999 | |
printf "PORT $port\n" | ./redis-server - & | |
redis_pid=$! | |
# Give redis time to start listening |
This file contains hidden or 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
<html> | |
<head> | |
<title>{{title}} - It's bonus</title> | |
</head> | |
<body> | |
{{{yield}}} | |
<body> |
This file contains hidden or 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
# MainWindow.rb | |
# Bombastic | |
# | |
# Created by Blake Mizerany on 6/26/10. | |
# Copyright 2010 __MyCompanyName__. All rights reserved. | |
require 'rest' | |
class MainController | |
attr_writer :button |
This file contains hidden or 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
#include <node.h> | |
#include <node_events.h> | |
#include <stdlib.h> | |
using namespace v8; | |
using namespace node; | |
#define _PROTO_DATA_SYMBOL String::NewSymbol("data") | |
class RequestParser : EventEmitter { |