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
hdon@behemoth:~/src/git/bug-20170416$ cat foobarbaz.c | |
#include <stdlib.h> | |
#include <string.h> | |
typedef struct foo { | |
size_t *bar; | |
} foo; | |
int main(int argc, char **argv) { | |
foo baz; |
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
hdon@behemoth:~/src/git$ git init trailstest | |
Initialized empty Git repository in /home/hdon/src/git/trailstest/.git/ | |
hdon@behemoth:~/src/git$ cd trailtest | |
bash: cd: trailtest: No such file or directory | |
(reverse-i-search)`': ^C | |
hdon@behemoth:~/src/git$ cd trailstest | |
hdon@behemoth:~/src/git/trailstest$ yo | |
? 'Allo Don! What would you like to do? Trails | |
Make sure you are in the directory you want to scaffold into. |
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
{ | |
"host": "xxxxxxxxxx" | |
, "user": "xxxxxxxxxx" | |
, "password": "xxxxxxxxxxxxxxxxxxxx" | |
, "database": "xxxxxxxxxxxxxxxxx" | |
} |
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, re | |
def s2ip(s): | |
a, b, c, d = map(int, s.split('.')) | |
return (a << 24) | (b << 16) | (c << 8) | d | |
def ip2s(n): | |
return '%d.%d.%d.%d' % ( | |
(n >> 24) | |
,(n >> 16)& 255 |
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.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
browserify: { | |
options: { | |
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n' | |
, browserifyOptions: { | |
debug: true /* generate source maps */ | |
} | |
} |
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
# coding=utf8 | |
""" | |
willie-chess.py - chess, duh | |
""" | |
# whipped this up at lunch. | |
# clone https://github.com/embolalia/willie | |
# put this in ./willie/modules | |
# create mysql database and table "chessgame" | |
# all moves are validated but en passant and castling aren't implemented |
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
import re | |
words = filter(lambda s:all([ord(c)<128 for c in s]), map(str.strip, open('/usr/share/dict/words'))) | |
domainExp = re.compile('^[a-z0-9_]+$') | |
numbersExp = re.compile('[0-9]+') | |
englishWords = \ | |
filter( | |
lambda s: domainExp.match(s), | |
map(str.lower, | |
map(str.strip, | |
open('/usr/share/dict/words') |
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
T Clone(T)(T object) { | |
auto size = object.classinfo.init.length; | |
T ret = cast(T)((cast(void*)object)[0..size].dup.ptr); | |
return ret; | |
} |
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 com.codebad.shader; | |
import derelict.opengl3.gl3; | |
import file = std.file; | |
import std.exception : enforce; | |
import std.stdio : writeln, writefln; | |
import std.string : format, toStringz; | |
import std.traits : isPointer, PointerTarget; | |
import std.conv : to; | |
import std.path : baseName; | |
import std.traits : isSigned; |
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 <iostream> | |
#include <type_traits> | |
using namespace std; | |
struct Nil { | |
typedef Nil Head; | |
typedef Nil Tail; | |
}; | |
template <typename H, typename T = Nil> struct Lst { |