Skip to content

Instantly share code, notes, and snippets.

View d0ugal's full-sized avatar
👋
Hi!

Dougal Matthews d0ugal

👋
Hi!
View GitHub Profile
@julz
julz / main.go
Created November 20, 2015 12:39
containersched minicontainer
package main
import (
"fmt"
"os"
"os/exec"
"syscall"
)
func main() {
@catermelon
catermelon / gist:f3b1d2e9e4d094d118fa
Last active August 29, 2015 14:12
Things to do in SF

Weather

So the SF pasttime isn't baseball or anything like that, it's laughing at tourists who wear shorts. All the visions of warm, beachy California are lies spread by the Los Angeles tv industry. SF can be cold and windy even in summer (actually especially in summer, the land warms up and causes the fog to roll in) and the fog is beautiful but it's FRICKIN COLD. I always bring a jacket to SF no matter what time of year it is. It can be 30 deg C maybe 20 miles away and 10 degrees C in SF. No joke.

Food

SF has awesome food, with a lot of Asian and Mexican influence. Here's a great list from all price ranges: http://www.sfgate.com/food/top100/2014/

Pay particular attention to Mexican/Central and South American food, since I know the UK has great Asian food but not Mexican. The burrito is a Californian staple. Try the al pastor and the carnitas.

@jd
jd / auto-star-openstack-repo
Created August 19, 2014 14:48
Starring all OpenStack Git repositories
!/usr/bin/env python
from github import Github
USERNAME = "myusername"
PASSWORD = "mypassword"
USERS = ("openstack", "stackforge", "openstack-dev", "openstack-infra")
g = Github(USERNAME, PASSWORD)
me = g.get_user()
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active May 2, 2024 23:15
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@carlio
carlio / nginx-cheeseshop.conf
Created December 9, 2012 11:00
nginx config to act as cheeseshop
# the inactive time is set really high so that we can still serve stale entries if pypi is down
proxy_cache_path /srv/pypi/cache/html levels=1:2 keys_zone=pypi-html-cache:8m max_size=100m inactive=2000h;
proxy_cache_path /srv/pypi/cache/package levels=1:2 keys_zone=pypi-package-cache:100m max_size=1000m inactive=2000h;
proxy_temp_path /srv/pypi/cache/tmp;
server {
listen 80;
server_name pypi.yourdomain.com;
@alex
alex / Original lyrics
Created October 1, 2012 04:23
I'm proud to be a unix programmer
If tomorrow all the things were gone,
I’d worked for all my life.
And I had to start again,
with just my children and my wife.
I’d thank my lucky stars,
to be livin here today.
‘ Cause the flag still stands for freedom,
and they can’t take that away.
@d0ugal
d0ugal / gist:1941104
Created February 29, 2012 14:06
Auto-activating virtualenvs with autoenv and virtualenvwrapper.
PROJECT_DIR="$(dirname "${BASH_SOURCE:-$0}" )";
ABSOLUTE_DIR=`$SHELL -c "cd \"$PROJECT_DIR\" && pwd"`;
PROJECT_NAME="$( basename $ABSOLUTE_DIR)";
if [[ -n $PROJECT_NAME && $VIRTUAL_ENV != *"$PROJECT_NAME" ]];
then workon $PROJECT_NAME;
fi;
unset PROJECT_DIR;
unset ABSOLUTE_DIR;
My Favorite iOS Apps
====================
* Camera Plus
* Shine
* Calcbot
* Things
* TweetBot
* Consume
* Prompt
@toastdriven
toastdriven / mytwilight.tmTheme
Created July 29, 2011 16:04 — forked from epicserve/sublime_text_2_notes.md
My Sublime Text 2 Setup
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>author</key>
<string>Daniel Lindsley</string>
<key>name</key>
<string>My Twilight</string>
<key>settings</key>
<array>
@sneeu
sneeu / qsort.py
Created April 27, 2011 18:06
Quick sort in Python.
def qsort(l):
"""
>>> qsort([])
[]
>>> qsort([-1])
[-1]
>>> qsort([1, 2, 3, 4])
[1, 2, 3, 4]
>>> qsort([4, 3, 2, 1])
[1, 2, 3, 4]