Skip to content

Instantly share code, notes, and snippets.

View PabloC's full-sized avatar

PabloC PabloC

View GitHub Profile
@PabloC
PabloC / incluir_empty_dirs_with_gitignore
Created August 18, 2008 17:29
Include Empty Dirs on GIT Repo
Here's a handy snippet for touching a .gitignore file in all empty
directories except the .git folder itself:
find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec
touch {}/.gitignore \;
@PabloC
PabloC / gist:6037
Created August 18, 2008 17:31
Ping to Search Engines
# Source: http://seventytwo.co.uk/posts/how-to-reach-enlightenment-and-get-your-site-indexed-by-search-engines
# Switch output on or off
OUTPUT = true
# Sitemap URL
SITEMAP_URL = 'http://www.example.com/sitemap.xml'
# Search engine pings configuration
pings_config = [
mkdir -p ~/Downloads/src
cd ~/Downloads/src
# Set options since we don't have GNU gettext installed
export TCL_PATH=`which tclsh`
export NO_MSGFMT=1
export GIT_VERSION='1.6.0.2'
# Get and install git
curl -O "http://kernel.org/pub/software/scm/git/git-$GIT_VERSION.tar.bz2"
CREATE TABLE "aeropuertos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "descripcion" varchar(255) DEFAULT NULL NULL, "country_id" integer DEFAULT NULL NULL, "province_id" integer DEFAULT NULL NULL, "city_id" integer DEFAULT NULL NULL, "created_at" datetime DEFAULT NULL NULL, "updated_at" datetime DEFAULT NULL NULL);
CREATE TABLE "cities" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "description" varchar(255) DEFAULT NULL NULL, "province_id" integer DEFAULT NULL NULL, "created_at" datetime DEFAULT NULL NULL, "updated_at" datetime DEFAULT NULL NULL);
CREATE TABLE "countries" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "description" varchar(255) DEFAULT NULL NULL, "created_at" datetime DEFAULT NULL NULL, "updated_at" datetime DEFAULT NULL NULL);
CREATE TABLE "planes" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "codigo" varchar(255) DEFAULT NULL NULL, "cant_tripulacion" integer DEFAULT NULL NULL, "cant_asientos_turista" integer DEFAULT NULL NULL, "cant_asientos_business" integer DEFA
# Rails
alias ss="script/server"
alias sc="script/console"
alias sq="sqlite3 db/development.sqlite3"
alias sqldev="sqlite3 db/development.sqlite3"
alias svn_add_all="svn st --ignore-externals | grep ^? | sed 's/\?/svn add/' | sh"
alias svn_del_all="svn st --ignore-externals | grep ^? | sed 's/\!/svn del/' | sh"
alias cdp="cd $HOME/workspace/proyectos"
alias remove_svn="find . -type d -name .svn | xargs rm -rf"
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#
@PabloC
PabloC / Usage
Created April 6, 2010 23:04 — forked from dougal/Usage
>> config.authentication.username
=> "bob@example.com@"
>> config.authentication.password
=> "myhackproofpassword"
STDOUT.sync = true
require 'queue'
start_time = Time.now.to_i
msg = 0
queue = Queue.new("testing")
queue.subscribe do |obj|
msg += 1
@PabloC
PabloC / config.js
Created July 28, 2010 18:37 — forked from eric1234/config.js
Es Cool, un editor simil al de basecamp
CKEDITOR.lang.load('en', 'en', function() {
CKEDITOR.lang['en']['numberedlist'] = 'Numbers';
CKEDITOR.lang['en']['bulletedlist'] = 'Bullets';
CKEDITOR.replace('project_description', {
toolbar: [['Bold', 'Italic', '-', 'NumberedList', 'BulletedList']],
toolbarCanCollapse: false,
resize_enabled: false,
customConfig: '',
removePlugins: 'elementspath'
});
@PabloC
PabloC / hack.sh
Created March 31, 2012 15:33 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#