Skip to content

Instantly share code, notes, and snippets.

View tautologistics's full-sized avatar

Chris Winberry tautologistics

View GitHub Profile
CREATE TABLE geoname (
country TEXT,
zip TEXT,
place TEXT,
state TEXT,
state_abbr TEXT,
county TEXT,
county_code INTEGER,
foo TEXT,
bar TEXT,
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES;
acrobat africa alaska albert albino album
alcohol alex alpha amadeus amanda amazon
america analog animal antenna antonio apollo
april aroma artist aspirin athlete atlas
banana bandit banjo bikini bingo bonus
camera canada carbon casino catalog cinema
citizen cobra comet compact complex context
credit critic crystal culture david delta
dialog diploma doctor domino dragon drama
# This will collect module paths and versions for all
# modules loaded in the process. Should be called
# before any other require()s
versionCache = {}
(->
Path = require 'path'
Module = require('module')
Object.keys(Module._extensions).forEach (ext) ->
# Leave the JSON handler alone
// Adapted from http://stackoverflow.com/questions/563198/how-do-you-detect-where-two-line-segments-intersect/1968345#1968345
var eps = 0.0000001;
function between(a, b, c) {
return a-eps <= b && b <= c+eps;
}
function segment_intersection(x1,y1,x2,y2, x3,y3,x4,y4) {
var x=((x1*y2-y1*x2)*(x3-x4)-(x1-x2)*(x3*y4-y3*x4)) /
((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4));
var y=((x1*y2-y1*x2)*(y3-y4)-(y1-y2)*(x3*y4-y3*x4)) /
((x1-x2)*(y3-y4)-(y1-y2)*(x3-x4));
@tautologistics
tautologistics / react.component.base.js
Created June 17, 2016 15:43
Example react base component
class BaseComponent extends Component {
constructor(props) {
super(props);
this.state = this._getState(props);
}
_shouldUpdateState() { return true; }
WITH fk_tables AS (
SELECT
s1.name AS from_schema,
o1.Name AS from_table,
s2.name AS to_schema,
o2.Name AS to_table
FROM sys.foreign_keys fk
INNER JOIN sys.objects o1
ON fk.parent_object_id = o1.object_id
INNER JOIN sys.schemas s1
{
"basics": {
"name": "Chris Winberry",
"label": "Jack of all trades, master of some",
"picture": "http://www.gravatar.com/avatar/676f6d7c6e23f44ee89d25394f22dbb4.png",
"email": "chris@winberry.net",
"phone": "+1 (201) ###-####",
"website": "http://tautologistics.com/",
"summary": "Veteran full stack software engineer conversant in many languages/technologies with extensive expertise in DevOps and enterprise-scale architecture.",
"highlights": [