Skip to content

Instantly share code, notes, and snippets.

View rcmachado's full-sized avatar

Rodrigo Machado rcmachado

View GitHub Profile
<?php
use \OAuth\Common\Token\TokenInterface;
use \OAuth\Common\Storage\Exception\TokenNotFoundException;
use \OAuth\Common\Storage\Exception\AuthorizationStateNotFoundException;
use \OAuth\Common\Storage\TokenStorageInterface;
use \sfStorage;
class Symfony1Storage implements TokenStorageInterface
{
@rcmachado
rcmachado / install.sh
Last active August 29, 2015 14:06
Install my boxen
#!/bin/sh
# Install & configure boxen
SKIP_ENCRYPTION="--no-fde"
BOXEN_REPOSITORY="https://github.com/rcmachado/my-boxen"
sudo mkdir -p /opt/boxen
sudo chown ${USER}:staff /opt/boxen
git clone ${BOXEN_REPOSITORY} /opt/boxen/repo
cd /opt/boxen/repo
@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 / 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() {
@rcmachado
rcmachado / jquery.selectall.js
Created May 17, 2010 13:55
A simple jQuery plugin that selects all options on a <select multiple>
(function ($){
$.fn.selectAll = function (selector) {
var sel = selector || 'option';
$(sel, this).each(function () {
if (this.disabled) {
this.selected = false;
} else {
this.selected = true;
}