Skip to content

Instantly share code, notes, and snippets.

View fernandoflorez's full-sized avatar
🍺

Fernando Flórez fernandoflorez

🍺
View GitHub Profile
# git bash auto-completion
source `brew --prefix git`/etc/bash_completion.d/git-completion.bash
# latest versions of git has the prompt stuff on an extra file
__git_prompt_file=`brew --prefix git`/etc/bash_completion.d/git-prompt.sh
if [ -f "$__git_prompt_file" ]
then
source $__git_prompt_file
fi
@fernandoflorez
fernandoflorez / gist:3485409
Created August 27, 2012 04:01
Attempt to create memoize decorator with namespace versioning
import functools
import cPickle
import hashlib
def cache(mem_client, *ns):
def _cache(method):
@functools.wraps(method)
def wrapper(self, *args, **kwargs):
_ns = []
@fernandoflorez
fernandoflorez / gist:639136
Created October 21, 2010 19:26
Taken from google chrome's plugin page source code
/**
* This variable structure is here to document the structure that the template
* expects to correctly populate the page.
*/
var pluginDataFormat = {
'plugins': [
{
'name': 'Group Name',
'description': 'description',
'version': 'version',
@fernandoflorez
fernandoflorez / Base64-Base36-sample.as
Created August 17, 2010 23:58
funciton-aslib Base64 and Base36 sample
import funciton.utils.Base64;
trace (Base64.encode("hello world!")); // aGVsbG8gd29ybGQh
trace (Base64.decode("aGVsbG8gd29ybGQh")); // hello world!
import funciton.utils.Base36;
trace (Base36.encode(999999999)); // GJDGXR
trace (Base36.decode("GJDGXR")); // 999999999
@fernandoflorez
fernandoflorez / installFFMPEG-libx264.sh
Created February 16, 2010 16:11
install script for ffmpeg with libx264 support
yum -y update
yum -y remove ffmpeg x264 faad2 faad2-devel
rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
yum -y install wget gcc gcc-c++ automake autoconf libtool yasm git zlib-devel libmad-devel libvorbis-devel libtheora-devel lame-devel faac-devel xvidcore-devel freetype-devel make bzip2
cd /usr/local/src/
wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
tar zxf faad2-2.7.tar.gz
cd faad2
autoreconf -vif
./configure
@fernandoflorez
fernandoflorez / alert_email_address_gitorious.patch
Created February 9, 2010 01:33
created a property to set a custom alert email address for gitorious
From b3c0898e7d4751dd3dcf7d0cecace36a58321682 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fernando=20Fl=C3=B3rez?= <[email protected]>
Date: Mon, 8 Feb 2010 20:32:13 -0500
Subject: [PATCH] created a property to set a custom alert email address
---
app/models/mailer.rb | 8 ++++----
config/gitorious.sample.yml | 2 ++
2 files changed, 6 insertions(+), 4 deletions(-)
@fernandoflorez
fernandoflorez / nginx_sendfile_gitorious.patch
Created February 9, 2010 01:24
change for gitorious to make the archive tarball download work properly under nginx
From b26ad104cffe9e6c37bb141c040213e4f497783a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fernando=20Fl=C3=B3rez?= <[email protected]>
Date: Mon, 8 Feb 2010 20:20:19 -0500
Subject: [PATCH] Nginx sendfile config.
---
app/controllers/trees_controller.rb | 2 +-
config/gitorious.sample.yml | 6 ++++++
2 files changed, 7 insertions(+), 1 deletions(-)