Skip to content

Instantly share code, notes, and snippets.

View Mebus's full-sized avatar
😀

Mebus Mebus

😀
View GitHub Profile
@ev3rywh3re
ev3rywh3re / gist:2587766
Created May 3, 2012 18:10
Linux: grep command line notes
## Search for scary PHP stuff.
grep "((eval.*(base64_decode|gzinflate))|r57|c99|sh(3(ll|11)))" ./ -roE --include=*.php*
@pheuter
pheuter / sc-dl.js
Created March 5, 2012 20:44
Bookmarklet that generates download link for a Soundcloud upload
(function(d) {
var dl = d.createElement('a');
dl.innerText = 'Download MP3';
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1];
dl.download = d.querySelector('em').innerText+".mp3";
d.querySelector('.primary').appendChild(dl);
dl.style.marginLeft = '10px';
dl.style.color = 'red';
dl.style.fontWeight = 700;
})(document);
@skyl
skyl / kwacros.py
Created February 1, 2012 05:03
Django Template macros with args and kwargs
#
# templatetags/kwacros.py - Support for macros in Django templates
#
# Based on snippet by
# Author: Michal Ludvig <michal@logix.cz>
# http://www.logix.cz/michal
#
# modified for args and kwargs by Skylar Saveland http://skyl.org
#
@resuscv
resuscv / git-annex_install_notes-Fedora.txx
Created May 29, 2011 08:24
Notes for setting up git-annex (http://git-annex.branchable.com/) on Fedora 14
# This is very similar to installing on OSX (unsurprisingly)
# Based on my gist https://gist.github.com/982148
# This is for version 86c5bd0
sudo yum install ghc cabal-install
sudo cabal update
sudo cabal install missingh
sudo cabal install utf8-string
sudo cabal install pcre-light
sudo cabal install quickcheck
@somebox
somebox / convert_trac.rb
Created October 10, 2010 20:31
Convert Trac Wiki to Markdown
#!/usr/bin/env ruby
# Convert Trac DB Wiki pages to Markdown source files
# This script is based on http://github.com/seven1m/trac_wiki_to_github which
# converted all pages from a Trac DB to GitHub Wiki format (as Textile).
#
# I made two changes:
# - uses MarkDown format instead
# - uses the sqllite3-ruby gem which does not need Ruby 1.9
@DaveEveritt
DaveEveritt / Add field to an existing Django app with South
Created June 25, 2010 20:48
quickly add field(s) to existing Django models with South
====================================================================
Simple-as-possible instructions to add a field (or more) using South
to an existing Django model with existing data.
====================================================================
Two versions:
1. Super-condensed (the bare minimum - jfdi)
2. Detailed-but-brief (if you want more information).
Notes: