require 'gmail'
Gmail.new(username, password) do |gmail|
# ...do things...
end
passports = { | |
_generic: /^(\b([A-Za-z]\s*){1,2}\s*(\d\s*){7})/, | |
austria: /^[A-z] ?[0-9]{7}$/, | |
belgium: /^[A-z]{2}[0-9]{6}$/, | |
bulgaria: /^[0-9]{9}$/, | |
croatia: /^[0-9]{9}$/, | |
cyprus: /^[A-z][0-9]{6,8}$/, | |
czech: /^[0-9]{8}$/, | |
denmark: /^[0-9]{9}$/, | |
estonia: /^[A-z][0-9]{7}$/, |
[ | |
"001 - Banco do Brasil", | |
"003 - Banco da Amazônia", | |
"004 - Banco do Nordeste", | |
"021 - Banestes", | |
"025 - Banco Alfa", | |
"027 - Besc", | |
"029 - Banerj", | |
"031 - Banco Beg", | |
"033 - Banco Santander Banespa", |
#!/usr/bin/env bash | |
# Setup a ubuntu 12.04 LTS machine with nginx, unicorn, ruby 1.9.3 | |
# RUN: curl -L http://goo.gl/M8SXl | bash | |
mkdir ~/server ; cd ~/server | |
wget https://github.com/gabrielengel/chef-ubuntu/tarball/master | |
tar -zxf master | |
cd gab* | |
mv dna.aws-sample.json dna.json |
// Editor specific listener | |
editor.on("aftercommand:composer", resize); // Set bold, italic, etc | |
editor.on("change_view", resize); // Change wysi/source view | |
// Typing listeners | |
editor.on("newword:composer", resize); // Only way to observe on firefox | |
editor.on("undo:composer", resize); | |
editor.on("paste", resize); | |
iframeBody.addEventListener('keyup', resize, false); | |
iframeBody.addEventListener("keydown", resize, false); |
/** | |
* @license wysihtml5 v0.4.0pre | |
* https://github.com/xing/wysihtml5 | |
* | |
* Author: Christopher Blum (https://github.com/tiff) | |
* | |
* Copyright (C) 2012 XING AG | |
* Licensed under the MIT license (MIT) | |
* | |
*/ |
/* | |
wysihtml5 v0.4.0pre + autoresize On Chrome | |
https://github.com/xing/wysihtml5 | |
Author: Christopher Blum (https://github.com/tiff) | |
Copyright (C) 2012 XING AG | |
Licensed under the MIT license (MIT) | |
Rangy, a cross-browser JavaScript range and selection library |
def symbol_array_from_string(value) | |
regex = /\[((:([^ ,\]])+) *,{0,1} *)+\]/ | |
return value unless value =~ regex | |
value.scan(/:[^ ,\]]+/).map{|v| v.gsub(/^:/,'').to_sym} | |
end | |
result = symbol_array_from_string("[:a, :apple,:dog]") | |
result == [:a, :apple, :dog] |
#!/usr/bin/env rake | |
clone = { | |
db_host: "user@server", | |
rdbms: "postgresql", # postgresql or mysql | |
prod_db: "db", | |
prod_user: "user", | |
prod_pass: "pass", | |
dev_db: "localdb", | |
dev_user: "user", |
# encoding : utf-8 | |
# | |
# Author: Gabriel Engel | |
# Based on: https://github.com/rackspace/cloudfiles | |
# | |
require 'rubygems' | |
require 'cloudfiles' | |
# Configure Here |