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 'net/http' | |
require 'hpricot' | |
require 'cgi' | |
require 'uri' | |
require 'cgi' | |
require 'openssl' | |
require 'base64' | |
module Chebyte | |
class OauthUtil |
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
rename_column :users, :crypted_password, :encrypted_password | |
add_column :users, :confirmation_token, :string, :limit => 255 | |
add_column :users, :confirmed_at, :timestamp | |
add_column :users, :confirmation_sent_at, :timestamp | |
execute "UPDATE users SET confirmed_at = created_at, confirmation_sent_at = created_at" | |
add_column :users, :reset_password_token, :string, :limit => 255 | |
add_column :users, :remember_token, :string, :limit => 255 | |
add_column :users, :remember_created_at, :timestamp |
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 'rubygems' | |
require 'youtube_it' | |
#first get the token user in this link | |
https://www.google.com/accounts/AuthSubRequest? | |
next=callback url | |
&scope=http%3A%2F%2Fgdata.youtube.com | |
&session=1 | |
&secure=0 |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'daemon-spawn' | |
RAILS_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..')) | |
class DelayedJobWorker < DaemonSpawn::Base | |
def start(args) | |
ENV['RAILS_ENV'] ||= args.first || 'development' |
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 'rubygems' | |
require 'youtube_it' | |
KEY = "consumer key" | |
SECRET = "consumer secret" | |
#with oauth | |
client = YouTubeIt::OAuthClient.new(:consumer_key => KEY, :consumer_secret => SECRET, :dev_key => "devkey") | |
client.authorize_from_access("user_token","user_token_secret") |
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
####lib#### | |
require 'net/http' | |
require 'hpricot' | |
require 'cgi' | |
require 'uri' | |
require 'cgi' | |
require 'openssl' | |
require 'base64' | |
module Chebyte |
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
== DB ROCKET | |
A simple database agnostic import/export app to transfer data to/from a remote database from Ruby on Rails APP based on TAPS. | |
== Usage: Server | |
The first thing that you need is create yaml configuration for add the data for access to the server, so into your app rails run: | |
# db_rocket create |
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 'yaml' | |
namespace :app do | |
RE_COLOR_RGB = Regexp.new('(rgb[\s]*\([\s-]*[\d]+(\.[\d]+)?[%\s]*,[\s-]*[\d]+(\.[\d]+)?[%\s]*,[\s-]*[\d]+(\.[\d]+)?[%\s]*\))', Regexp::IGNORECASE) | |
RE_COLOR_HEX = /(#([0-9a-f]{6}|[0-9a-f]{3})([\s;]|$))/i | |
RE_COLOR_NAMED = /([\s]*^)?(aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|transparent)([\s]*$)?/i | |
RE_COLOR = Regexp.union(RE_COLOR_RGB, RE_COLOR_HEX, RE_COLOR_NAMED) | |
@results = [] |
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
== Installation | |
If you haven't already, install Hone's herocutter plugin: | |
$ heroku plugins:install git://github.com/hone/heroku_herocutter.git | |
After that, a simple | |
$ heroku plugins:install jammit |