Skip to content

Instantly share code, notes, and snippets.

☯️
I have either forgot how to write code, or I am a master. One of the two.

Jamie Curle jamiecurle

☯️
I have either forgot how to write code, or I am a master. One of the two.
Block or report user

Report or block jamiecurle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:3745410
<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
@jamiecurle
jamiecurle / backup.py
Created Oct 24, 2012
upgraded to encrypt and designed to be ran as hourly daily weekly or monthly
View backup.py
#!/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
@jamiecurle
jamiecurle / Contract Killer 3.md
Created Nov 9, 2012 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

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.

@jamiecurle
jamiecurle / Contract Killer 3.md
Created Nov 15, 2012 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

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.

@jamiecurle
jamiecurle / emoji_sad.txt
Created Nov 27, 2012 — forked from mranney/emoji_sad.txt
Why we can't process Emoji anymore
View emoji_sad.txt
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
@jamiecurle
jamiecurle / gist:5636287
Created May 23, 2013
In an exercise of experimentation I'm seeing if I can get a uuid4 collision in less than 20,000,000.
View gist:5636287
import sys
import uuid
ids = set()
try:
while True:
id = uuid.uuid4()
if id in ids:
break
@jamiecurle
jamiecurle / mytags.py
Created Jun 14, 2013
navigation example for a templatetag
View mytags.py
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
View gist:6507065
Thursday, September 5, 2013
On the NSA
Let me tell you the story of my tiny brush with the biggest crypto story of the year.
A few weeks ago I received a call from a reporter at ProPublica, asking me background questions about encryption. Right off the bat I knew this was going to be an odd conversation, since this gentleman seemed convinced that the NSA had vast capabilities to defeat encryption. And not in a 'hey, d'ya think the NSA has vast capabilities to defeat encryption?' kind of way. No, he'd already established the defeating. We were just haggling over the details.
Oddness aside it was a fun (if brief) set of conversations, mostly involving hypotheticals. If the NSA could do this, how might they do it? What would the impact be? I admit that at this point one of my biggest concerns was to avoid coming off like a crank. After all, if I got quoted sounding too much like an NSA conspiracy nut, my colleagues would laugh at me. Then I might not get invited to the cool security parties.
All of this is a
@jamiecurle
jamiecurle / nginx.conf
Created Nov 10, 2013
Nginx SSL config for proxying to jenkins
View nginx.conf
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;
}
@jamiecurle
jamiecurle / gist:52ec4980a713743bfa78
Last active Sep 21, 2015 — forked from riywo/gist:5000181
How to delete git remote(origin) branch or tag?
View gist:52ec4980a713743bfa78
# 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
You can’t perform that action at this time.