[mod:shift]
[flying]
doesn't mean I can fly.- This article is a good reference for Druidic stuff.
[stance:1]
is bear[stance:2]
is aquatic[stance:3]
is cat
[stance:4]
is travel
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
# "curl http://gist.github.com/this | bash" to kick it. | |
clear | |
echo AUTOMATED AWESOME BEGINS | |
echo | |
aptitude -y install gcc-4.3 | |
aptitude -y install python2.5 | |
aptitude -y install git-core | |
echo | |
echo AUTOMATED AWESOME COMPLETE |
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
// Won't work if you don't use {]s everywhere. | |
#define PRINT_ABBREVIATED_FILE_AND_LINE() fprintf(stderr,"[%.3s:%i]", __FILE__ + 2, __LINE__) && fflush(stderr) | |
#define if PRINT_ABBREVIATED_FILE_AND_LINE(); if | |
#define for PRINT_ABBREVIATED_FILE_AND_LINE(); for | |
#define while PRINT_ABBREVIATED_FILE_AND_LINE(); while | |
#define return PRINT_ABBREVIATED_FILE_AND_LINE(); return | |
#define free PRINT_ABBREVIATED_FILE_AND_LINE(); free |
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 python3.0 | |
import sys | |
from fractions import Fraction | |
from math import sin, pi | |
def xsin(x, threshold=.05): | |
"""Sine approximation.""" | |
if abs(x) < threshold: | |
return(x) |
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 python3.0 | |
import sys | |
import multiprocessing | |
def process(function, name=None): | |
"""Decorates a into spawning a new process. Yay clarity.""" | |
def decorated(*args, *kwargs): | |
p = multiprocessing.Process(target=function, name=name, args=args, kwargs=kwargs) | |
p.start() |
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
/* | |
* linked.c | |
* | |
* Generic linked list library. | |
* | |
* Please see linked.h for documentation. | |
*/ | |
#ifndef JB_LINKED_C | |
#define JB_LINKED_C |
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 | |
# encoding: utf-8 | |
from __future__ import division, with_statement | |
import sys | |
import random | |
def somesort(data): | |
"""A dumb n**2 sort.""" | |
data = list(data) | |
result = 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
//&>/dev/null;x="${0%.*}";[ ! "$x" -ot "$0" ]||(rm -f "$x";cc -o "$x" "$0")&&"$x" $*;exit | |
#import <stdio.h> | |
#import <stdlib.h> | |
#import <string.h> | |
typedef struct strpart { | |
char* start; | |
int len; | |
struct strpart* next; |
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
C:\Python26\python.exe -x logon.bat & exit | |
# There, this can act as the windows equivilent of a shebang, I guess. | |
print("Hello world") |
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 | |
# encoding: utf-8 | |
from __future__ import division, with_statement | |
import sys | |
# http://stackoverflow.com/questions/309884/code-golf-number-to-words | |
# http://en.wikipedia.org/wiki/Long_and_short_scales | |
"""Converts numbers to words using the English short scale.""" |