Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Only files under 25 MB can be previewed with the Google Drive viewer.
Google Drive viewer helps you preview over 16 different file types, listed below:
// easing functions http://goo.gl/5HLl8 | |
Math.easeInOutQuad = function (t, b, c, d) { | |
t /= d/2; | |
if (t < 1) { | |
return c/2*t*t + b | |
} | |
t--; | |
return -c/2 * (t*(t-2) - 1) + b; | |
}; |
// ---- | |
// Sass (v3.3.0.rc.1) | |
// Compass (v0.13.alpha.7) | |
// ---- | |
=e($name) | |
@at-root #{&}__#{$name} | |
@content | |
=m($name) | |
@at-root #{&}--#{$name} |
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.clean_with(:truncation) | |
end | |
config.before(:each) do | |
DatabaseCleaner.strategy = :transaction | |
end | |
config.before(:each, js: true) do |
List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.
http://www.w3.org/TR/WebCryptoAPI/
This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.
#!/usr/bin/env ruby | |
# generate a single sentence from a canonical form | |
# canonical sentence is a multi sentences combined in one | |
# form, generator will generate a sentence from it randomly | |
# based on the form, for example: | |
# "Hello [Emad|Elsaid]" , may generate "Hello Emad" or | |
# "Hello Elsaid" the result is random. | |
# also you could nest [] inside each other to gain a multi level | |
# canonical sentence example: | |
# "[[Hi|Hello] [Emad|elsaid] | good [morning|night] sir]" |