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
func Run() { | |
opts := optparse.New("") | |
listServices := opts.Flags("--services").Bool("List available services") | |
listServices := opts.Flags("--services").String("List available services", "default") | |
listServices := opts.Flags("--services").String("List available services [default]") | |
listServices := opts.Flags("--services").Int("List available services [20]") | |
listServices := opts.Flags("-p", "--port").Label("BLAH").Int("List available services [20]") | |
os.Args[0] = "nodule" |
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
> state = {user: 'tav', setUser: function(username) { | |
... console.log(this.user); | |
... this.user = username; | |
... }} | |
{ user: 'tav', setUser: [Function] } | |
> runCb = function(cb, value) { | |
..... cb(value); | |
..... } | |
[Function] | |
> runCb(state.setUser, 'seyi') |
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 python | |
import os | |
import requests | |
import sys | |
from BeautifulSoup import BeautifulSoup | |
from commands import getoutput | |
from hashlib import sha1 | |
from os.path import expanduser, isfile, join |
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
from sentinel import handle, Timeout | |
@handle(public=True) | |
def location_find(ctx, place): | |
cache_key = 'location.find|%s' % place | |
try: | |
area = ctx.cache.get(cache_key, deadline=20) | |
except Timeout: | |
area = None | |
if not area: |
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
$ gauge -s -i js/bluebird.js -i js/rsvp.js -i js/mu.js test.js | |
## Point your web browsers at http://192.168.1.68:4040/ | |
>> connected: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 | |
[1] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.116 Safari/537.36 | |
PASS µ 5000000 192 ns/op | |
PASS Bluebird 2000000 557 ns/op | |
PASS RSVP 1000000 2321 ns/op |
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
<!doctype html> | |
<meta charset=utf-8> | |
<title>setImmediate alternatives</title> | |
<style> | |
table td { | |
padding: 20px; | |
} | |
.unavailable { | |
text-decoration: line-through; | |
} |
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
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# Issuer: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc. | |
# Subject: CN=GTE CyberTrust Global Root O=GTE Corporation OU=GTE CyberTrust Solutions, Inc. | |
# Label: "GTE CyberTrust Global Root" | |
# Serial: 421 | |
# MD5 Fingerprint: ca:3d:d3:68:f1:03:5c:d0:32:fa:b8:2b:59:e8:5a:db | |
# SHA1 Fingerprint: 97:81:79:50:d8:1c:96:70:cc:34:d8:09:cf:79:44:31:36:7e:f4:74 |
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 python | |
import sys | |
import json | |
struct = ['type x '] | |
out = struct.append | |
def handle_elem(elem): | |
if isinstance(elem, list): |
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
// Public Domain (-) 2014 The Wikifactory Site Authors. | |
// See the Wikifactory Site UNLICENSE file for details. | |
package main | |
import ( | |
"code.google.com/p/freetype-go/freetype/raster" | |
"code.google.com/p/freetype-go/freetype/truetype" | |
"errors" | |
"image" |
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
# -*- coding: utf-8 -*- | |
import sys | |
cp = sys.argv[1] | |
if len(cp) != 4: | |
print "Invalid unicode codepoint: %r" % cp | |
sys.exit(1) |