Skip to content

Instantly share code, notes, and snippets.

View airstrike's full-sized avatar
🎯
bringing presentations and spreadsheets to the 21st century

Andy airstrike

🎯
bringing presentations and spreadsheets to the 21st century
View GitHub Profile
@slig
slig / admonition.py
Created August 27, 2012 11:35
admonitions extension for python-markdown
import re
import markdown
from markdown.util import etree
class AdmonitionExtension(markdown.Extension):
def extendMarkdown(self, md, md_globals):
md.registerExtension(self)
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 19, 2025 12:44
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@airstrike
airstrike / github.vim
Created May 22, 2012 18:00
Github-like color theme for vim. It's based on http://www.vim.org/scripts/script.php?script_id=2855 with fixes for .py files.
" Vim color file
"
" Author: André Terra <[email protected]>
"
" Note: Anthony Carapetis original version of github's syntax thmee
" with a few changes, like better .py highlighting and line #s.
" Used Brian Mock's darkspectrum as a starting point/template
" Thanks to Ryan Heath for an easy list of some of the colours:
" http://rpheath.com/posts/356-github-theme-for-syntax-gem
@jaddison
jaddison / gist:1943426
Created February 29, 2012 18:43
adding to the templates tags available by default - add to the top of settings.py for example
from django.template.loader import add_to_builtins
add_to_builtins('django.contrib.staticfiles.templatetags.staticfiles')
add_to_builtins('django.templatetags.i18n')
add_to_builtins('django.templatetags.future')
@airstrike
airstrike / vimrc
Created January 12, 2012 12:32
my vimrc file
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" a lot of this was stolen from: http://amix.dk/vim/vimrc.html "
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => VIM user interface
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Set 7 lines to the curors - when moving vertical..
set so=2
set wildmenu "Turn on WiLd menu
@RichardBronosky
RichardBronosky / userprofiles.admin.py
Created May 10, 2011 14:54
Django admin field order by m2m (or FK) relationship
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User
from userprofiles.models import UserProfile
class UserProfileInline(admin.StackedInline):
model = UserProfile
fk_name = 'user'
max_num = 1
@ihercowitz
ihercowitz / VisaVale.py
Created October 28, 2010 13:19
Script para obter o saldo do Visa Vale
import urllib2, urllib, sys
from BeautifulSoup import BeautifulSoup
import re
class VisaVale():
def get_visavale_informations(self,visa):
url = 'http://www.cbss.com.br/inst/convivencia/SaldoExtrato.jsp'
data = urllib.urlencode([('numeroCartao',visa),('primeiroAcesso','S')])
request = urllib2.Request(url)