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
# lib/tasks/import.rake | |
# Import data from CSV fixtures | |
require 'csv' | |
require 'active_record/fixtures' | |
namespace :db do | |
namespace :import do | |
task :cities => :environment do | |
puts "Important ciutats..." |
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
# Pasos para compilar ImageMagick e instalar RMagick en Debian | |
# Gracias a Ivan Belmonte (@ibelmonte) | |
# | |
# Instalar las dependencias de ImageMagick para poderlo compilar | |
sudo apt-get install libjpeg62-dev libbz2-dev libtiff4-dev libwmf-dev libz-dev libpng12-dev libx11-dev libxt-dev libxext-dev libxml2-dev libfreetype6-dev liblcms1-dev libexif-dev perl libjasper-dev libltdl3-dev graphviz gs-gpl pkg-config | |
# Compilar ImageMagick para que se pueda instalar luego RMagick, que requiere la versión 6.3+ y Debian incorpora la 6.2.x. | |
cd /usr/local/src | |
wget -c ftp://ftp.fu-berlin.de/unix/X11/graphics/ImageMagick/ImageMagick-6.4.1-10.tar.gz | |
tar zxvfp ImageMagick-6.4.1-10.tar.gz |
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
"name","iso_name","iso2","iso3","numcode" | |
"Antigua and Barbuda","ANTIGUA AND BARBUDA","AG","ATG",28 | |
"Bosnia and Herzegovina","BOSNIA AND HERZEGOVINA","BA","BIH",70 | |
"Cocos (Keeling) Islands","COCOS (KEELING) ISLANDS","CC","\N","\N" | |
"Congo, the Democratic Republic of the","CONGO, THE DEMOCRATIC REPUBLIC OF THE","CD","COD",180 | |
"Cote D'Ivoire","COTE D'IVOIRE","CI","CIV",384 | |
"Fiji","FIJI","FJ","FJI",242 | |
"French Southern Territories","FRENCH SOUTHERN TERRITORIES","TF","\N","\N" | |
"Heard Island and Mcdonald Islands","HEARD ISLAND AND MCDONALD ISLANDS","HM","\N","\N" | |
"Holy See (Vatican City State)","HOLY SEE (VATICAN CITY STATE)","VA","VAT",336 |
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
# Standard capistrano deploy.rb file | |
# by Emili Parreno - www.eparreno.com | |
# | |
# Knowledge | |
# http://www.capify.org/index.php/Documentation | |
# http://github.com/guides/deploying-with-capistrano | |
# http://wiki.brightbox.co.uk/docs:gemv2:repositories | |
set :application, 'myapp' | |
set :keep_releases, 3 |
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
He recibido este correo sobre la nueva ley de descargas de internet... | |
1. SUPUESTO | |
a) PEPE se descarga una canción de Internet. | |
b) PEPE decide que prefiere el disco original y va a El Corte Inglés a | |
hurtarlo. Una vez allí, y para no dar dos viajes, opta por llevarse toda | |
una discografía. La suma de lo hurtado no supera los 400 euros. | |
ACLARACIÓN: La descarga de la canción sería un delito con pena de 6 | |
meses a dos años. El hurto de la discografía en El Corte Inglés ni | |
siquiera sería un delito, sino una simple falta (art. 623.1 del Código |
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/environments/test.rb | |
ActionMailer::Base.delivery_method = :test | |
# spec/models/mailer_spec.rb | |
describe Mailer do | |
before(:each) do | |
ActionMailer::Base.deliveries = [] | |
end | |
it 'should send some random email' do |
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
!.*/(\.[^/]*|public\/images|doc\/app|vendor\/rails|cache|tmp|log|logs|system|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ |
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
export PATH=/opt/local/lib/postgresql83/bin:${PATH} | |
env ARCHFLAGS="-arch x86_64" gem install pg |
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
task :update_counters => :environment do | |
Tag.reset_column_information | |
Tag.all.each do |t| | |
Tag.update_counters(t.id, :taggings_count => t.taggings.count) | |
end | |
end |
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
!(.\.sqlite3|/\.(?!htaccess)[^/]*|\.(tmproj|o|pyc)|/Icon\r|/svn-commit(\.[2-9])?\.tmp)$ |
OlderNewer