Skip to content

Instantly share code, notes, and snippets.

View calas's full-sized avatar

Jorge Calás calas

  • RubiconMD Healthcare Inc.
  • Santiago de Compostela, A Coruña, Spain
View GitHub Profile
@calas
calas / firefox_emacs_handler.rb
Created September 11, 2009 09:51 — forked from diasjorge/FirefoxEmacsHandler
Firefox emacs handler for textmate txmt:// protocol
#!/usr/bin/env ruby
# To install:
# about:config
# create a new boolean network.protocol-handler.external.txmt with value true
# create a new string network.protocol-handler.app.txmt with value path to the script
require 'rubygems'
require 'cgi'
require 'uri'
namespace :spree do
desc "Export Products to CSV File"
task :export_products => :environment do
require 'fastercsv'
products = Product.find(:all)
puts "Exporting to #{RAILS_ROOT}/products.csv"
FasterCSV.open("#{RAILS_ROOT}/products.csv", "w") do |csv|
csv << ["id", "name", "description","sku", "master_price" ]
@calas
calas / chef_solo_bootstrap.sh
Created April 22, 2012 19:55 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.bz2
tar -xvjf ruby-1.9.3-p194.tar.bz2
cd ruby-1.9.3-p194/
./configure --prefix=/usr/local
make
@calas
calas / gist:3789591
Created September 26, 2012 18:08 — forked from olistik/gist:2627011
Ubuntu 12.04 setup (rbenv, janus, postgres)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git
  • Copy/paste from the command line:
sudo apt-get install xclip