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> | |
int main(char *arg, char **argv) { | |
int n = 10; | |
int i; | |
int m = 100; | |
switch (n) { | |
case 0: | |
m = 1; | |
while (m--) { |
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 | |
# | |
# For Keri. There really isn't a generalizable way to go about this because the | |
# input has very specific rules. But here's a pretty typical way to do it. | |
from re import compile, split | |
RE_DELIMETERS = compile(r'[\/\s]+') | |
RE_NUMERIC = compile(r'^[0-9]+') | |
RE_BINARY_OPS = compile(r'^[\+\-]+') |
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 | |
if [ $DEBUG ]; then | |
set -o xtrace | |
fi | |
# ... |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Crash</title> | |
<style> | |
#crash { | |
position: absolute; | |
top: 0; | |
left: 0; | |
width: 100%; |
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
$ time make devel | |
Tearing it down... | |
Creating virtualenv... | |
Installing Python packages (locally)... | |
Installing Node.js packages (locally)... | |
Creating environment symlink... | |
Adding Vagrant integration... | |
Booting Vagrant... | |
Creating users... | |
Configuring iptables... |
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 | |
# | |
# Monkey patching a function in bash. Why. | |
patch() { | |
new_guy=$(declare -f $1) | |
new_guy=${new_guy##$1*\{} | |
new_guy=${new_guy/\}/} | |
old_guy=$(declare -f $2) | |
old_guy=${old_guy/$2*{/} |