http://help.github.com/remotes/
If you cloned a repo git will create a remote named “origin” automatically.
list remotes git remote
| provincias = ['Alava','Albacete','Alicante','Almería','Asturias','Avila','Badajoz','Barcelona','Burgos','Cáceres', | |
| 'Cádiz','Cantabria','Castellón','Ciudad Real','Córdoba','La Coruña','Cuenca','Gerona','Granada','Guadalajara', | |
| 'Guipúzcoa','Huelva','Huesca','Islas Baleares','Jaén','León','Lérida','Lugo','Madrid','Málaga','Murcia','Navarra', | |
| 'Orense','Palencia','Las Palmas','Pontevedra','La Rioja','Salamanca','Segovia','Sevilla','Soria','Tarragona', | |
| 'Santa Cruz de Tenerife','Teruel','Toledo','Valencia','Valladolid','Vizcaya','Zamora','Zaragoza'] | |
| comunidades = ["Andalucía", "Aragón", "Canarias", "Cantabria", "Castilla y León", "Castilla-La Mancha", "Cataluña", "Ceuta", "Comunidad Valenciana", "Comunidad de Madrid", "Extremadura", "Galicia", "Islas Baleares", "La Rioja", "Melilla", "Navarra", "País Vasco", "Principado de Asturias", "Región de Murcia"] |
| instalar una version especifica de rails: | |
| sudo gem install rails --version=2.1.2 | |
| sudo gem install rails -v=2.1.2 | |
| rake db:migrate:redo VERSION=20090506173825 | |
| rake db:migrate:down VERSION=20090506173825 | |
| rake db:migrate:up VERSION=20090506173825 |
| # metodo antiguo | |
| desc "Delete old sessions from database." | |
| task :delete_old_sessions => :environment do | |
| #puts "Removing old sessions from #{ENV['RAILS_ENV']} database" unless ENV['SILENT'] | |
| sesiones = CGI::Session::ActiveRecordStore::Session.find(:all, :conditions => ['updated_at < ?', 3.hours.ago]) | |
| sesiones.each {|s| s.destroy } | |
| end | |
| # para rails 2.3.5 | |
| desc "Borrar de la base de datos la sesiones que han expirado ." |
| class User < ActiveRecord::Base | |
| require 'digest/md5' | |
| validates_presence_of :email, :password | |
| def self.authenticate(email, password) | |
| User.find_by_email_and_password(email, Digest::MD5.hexdigest(password)) | |
| end | |
| def password=(password) |
| FECHAHORA=`date +%Y%m%d-%H%M` | |
| /usr/bin/mysqldump --opt -uUSER -pPASS -hlocalhost disolventes > /home/BACKUP_DIR/backup_bd_$FECHAHORA.sql | |
| gzip /home/BACKUP_DIR/backup_bd_$FECHAHORA.sql | |
| cp /home/BACKUP_DIR/backup_bd_??????01-0000.sql.gz /home/BACKUP_DIR_VIEJOS/ | |
| find /home/BACKUP_DIR -ctime +60 -exec rm \{} \; |
| # Convertir video avi a flv | |
| mencoder -forceidx -of lavf -oac mp3lame -lameopts abr:br=128 -srate 44100 -ovc lavc -lavcopts vcodec=flv:vbitrate=250:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -o video.flv video.avi |
| A backup of http://sites.google.com/site/redcodenl/creating-shazam-in-java-1 just in case | |
| Why is this necessary? Read http://sites.google.com/site/redcodenl/patent-infringement | |
| Please fork, tweet about, etc. | |
| ---- | |
| Creating Shazam in Java | |
| A couple of days ago I encountered this article: How Shazam Works | |
| This got me interested in how a program like Shazam works… And more importantly, how hard is it to program something similar in Java? |
http://help.github.com/remotes/
If you cloned a repo git will create a remote named “origin” automatically.
list remotes git remote
| body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, form, fieldset, input, textarea, p, blockquote, th, td { | |
| margin: 0; | |
| padding: 0; | |
| } | |
| table { | |
| border-collapse: collapse; | |
| border-spacing: 0; | |
| } |