Skip to content

Instantly share code, notes, and snippets.

View javier's full-sized avatar

javier ramírez javier

View GitHub Profile
# You put this code at the init.rb file of your plugin, so it will be reloaded in development
# mode as your regular models and so on
Dependencies.load_once_paths.delete(File.expand_path(File.dirname(__FILE__))+'/lib')
namespace :initialize do
desc "initialize users"
task :users => :environment do
u=User.find_or_initialize_by_email "[email protected]"
u.password='blabla'
u.save
end #task do
end
yahoo mail
ActionMailer::Base.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "smtp.mail.yahoo.com",
:port => 25,
:domain => "yahoo.es",
:user_name => "supercoco9",
:password => "TU_PASSWORD",
:authentication => :login
def twitter_me
language=(user && !user.language.blank?) ? user.language : LocalText.default_language
translated_type=LocalText.text(language,:listing_types,listing_type.to_sym)
final_message="##{translated_type} http://#{HOST}/listings/#{self[:id]} #{message}"
twit=Twitter::Base.new TWITTER_USER, TWITTER_PASSWORD
twit.update "#{final_message[0,130]}..."
end
We couldn’t find that file to show.
/* -----------------------------------------------------------------------
Blueprint CSS Framework 0.8
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
/* -----------------------------------------------------------------------
Blueprint CSS Framework 0.8
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
/* -----------------------------------------------------------------------
Blueprint CSS Framework 0.8
http://blueprintcss.org
* Copyright (c) 2007-Present. See LICENSE for more info.
* See README for instructions on how to use Blueprint.
* For credits and origins, see AUTHORS.
* This is a compressed file. See the sources in the 'src' directory.
require 'irb/completion'
ARGV.concat [ "--readline", "--prompt-mode", "simple" ]
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
begin
# load wirble
require "rubygems"
module RouteTranslation
mattr_accessor :translations
mattr_accessor :reverse_translations
rf=File.join(RAILS_ROOT,'config','route_translation.yml')
self.translations=YAML.load_file(rf)
self.reverse_translations=Hash.new
translations.keys.each do |key|
self.reverse_translations.merge! translations[key].invert