This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> config.authentication.username | |
=> "[email protected]@" | |
>> config.authentication.password | |
=> "myhackproofpassword" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
STDOUT.sync = true | |
require 'queue' | |
start_time = Time.now.to_i | |
msg = 0 | |
queue = Queue.new("testing") | |
queue.subscribe do |obj| | |
msg += 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
# |
OlderNewer