This project has moved to dryan.github.io/d3ploy.
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
static int base64_decode(unsigned char* dst, size_t dstsize, const char* src, size_t srclen) { | |
// | |
// On a 2.8 GHz Intel Core i7 and clang 4.2 -O3 -std=c++11 this was measured to perform well: | |
// Avg nsec/invocation: 32 | |
// Avg invocations/second: 31 649 841 | |
// Iterations: 10 000 000 | |
// These numbers include C function call overhead (pusing and popping the stack) and are for | |
// dstsize=16, srclen=22 (tested on decoding a igraph_id). After measuring many different source | |
// sizes ranging from 16 to 4096, raw performance stays constant (at around 770 MB/s). | |
// |
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 | |
import sys, os, ConfigParser, argparse | |
from getpass import getpass | |
CLOUD_CONFIG_PATH = os.path.expanduser('~/.cloudapp') | |
CAMPFIRE_CONFIG_PATH = os.path.expanduser('~/.basecamp') | |
def log(message, error_code = None): | |
if error_code: |
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 ruby | |
# ********************************************* | |
# Jekyll Post Generator Awesomeness | |
# by Cody Krieger (http://codykrieger.com) | |
# ********************************************* | |
# ********************************************* | |
# Modified by Tim Smith (http://ttimsmith.com) | |
# Originally created as a command line tool but |
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
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
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
Show hidden characters
[ | |
{ "keys": ["shift+space"], "command": "move", "args": {"by": "characters", "forward": true} } | |
] |
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
<p class="month"><span class="name">July</span> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31<span class="break">hi</span></p> |
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
We have a private Git running on a server somewhere which we consider our central repository. Inside the .git/hooks/post-recieve is the following: | |
#!/bin/bash | |
while read oldrev newrev ref | |
do | |
branch=`echo $ref | cut -d/ -f3` | |
if [ "master" == "$branch" ]; then |
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
// Sess-io by @ThrivingKings | |
// http://thrivingkings.com/read/Sess-iojs-handles-session-expiration-in-pure-JavaScript | |
// Date fix for good ole IE8 | |
if (!Date.now) { | |
Date.now = function() { | |
return new Date().valueOf(); | |
} | |
} |