Skip to content

Instantly share code, notes, and snippets.

View treejamie's full-sized avatar
🌳
working with trees

Tree Jamie treejamie

🌳
working with trees
View GitHub Profile
@treejamie
treejamie / gist:52ec4980a713743bfa78
Last active September 21, 2015 11:02 — forked from riywo/gist:5000181
How to delete git remote(origin) branch or tag?
# branch
$ git branch -d BRANCH # delete local BRANCH
$ git push origin :BRANCH # delete remote BRANCH
# tag
$ git tag -d TAG # delete local TAG
$ git push origin :refs/tags/TAG # delete remote TAG
<article>
<section class="stats">
<h1>Why Mobile?</h1>
<img src="" alt="Reasons to go mobile" />
<ul>
<li>
<strong>1.4</strong>
Mobile Devices per person
@treejamie
treejamie / backup.py
Created October 24, 2012 12:00
upgraded to encrypt and designed to be ran as hourly daily weekly or monthly
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
import optparse
import subprocess as sp
import gzip
from datetime import datetime
try:
from boto.s3.connection import S3Connection, Location
@treejamie
treejamie / Contract Killer 3.md
Created November 9, 2012 14:15 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@treejamie
treejamie / Contract Killer 3.md
Created November 15, 2012 17:26 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@treejamie
treejamie / emoji_sad.txt
Created November 27, 2012 05:14 — forked from mranney/emoji_sad.txt
Why we can't process Emoji anymore
From: Chris DeSalvo <chris.desalvo@voxer.com>
Subject: Why we can't process Emoji anymore
Date: Thu, 12 Jan 2012 18:49:20 -0800
Message-Id: <AE459007-DF2E-4E41-B7A4-FA5C2A83025F@voxer.com>
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
(ns simple.core
(:require [reagent.core :as r]))
(defonce weight (r/atom 40))
(defonce reps (r/atom 5))
(defn calculate-repmax [w r]
@treejamie
treejamie / gist:5636287
Created May 23, 2013 14:01
In an exercise of experimentation I'm seeing if I can get a uuid4 collision in less than 20,000,000.
import sys
import uuid
ids = set()
try:
while True:
id = uuid.uuid4()
if id in ids:
break
@treejamie
treejamie / mytags.py
Created June 14, 2013 09:18
navigation example for a templatetag
from django.template import Node, Library, Variable
from myapp.models import Whatever
register = Library()
class NavigationNode(Node):
def __init__(self, user, varname):
# this is a variable in the template so we need to resolve later
@treejamie
treejamie / nginx.conf
Created November 10, 2013 12:20
Nginx SSL config for proxying to jenkins
upstream jenkins {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;
server_name {{ jenkins_url }};
rewrite ^ https://$server_name$request_uri? permanent;
}