This Gist moved to https://github.com/coinlab/bitcoin-docs.
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
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
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
/** | |
* Here is the simplified version. Courtesy of Mike Koss. | |
* | |
* See, http://labnote.beedesk.com/the-pitfalls-of-html5-applicationcache | |
*/ | |
function handleAppCache() { | |
if (applicationCache == undefined) { | |
return; | |
} | |
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 bash | |
# Generates gource video (h.264) out of multiple repositories. | |
# Pass the repositories in command line arguments. | |
# Example: | |
# <this.sh> /path/to/repo1 /path/to/repo2 | |
i=0 | |
for repo in $*; do | |
# 1. Generate a Gource custom log files for each repo. This can be facilitated by the --output-custom-log FILE option of Gource as of 0.29: | |
logfile="$(mktemp /tmp/gource.XXXXXX)" |
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 AmbTest = TestCase("AmbTest"); | |
AmbTest.prototype.testBasic = function () { | |
function beats(ix, iy, jx, jy) { | |
return ix == jx || Math.abs(ix-jx) == jy-iy; | |
} | |
var result = ambRun(function (amb, fail) { | |
var queenPos = []; | |
for (var i = 0; i < 8; i++) { | |
var lastPos = amb([0,1,2,3,4,5,6,7]); |
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 | |
# encoding: utf-8 | |
""" | |
replication.py - extport data to external systems | |
Created by Maximillian Dornseif on 2011-05-01. | |
Copyright (c) 2011 HUDORA. All rights reserved. | |
""" | |
from __future__ import with_statement |
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
/* | |
* base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers | |
* | |
* (C) 2010, Nodejitsu Inc. | |
* (C) 2011, Cull TV, Inc. | |
* | |
*/ | |
var base64 = exports; |
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
// ==UserScript== | |
// @name Use Markdown, sometimes, in your HTML. | |
// @author Paul Irish <http://paulirish.com/> | |
// @link http://git.io/data-markdown | |
// @match * | |
// ==/UserScript== | |
// If you're not using this as a userscript just delete from this line up. It's cool, homey. |
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
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <assert.h> | |
typedef unsigned int u32; | |
typedef unsigned long long u64; | |
//------------------------------------------------------------------------- | |
// WorkArea | |
//------------------------------------------------------------------------- |
OlderNewer