Skip to content

Instantly share code, notes, and snippets.

View calas's full-sized avatar

Jorge Calás calas

  • RubiconMD Healthcare Inc.
  • United States
  • 13:04 (UTC -04:00)
View GitHub Profile
(defun sass-convert-region (beg end)
"Convierte la región seleccionada a código sass"
(interactive "r")
(let ((comando "/usr/local/bin/css2sass -s"))
(shell-command-on-region beg end comando (buffer-name) t)))
(defun sass-convert-buffer ()
"Convierte el buffer seleccionado a código sass"
(interactive)
(let ((nuevoarchivo
# MOST CODE AND IDEAS TAKEN FROM:
# http://www.igvita.com/2007/03/15/block-helpers-and-dry-views-in-rails/
module SidebarHelper
# Only need this helper once, it will provide an interface to convert a block into a partial.
# 1. Capture is a Rails helper which will 'capture' the output of a block into a variable
# 2. Merge the 'body' variable into our options hash
# 3. Render the partial with the given options hash. Just like calling the partial directly.
def block_to_partial(partial_name, options = {}, &block)
options.merge!(:body => capture(&block))
concat(render(partial_name, options), &block)
- sidebox do
= render @calendar
- sidebox(t(:'events.new_title')) do
- @event = @calendar.events.build
= render 'events/form'
- actions_box do
%li= link_to t(:'calendars.edit_title'), edit_calendar_path(@calendar)
%li= link_to t(:'events.index_title'), calendar_events_path(@calendar)
- calendar(:events => @calendar.events, :field => :dtstart) do |date, events|
- if events
%ul.events
- events.each do |event|
%li.event
= render event
- sidebox do
= render @calendar
jorge@chamonix:~/dev/qvitta/myBio/spree (0_8_99)$ rake spree:gem
(in /home/jorge/dev/qvitta/myBio/spree)
/home/jorge/dev/qvitta/myBio/spree/app/metal/create_admin_user.rb:7: warning: already initialized constant CONTINUE_CHAIN
........*....*...................****..*....***....***.***..*....***.........*.............................................................................
Pending:
StatesController should not allow deletion of a state from a default rails route (Not Yet Implemented)
./spec/controllers/states_controller_spec.rb:10
jorge@chamonix:~/dev/qvitta/myBio/spree (0_8_99)$ rake spree:gem
(in /home/jorge/dev/qvitta/myBio/spree)
/home/jorge/dev/qvitta/myBio/spree/app/metal/create_admin_user.rb:7: warning: already initialized constant CONTINUE_CHAIN
........*....*...................****..*....***....***.***..*....***.........*.............................................................................
Pending:
StatesController should not allow deletion of a state from a default rails route (Not Yet Implemented)
./spec/controllers/states_controller_spec.rb:10
#!/usr/bin/env ruby
require 'rubygems'
require 'cgi'
require 'uri'
require 'logger'
class UrlParser
attr_reader :url, :file, :line, :column
def initialize(url)
@url = CGI::unescape(url.gsub(/(emacs|txmt):\/\/open\?url=/, ''))
@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 / explanation.txt
Created October 21, 2009 15:05
Using git bisect in spree core
So...
$ rake test:functionals
It show the tests fails
I pick a commit that is not failing: f0c49b5213b974b97dcb7a1d089264708329ebcd
and...