Skip to content

Instantly share code, notes, and snippets.

View decause's full-sized avatar

Remy DeCausemaker decause

View GitHub Profile
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-1161728-1', 'auto');
ga('send', 'pageview');
</script>
@decause
decause / fsf30-eben.txt
Last active November 14, 2015 21:29
fsf30-eben.txt
We're honored to have Founder/pres/ed of SFLC Eben Moglen.
*applause*
I hope you feel as happy about the 30th as I do. After only 22 years of this,
I'm getting a discount on the 30th. If you've been working for 22, it may feel
like 30...
$ nikola bootswatch_theme paper
[2015-04-01T04:28:57Z] WARNING: Nikola: Your BASE_URL doesn't end in / -- adding it, but please fix it in your config file!
[2015-04-01T04:28:57Z] WARNING: Nikola: WRITE_TAG_CLOUD is not set in your config. Defaulting to True (== writing tag_cloud_data.json).
[2015-04-01T04:28:57Z] WARNING: Nikola: Please explicitly add the setting to your conf.py with the desired value, as the setting will default to False in the future.
[2015-04-01T04:28:57Z] INFO: bootswatch_theme: Creating 'custom' theme from 'slate' and 'bootstrap3'
[2015-04-01T04:28:57Z] INFO: bootswatch_theme: Downloading: http://bootswatch.com/slate/bootstrap.min.css
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): bootswatch.com
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): bootswatch.com
[2015-04-01T04:28:58Z] WARNING: InsecurePlatformWarning: /home/decause/.virtualenvs/twif/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:79: A true
@decause
decause / hacker_cv_decause.tex
Created January 29, 2015 16:40
This is a LaTeX template for what I'd call a "Hacker CV." Licensed CC-BY-SA
% Contributing Authors msoucy@csh.rit.edu and remyd@civx.us
% LaTeX Hacker_CV using res.cls
\documentclass[margin]{res}
\usepackage{enumitem}
\setlist[itemize]{nosep,label=-}
%\usepackage{helvetica} % uses helvetica postscript font (download helvetica.sty)
%\usepackage{newcent} % uses new century schoolbook postscript font.
\setlength{\textwidth}{5.1in} % set width of text portion
\newcommand{\centered}{\moveleft.5\hoffset\centerline}
\newcommand{\event}[2]{{\it #1}\hfill #2\\}
@decause
decause / caldashy2014.txt
Created January 22, 2014 02:02
cal -y > cal2014.txt | vim -- or I took the output of cal -y, which displays the calendar for the year, and then stacked the calendars on top of each other, and used vim to normalize spacing. It took a minute, so I figured "hey, maybe this would be useful for someone else to not have to do?"
2014
January
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
@decause
decause / bbb_pystepper_example
Last active December 23, 2015 20:29
BeagleBoneBlack
from bb_pystepper import Stepper
mystepper = Stepper()
mystepper.rotate(180, 10)
mystepper.angle
@decause
decause / mei_me hack
Created September 18, 2013 17:14
This is a hack to fix the horrible bug that is https://bugzilla.redhat.com/show_bug.cgi?id=917081 Shoutout @lmacken, who is the progenitor of this gist :)
echo "blacklist mei_me" > /etc/modprobe.d/blacklist-mei.conf
echo "blacklist mei" >> /etc/modprobe.d/blacklist-mei.conf
cp /etc/default/grub /etc/default/grub.bak
sed -i 's/quiet/rdblacklist=mei rdblacklist=mei_me quiet/'
/etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfg
# then if you don't want to reboot
rmmod mei_me
rmmod mei
@decause
decause / parseconfig.py
Created June 17, 2013 15:14
Dead simple example of using ConfigParser to pull values from a config file.
import ConfigParser
config = ConfigParser.ConfigParser()
config.read('config.ini')
CLIENT_ID = config.get('general', 'CLIENT_ID', 0)
CLIENT_SECRET = config.get('general', 'CLIENT_SECRET', 0)
@decause
decause / clone.sh
Created June 13, 2013 20:35
Python Script to clone all the repos in the Gittip organization. Just do: python list-all-repos.py > gittip.txt
while read p; do
git clone $p
done < gittiprepos.txt
@decause
decause / awardbadge.py
Last active December 15, 2015 04:39
Example code for awarding a badge via the tahrir-api
from tahrir_api.dbapi import TahrirDatabase
db = TahrirDatabase('backend://badges:badgesareawesome@localhost/badges')
badge_id = 'fossbox'
person_email = 'person@email.com'
person_id = hash(person_email)
issued_on = None