Skip to content

Instantly share code, notes, and snippets.

View chrisglass's full-sized avatar

Chris Glass chrisglass

View GitHub Profile
@chrisglass
chrisglass / tribaal.asc
Created July 8, 2014 21:47
My new gpg public key
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFO8VeMBEADCj46af3zouBZ+4Hii5nyfwJHyKReE1FzxqYsbAJC7g6NGegNq
54FFDpmu2ITYbI3eN2fAy+NGv+AdZ07I/KEXaJh+h80E6C1Nxf+veu1t7TQRTWrs
SHIHIws+PjTODkt225Yzs8mVuvmqQsGN2s9Wn70ddp31BXApRST6+AkOG1C5W1Zs
J2rIFHslKwEZRn+/jgMxW8tQMktuK73rc4WeKyzekHDcWT3/Onz11IgoLEeYGa0B
4FB0X4T29ok1TgIbQqzeTOyXGfDJO/PpslEs4rTwTDYFRh8NuwTDuTLK0Yte/g0R
7MakhITb2TLDUv0+aiYSjd8I7EhaNmRj/WRV/eYd5fRvuYtFDkSVNJSCzUlTSlBG
859ffDdr9wJkOzq2LaKTPpwYHugTd7R3Br1SmQkPBZVw3NbCIrhlBj6HDG0NzGX8
@chrisglass
chrisglass / todo.rst
Last active August 29, 2015 14:03
My opensource projects TODO list

Tribaal's Opensource laundry list

Because I have too many things to do and to little time to do it. Let's start a list!

  • Make a new pypi release for django-shop-paypal
  • Update dependencies to django-polymorphic and jsonfield to 1.6 compatible versions
mondict = {"blah": "foo"}
def une_fonction(undict):
undict["blah"] = "bar"
une_fonction(mondict)
print mondict # C'est "{'blah': 'bar'}
# A l'invere

Keybase proof

I hereby claim:

  • I am chrisglass on github.
  • I am tribaal (https://keybase.io/tribaal) on keybase.
  • I have a public key whose fingerprint is E78D C4FF 8B1A 2FE0 3384 AB46 8B4D D16B 2133 3BDB

To claim this, I am signing this object:

@chrisglass
chrisglass / lxc-ubuntu-cloud
Created January 14, 2014 11:02
A patched ubuntu cloud template using the squid-deb-proxy-client pre-start hook
#!/bin/bash
# template script for generating ubuntu container for LXC based on released
# cloud images.
#
# Copyright © 2012 Serge Hallyn <serge.hallyn@canonical.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
#!/bin/bash
#
# template script for generating ubuntu container for LXC
#
# This script consolidates and extends the existing lxc ubuntu scripts
#
# Copyright � 2011 Serge Hallyn <serge.hallyn@canonical.com>
# Copyright � 2010 Wilhelm Meier
@chrisglass
chrisglass / spin_up.sh
Created June 7, 2013 09:19
Spin up an LXC container for some version of ubuntu
lxc-create -n <NAME> -t ubuntu -- --release <RELEASE ie. precise, raring...> -b <USERNAME to bind home to in the VM>
@chrisglass
chrisglass / random.js
Created March 15, 2013 10:53
Random background color for element using jQuery
$('*').each(function() { $(this).css({background: "#"+((1<<24)*Math.random()|0).toString(16)});});
@chrisglass
chrisglass / playlist-export.py
Created February 8, 2013 07:45
Given a playlist, copy all the music files it contains to a /tmp folder.
#!/usr/bin/python
import os
import urllib
import shutil
lines = []
playlist = "/tmp/Test.pls"
playlist_name = playlist.split("/")[-1]
playlist_name = playlist_name.split(".")[0]
destination_folder = "/tmp/%s" % playlist_name
@chrisglass
chrisglass / export_pls.py
Created January 10, 2013 22:04
Copy all files from a .pls to some folder (in /tmp)
#!/usr/bin/python
import os
import urllib
import shutil
lines = []
playlist = "/tmp/Test.pls"
playlist_name = playlist.split("/")[-1]
playlist_name = playlist_name.split(".")[0]
destination_folder = "/tmp/%s" % playlist_name