Skip to content

Instantly share code, notes, and snippets.


Walter walterrenner

View GitHub Profile
walterrenner /
Created Aug 26, 2015
Minimal django TestCase
from django.test import TestCase
from .models import Thing
# Create your tests here.
class TestModels(TestCase):
def test_saving_a_model(self):
thing = Thing.objects.create()
walterrenner /
Last active Aug 29, 2015 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts (Mac OS X)

h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)

h2. General

| ⌘T | go to file | | ⌘⌃P | go to project | | ⌘R | go to methods | | ⌃G | go to line | | ⌘KB | toggle side bar | | ⌘⇧P | command prompt |


Keybase proof

I hereby claim:

  • I am walterrenner on github.
  • I am walterrenner ( on keybase.
  • I have a public key whose fingerprint is 5D60 A491 A596 DFA6 1F80 FFDE BDFA 6854 DFC1 2741

To claim this, I am signing this object:

walterrenner /
Created May 16, 2014
Quick and dirty debugging with Python file operations
# wtf stands for write to file ;)
def wtf(text):
f = open("/tmp/out.log",'a')
View .htaccess
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/ \
application/x-font-ttf \
application/xhtml+xml \
application/xml \
font/opentype \
View shebang.txt
#!/usr/bin/env python
#!/usr/bin/env ruby
#!/usr/bin/env perl
#!/usr/bin/env bash
#!/usr/bin/env php
#!/usr/bin/env node
#!/usr/bin/env osascript
View launch_sublime_from_terminal.markdown

Launch Sublime Text 2 from the Mac OS X Terminal

Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.

open /Applications/Sublime\ Text\

You can find more (official) details about subl here:


walterrenner /
Last active Aug 29, 2015
Common Python datetime formatting strings
# A complete list of available directives id available on:
from datetime import datetime
now =
print now.strftime('%d. %b %Y') # 17. Sep 2014
print now.strftime('%d.%m.%y') # 17.09.14
#"%D %d %M %Y" -> 'Wed 09 Jan 2008'
walterrenner / config.ini
Last active Aug 29, 2015 — forked from philippeowagner/config.ini
Install the 3bot worker on your machine
View config.ini
View gist:b2e53444da5b7228d341
  • a bigger project
    • first subtask #1234
    • follow up subtask #4321
    • final subtask cc @mention
  • a separate task
You can’t perform that action at this time.