Skip to content

Instantly share code, notes, and snippets.

View tmathmeyer's full-sized avatar
🤧
Achoo

Ted tmathmeyer

🤧
Achoo
  • Google
  • kirkland
View GitHub Profile
// See formulae and constants here:
// https://www.teos-10.org/pubs/Wagner_and_Pruss_2002.pdf
function f2k(f) {
return (f - 32) * 5 / 9 + 273.15;
}
var specific_gas_constant = 461.5; // J/(kg * K)
var critical_pressure = 22.064; // MPa
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:
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={}'
#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
#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
@tmathmeyer
tmathmeyer / infotrimps.js
Last active October 19, 2017 10:23
show ratios on trimps buildings
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
}
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;
}
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;
}
}
super + {_,shift + }{1-9,0}
bspc {desktop -f,node -d} '^{1-9,10}'
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