Public Gists by diasjorge

Gravatar
Tue Nov 24 06:34:59 -0800 2009
1
2
3
def gem_list(bin)
  a = %x(#{bin} list)
  gems = []
Gravatar
Thu Nov 12 01:55:08 -0800 2009
1
2
3
locales = Lang.all(:select => "code")
applications = %w(jobs housing classifieds community account)
locations = Location.all(:select => "id")
Gravatar
Fri Nov 06 04:50:17 -0800 2009
1
2
3
(defun rinari-generate-tags()
  (interactive)
  (let ((my-tags-file (concat (rinari-root) "TAGS"))
Gravatar
Wed Oct 21 07:20:18 -0700 2009
1
2
3
desc "Transform translations"
task :tt => :environment do
  Translation.transaction do
Gravatar
Wed Oct 21 07:19:26 -0700 2009
1
2
3
trans "(use a new line for each item)","common.message.use_new_line"
trans "About me","common.about_me"
trans "Accept Invitation","common.accept_invitation"
Gravatar
Fri Oct 02 04:16:16 -0700 2009
1
2
3
f = UserFeed.find_by_name("HomeCompany")
languages = Lang.prepared
c = ActionController::Base.new
Gravatar
Wed Sep 30 03:44:05 -0700 2009
1
2
3
require File.dirname(__FILE__) + '/../../../spec_helper'
 
describe Common::Deploy::ImportTranslations do
Gravatar
Mon Sep 28 06:13:57 -0700 2009
1
2
3
gem_cmd = "/opt/ruby-enterprise/bin/ruby /opt/ruby-enterprise/bin/gem --no-ri --no-rdoc"
a = %x(gem list)
gems = []
Gravatar
Fri Sep 11 02:29:59 -0700 2009
1
2
3
#!/usr/bin/env ruby
 
# To install:
Gravatar
Thu Jun 11 10:50:02 -0700 2009
1
2
# Find files and replace text
find . -name '*.rb' | xargs sed 's/Test::Unit::TestCase/ActiveSupport::TestCase/'
Gravatar
Tue Jun 09 16:08:47 -0700 2009
1
2
3
(defun insert-path ()
  "Inserts a path into the buffer with completion"
  (interactive)
Gravatar
Thu Apr 23 16:51:58 -0700 2009
1
2
3
// Based on apidock.org Ubiquity Search: http://gist.github.com/8132
CmdUtils.CreateCommand(
  {
Gravatar
Sun Mar 22 19:49:05 -0700 2009
1
git log --pretty=short | grep Author: | awk '{print $2}' | sort | uniq
Gravatar
Sun Mar 22 19:45:50 -0700 2009
1
2
3
class RemoteLinkRenderer < WillPaginate::LinkRenderer
  def prepare(collection, options, template)
    @remote = options.delete(:remote)
Gravatar
Mon Mar 16 11:34:42 -0700 2009
1
2
3
namespace :adva do
  namespace :i18n do
    #Define locales root
Gravatar
Thu Mar 05 16:23:38 -0800 2009
1
2
3
unless ENV['INSIDE_EMACS']
  # load libraries
  require 'rubygems'
Gravatar
Fri Feb 20 05:01:27 -0800 2009
1
2
3
(defun haml-convert-rhtml-file (rhtmlFile hamlFile)
  "Convierte un fichero rhtml en un haml y abre un nuevo buffer"
  (interactive "fSelect rhtml file: \nFSelect output (haml) file: ")
Gravatar
Thu Jan 22 08:08:06 -0800 2009
1
2
3
# This is what I try in console
1.upto(1500) do |i|
  MiddleMan.worker(:performance_worker).
Gravatar
Mon Dec 15 06:32:26 -0800 2008
1
2
3
def create_thumbnail(addendum, new_width, new_height)
    width, height = get_resolution
    logger.debug "width=#{width}, height=#{height}"