View MLS.rb
require 'cgi'
require 'uri'
require 'net/http'
require 'open-uri'
require 'nokogiri'
puts "Please copy/paste the MLS link provided by your realtor:"
url = gets().chomp
uri = URI(url)
View Round borders
.round {
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
border-radius: 10px;
View Ruby: Rspec
rails generate rspec:install
View Ruby
# -- Look at the name "add password to the table Users" with a encrypted_password column
# rails generate migration add_password_to_users encrypted_password:string
class AddPasswordToUsers < ActiveRecord::Migration
def self.up
add_column :users, :encrypted_password, :string
def self.down
View Ruby: Uniqueness Key
# rails generate migration add_email_uniqueness_index
class AddEmailUniquenessIndex < ActiveRecord::Migration
def self.up
# add_index to :users. to :email, add a unique constriction.
add_index :users, :email, :unique => true
def self.down
remove_index :users, :email
View rails.rb
This is courtesy of:
This is ONLY for rails3 and does not work with earlier versions.
# All you have to do to get WEBrick running in SSL is modify the script/rails file and add the following lines (above the APP_PATH variable declaration):
# Please modify the :SSLPrivateKey and :SSLCertificate to point at the right location.
View gist:471723
//Load from the dictionary of colors.
NSString *key;
for (key in colors) {
//Do something with the key
NSArray * a = [colors valueForKey:key];
View InterfaceAddon.lua
mBSpecs = {};
mBSpecs.panel = CreateFrame( "Frame", "mBindingSpecs", UIParent );
-- Register in the Interface Addon Options GUI
-- Set the name for the Category for the Options Panel = "mBindingSpecs";
--mBSPecs.parent = "mBindings";
-- Add the panel to the Interface Options