Created from the plain text reference card on orgmode.org Download this file, and open it in Emacs org-mode!
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
// fn to handle jsonp with timeouts and errors | |
// hat tip to Ricardo Tomasi for the timeout logic | |
$.getJSONP = function(s) { | |
s.dataType = 'jsonp'; | |
$.ajax(s); | |
// figure out what the callback fn is | |
var $script = $(document.getElementsByTagName('head')[0].firstChild); | |
var url = $script.attr('src') || ''; | |
var cb = (url.match(/callback=(\w+)/)||[])[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
-module(date_util). | |
-compile(export_all). | |
epoch() -> | |
now_to_seconds(now()) | |
. | |
epoch_hires() -> | |
now_to_seconds_hires(now()) | |
. |
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
-module(echo_server). | |
-behaviour(gen_server). | |
%% Server API | |
-export([start_link/3, stop/1]). | |
%% Client API | |
-export([echo/1, assassinate/1]). | |
%% gen_server callbacks |
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
// See comments below. | |
// This code sample and justification brought to you by | |
// Isaac Z. Schlueter, aka isaacs | |
// standard style | |
var a = "ape", | |
b = "bat", | |
c = "cat", | |
d = "dog", |
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
package forma; | |
import forma.WholeFileInputFormat; | |
import cascading.scheme.Scheme; | |
import cascading.tap.Tap; | |
import cascading.tuple.Fields; | |
import cascading.tuple.Tuple; | |
import cascading.tuple.TupleEntry; | |
import java.io.IOException; | |
import org.apache.hadoop.mapred.JobConf; |
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
-module(netutil). | |
-author('Juan Jose Comellas <[email protected]>'). | |
%% API | |
-export([get_local_ip_from_subnet/1, get_ip_from_subnet/2, | |
cidr_network/1, cidr_netmask/1]). | |
%% @type ipv4() = {integer(), integer(), integer(), integer()} | |
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
#!/bin/sh -x | |
# These variables are always passed to build.sh | |
DIST_DIR="$1" | |
TMP_DIR="$2" | |
ROOT_DIR="$3" | |
PROJNAME="fuse_wait" | |
DESTDIR="usr/local/bin" |
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
package hbase.sandbox; | |
import java.io.IOException; | |
import org.apache.hadoop.conf.Configuration; | |
import org.apache.hadoop.hbase.HBaseConfiguration; | |
import org.apache.hadoop.hbase.HColumnDescriptor; | |
import org.apache.hadoop.hbase.HTableDescriptor; | |
import org.apache.hadoop.hbase.client.HBaseAdmin; |
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
#!/usr/bin/env python | |
""" | |
===================================== | |
PEP 20 (The Zen of Python) by example | |
===================================== | |
Usage: %prog | |
:Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com |
OlderNewer