View gist:acb8a5888076d1fee3e8554d59c052c0
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
class TypeTree(object): | |
def __init__(self, name, *children, append=False): | |
self._name = name | |
self._children = children or [] | |
self._append = append | |
def GetAllTags(self): | |
result = set([self._name]) | |
for child in self._children: |
View datagrabber.py
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
from collections import namedtuple | |
from html.parser import HTMLParser | |
import inspect | |
import requests | |
import sqlite3 | |
URL = 'https://blue.kingcounty.com/Assessor/eRealProperty/Detail.aspx?ParcelNbr={}' |
View ssr.c
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 <stdint.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <time.h> | |
#ifdef linux | |
#include <sys/resource.h> | |
#include <unistd.h> | |
#endif |
View shittysquareroot.c
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 <stdint.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <windows.h> | |
#define EXP_HIGH_BIT 0x40000000 | |
#define MANT_HIGH_BIT 0x00400000 | |
#define VALUE_COUNT 100000000 |
View infotrimps.js
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
oldCanAffordBuilding = canAffordBuilding | |
newCanAffordBuilding = function(what, take, buildCostString, isEquipment, updatingLabel, forceAmt, autoPerc) { | |
result = oldCanAffordBuilding(what, take, buildCostString, isEquipment, updatingLabel, forceAmt, autoPerc) | |
if(typeof(result) === "boolean"){ | |
return result | |
} | |
gamething = game['buildings'][what] | |
if (gamething == null) { | |
return result | |
} |
View api_builder.js
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 uuid_gen = require('node-uuid'); | |
inarr = function(arr, f) { | |
for(var i=0; i<arr.length; i++) { | |
if (arr[i] === f) { | |
return true; | |
} | |
} | |
return false; | |
} |
View redisql.js
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 uuid_gen = require('node-uuid'); | |
var redis = require('redis').createClient(); | |
var isotope = require('isotope').create(7088); | |
inarr = function(arr, f) { | |
for(var i=0; i<arr.length; i++) { | |
if (arr[i] === f) { | |
return true; | |
} | |
} |
View gist:6d6b43c1d5b66abe9317c294456250d1
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
super + {_,shift + }{1-9,0} | |
bspc {desktop -f,node -d} '^{1-9,10}' |
View bspwmrc
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
feh --bg-tile /home/ted/.rwpcd/pine.jpg | |
BORDER=3 | |
PADDING=0 | |
bspc config right_padding $PADDING | |
bspc config left_padding $PADDING | |
bspc config border_width $BORDER | |
bspc config window_gap -$BORDER | |
bspc config split_ratio 0.50 |
View post.js
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 qs = require("querystring"); | |
var http = require("http"); | |
http.createServer(function(request, response) { | |
if (request.method === 'POST' || request.method === 'post') { | |
withPostData(request, function(error, postData) { | |
// postData is a JSON object from the http request | |
console.log(error); // if there are no problems, error is just null | |
console.log(postData); // if there are errors, postData is null | |
// do real things with post data |
NewerOlder