Skip to content

Instantly share code, notes, and snippets.

View rcmachado's full-sized avatar

Rodrigo Machado rcmachado

View GitHub Profile
@rcmachado
rcmachado / jquery.unserialize.js
Created November 25, 2009 10:19
$.unserialize for jQuery
/**
* $.unserialize
*
* Takes a string in format "param1=value1&param2=value2" and returns an object { param1: 'value1', param2: 'value2' }. If the "param1" ends with "[]" the param is treated as an array.
*
* Example:
*
* Input: param1=value1&param2=value2
* Return: { param1 : value1, param2: value2 }
*
@rcmachado
rcmachado / html5.vim
Created December 15, 2009 10:35
Vim syntax file for HTML 5
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://gist.github.com/256840
" Last Change: 2010 Aug 26
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
@rcmachado
rcmachado / vimrc
Created January 8, 2010 20:20
Vim configuration (.vimrc)
" My .vimrc (use with https://github.com/akitaonrails/vimfiles)
"
" Date: 2011-06-22
source ~/.vim/vimrc
colorscheme default
set background=dark
set list
@rcmachado
rcmachado / nginx.conf
Created February 25, 2010 21:33 — forked from thewebfellas/nginx.conf
Thin configuration for nginx (with a little correction)
user nginx;
worker_processes 5;
error_log /var/log/nginx.error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@rcmachado
rcmachado / javascript.vim
Created April 15, 2010 16:50
Vim JavaScript definitions
" .vim/after/ftplugin/after/
"
" Javascript definitions
"
" Based on 'Code Conventions for the JavaScript Programming Language', by Douglas Crockford
" http://javascript.crockford.com/code.html (2010-04-15)
set tabstop=4
set expandtab
set smarttab
@rcmachado
rcmachado / python.vim
Created April 15, 2010 16:52
Vim Python definitions
" .vim/after/ftplugin/after/
"
" Python definitions
"
" Based on 'PEP 8 - Style Guide for Python Code'
" http://www.python.org/dev/peps/pep-0008/ (2010-04-15)
set tabstop=4
set expandtab
set smarttab
@rcmachado
rcmachado / smarty.vim
Created April 15, 2010 16:56
Smarty syntax highlighter for vim
" Vim syntax file
" Language: Smarty Templates
" Maintainer: Manfred Stienstra manfred.stienstra@dwerg.net
" Last Change: Fri Apr 12 10:33:51 CEST 2002
" Filenames: *.tpl
" URL: http://www.dwerg.net/download/vim/smarty.vim
" For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if !exists("main_syntax")
@rcmachado
rcmachado / soy.vim
Created April 15, 2010 16:59
Soy template syntax
" Vim syntax file
" Language: Soy Templates
" Maintainer: Rodrigo Machado rcmachado@gmail.com
" Last Change: Thu Apr 15 16:59:00 GMT 2010
" Filenames: *.soy
" URL: http://gist.github.com/gists/367358/download
"
" Based on Smarty.vim
" For version 5.x: Clear all syntax items
@rcmachado
rcmachado / satchmo_requirements.txt
Created May 12, 2010 14:55 — forked from ingenieroariel/satchmo_requirements.txt
Requirements for Satchmo 0.9-dev
http://www.djangoproject.com/download/1.2-rc-1/tarball/
pycrypto
http://www.satchmoproject.com/snapshots/trml2pdf-1.2.tar.gz
django-registration
PyYAML
-e svn+http://django-app-plugins.googlecode.com/svn/trunk/#egg=django-app-plugins
-e hg+https://sorl-thumbnail.googlecode.com/hg/#egg=sorl-thumbnail
-e hg+http://bitbucket.org/bkroeze/django-threaded-multihost/#egg=django-threaded-multihost
-e hg+http://bitbucket.org/chris1610/satchmo/#egg=satchmo
-e hg+http://bitbucket.org/bkroeze/django-caching-app-plugins/#egg=django-caching-app-plugins
@rcmachado
rcmachado / bugzilla_click-row.user.js
Created May 12, 2010 18:53
Greasemonkey script that makes entire bug row clickable on Bugzilla
// ==UserScript==
// @name Bugzilla click-row
// @namespace github.com/rcmachado
// @description Makes an entire row clickable
// @include */buglist.cgi?*
// ==/UserScript==
(function(){
function gotoBug() {