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
@lepoetemaudit
lepoetemaudit / sum.go
Created July 8, 2018 12:40
sum in golang
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 April 24, 2017 20:48
Heroku CI compatible DiscoverRunner class for Django 1.10+ that does not require createdb or dropdb permissions.
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
@treejamie
treejamie / challenges.md
Last active February 6, 2019 12:17 — forked from aymanosman/challenges.md
interview #1 questions

Fizzbuzz

1
2
Fizz
4
Buzz
Fizz
7

8

@riywo
riywo / gist:5000181
Created February 20, 2013 22:15
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
@treejamie
treejamie / Contract Killer 3.md
Created November 15, 2012 17:26
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.

@darcyparker
darcyparker / vimModeStateDiagram.svg
Last active September 30, 2024 12:33
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.