Skip to content

Instantly share code, notes, and snippets.

Avatar
☯️
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.
View GitHub Profile
View sum.go
package main
import "fmt"
func sum(numbers []int) int {
if len(numbers) == 0 {
return 0
} else {
return numbers[0] + sum(numbers[1:])
}
@cordery
cordery / heroku_test_runner.py
Created Apr 24, 2017
Heroku CI compatible DiscoverRunner class for Django 1.10+ that does not require createdb or dropdb permissions.
View heroku_test_runner.py
import os
from django.test.runner import DiscoverRunner
"""
WARNING: WHEN USED INCORRECTLY THIS TEST RUNNER WILL DROP ALL TABLES IN YOUR PRODUCTION
DATABASE!!!
Heroku does not give users createdb/dropdb permissions, therefore Heroku CI cannot run tests for django.
In order to fix this, use this test runner instead which attempts to minimally override the
@jamiecurle
jamiecurle / challenges.md
Last active Feb 6, 2019 — forked from aymanosman/challenges.md
interview #1 questions
View challenges.md

Fizzbuzz

1
2
Fizz
4
Buzz
Fizz
7
8
@riywo
riywo / gist:5000181
Created Feb 20, 2013
How to delete git remote(origin) branch or tag?
View gist:5000181
# 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
@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.

@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active May 16, 2020
Vim Modes Transition Diagram in SVG https://rawgithub.com/darcyparker/1886716/raw/eab57dfe784f016085251771d65a75a471ca22d4/vimModeStateDiagram.svg Note, most of the nodes in this graph have clickable hyperlinks to documentation.
View vimModeStateDiagram.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.