Skip to content

Instantly share code, notes, and snippets.

View billiegoose's full-sized avatar

Billie Hilton billiegoose

View GitHub Profile
@billiegoose
billiegoose / mergelog.py
Created December 9, 2015 17:00 — forked from seanh/mergelog.py
A custom merge driver for git, for automatically merging my 'log.txt' file in a simplistic way.
#!/bin/env python
"""mergelog
This is a custom merge driver for git. It should be called from git
with a stanza in .git.config like this:
[merge "mergelog"]
name = A custom merge driver for my log.txt file.
driver = ~/scripts/mergelog %O %A %B %L
recursive = binary
@billiegoose
billiegoose / upsert.sql
Created November 9, 2015 16:45 — forked from KyleGobel/upsert.sql
Insert/Update Upsert Trigger in Postgres
CREATE OR REPLACE FUNCTION upsert_user()
RETURNS trigger AS
$upsert_user$
declare
existing record;
begin
if (select EXISTS(select 1 from users where user_id = NEW.user_id)) then
select user_name, user_class, user_age into strict existing from users where user_id = new.user_id;
@billiegoose
billiegoose / index.html
Last active August 29, 2015 14:01 — forked from NPashaP/.block
UI for editing tree graph structures
<!DOCTYPE html>
<!-- Written by William Hilton -->
<!-- Derived from the "Graceful Tree Conjecture" by NPashaP @ https://gist.github.com/NPashaP/7683252 -->
<head>
<meta charset="utf-8" />
<!-- This is for the trash bin icon. -->
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet" />
<style>
.oval-box {
background: white;
// See comments below.
// This code sample and justification brought to you by
// Isaac Z. Schlueter, aka isaacs
// standard style
var a = "ape",
b = "bat",
c = "cat",
d = "dog",
\documentclass{jhwhw}
\author{Christopher S. Corley}
\title{Class homework solutions}
\date{October 19, 2011}
\begin{document}
\problem{Some problem name}
blahblah
\solution