This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------------------------------------------------------------------- | |
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------------------------------------------------------------------- | |
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ----------------------------------------------------------------------- | |
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
OlderNewer