I hereby claim:
- I am orlando on github.
- I am orlando (https://keybase.io/orlando) on keybase.
- I have a public key whose fingerprint is D83C 56F0 986E 294C A631 0473 A692 3BDA F7BF BD00
To claim this, I am signing this object:
#!/usr/bin/ruby | |
require 'rss' | |
#this assumes you have a cookies.txt with destroyallsoftware.com cookies... later ill add a signin method.. | |
class Link | |
attr_accessor :link,:title,:date | |
def initialize(link,title,date) | |
@link = link |
module Session | |
def self.generate_timestamp | |
Time.now.strftime("%s") | |
end | |
def self.generate_nonce | |
rand(36**16).to_s(36) | |
end |
f.inputs "Product images" do | |
f.has_many :assets do |p| | |
p.input :asset, :as => :file, :label => "Image",:hint => p.object.asset.nil? ? p.template.content_tag(:span, "No Image Yet") : p.template.image_tag(p.object.asset.url(:thumb)) | |
p.input :_destroy, :as=>:boolean, :required => false, :label => 'Remove image' | |
end | |
end | |
f.inputs "Product details" do | |
f.input :category, :label => "Category", :hint => "Select one category" | |
f.input :height |
# blog post: | |
# Before using this initializer, you must set up Cancan. First, add the gem to your Gemfile: | |
# | |
# gem 'cancan' | |
# | |
# Next, generate and edit an Ability class: | |
# | |
# rails generate cancan:ability | |
# |
auth = function(params) { | |
} | |
module.exports = auth |
var message = new MailMessage(); | |
message.To.Add("user@example.com"); | |
message.To.Add("user2@example.com"); | |
message.From = new MailAddress("test@example.com"); | |
message.Subject = "Test"; | |
message.Body = "Test"; | |
var client = new SmtpClient("localhost", 25); |
require 'active_record' | |
require 'database_cleaner' | |
connection_info = YAML.load_file("config/database.yml")["test"] | |
ActiveRecord::Base.establish_connection(connection_info) | |
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.strategy = :transaction | |
DatabaseCleaner.clean_with(:truncation) |
var teamboxChatSound = function teamboxChatSound () { | |
var ping, chatBody, observer, base64string, hidden, visibilityChange; | |
base64String = "data:audio/wav;base64,UklGRoAaAABXQVZFZm10IBAAAAABAAEAESsAABErAAABAAgAZGF0YVwaAAB9fICEg355en2ChYF8e35/fX59foKDfHd6gIODgHp4fX99fYCAgIF/f4F9dHSAkpiFZlNjj7OlcEpYjrKWXlODt6xmMkqa1rZeKk2l2adNMG7FzXkvQJjbul8mT7LcoUYmbs3NfDE7mdquTyVfwduSNyl/1cdsKEuw2pM2LYXdyWQeP6jmrEEhb9TRZhtEruyuOxlmzeKCIzOW4bpKHV7C444pKobdyl0bSq7koDYrftLIYR9LrOGkOiNvy9Z7JDmc3KlBInHR03EaOKXkrj8ZbNHUdx80oeS2TRVaxtqKLTCV2rRWIFzD2I0xK4vcxWUfTLbcmzophdnGayRIr92kRihvys5/NkGZ0KhXMWa6yYY+PYnKs208V6O/lVhEdK6xhVdVgqSXdFtqj52Ka1xzkpuKbV90jJWKbmV3i5WEamd8lp1/X196nqJ8XWSHqJdpVWuZsI5bTHKpsYBRVoq0nGJJaae7iExGfry3cT9TmMWcUj1stcSBQUOEyLVkN1amzZRJO3TAv3Q6RZTSqFY0X7XMhEFBhMq0ZzpTo8uVTz1yvb91OkmVzapWMV+wyotBPH/Gu2YyUp/PnUU2cr3IeDNFkNKyUSxfs9SJNTqAyb1gL1elz5ZBOXW4vnI8VpG+n1NHd6i0d0JckbOaWFCAoqRwRWudrJFUToWoo3dMapyljF5VhKWffFdmkaGTbl1+mpeAZ3GRmYhzbIOXj4BxdYuPgXh4iZOBc3SClY13cHaIlIR1c4CUkHdqc46ch2tkepibgWZjgZyWeGBuj5yLaV9+m5 |
// Poor's man html Validator. | |
// https://gist.github.com/orlando/6251395 | |
function validateHtml (htmlString) { | |
var htmlString, divElm, docFrag, docFragHtml; | |
htmlString = htmlString.replace(/ +/g, " ").toLowerCase(); | |
htmlString = htmlString.replace(/\s*\/\s*>/g, ">"); | |
divElm = document.createElement('div'); | |
docFrag = document.createDocumentFragment(); | |
docFrag.appendChild(divElm); | |
docFrag.querySelector('div').innerHTML = htmlString; |
I hereby claim:
To claim this, I am signing this object: