This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| (ns sieve | |
| (:use clojure.test)) | |
| (defn square [x] (* x x)) | |
| (defn seq-contains? [ls x] | |
| (boolean (some #(= x %) ls))) | |
| (defn multiple-of? [product divisor] | |
| (and (= 0 (mod product divisor)) |
| .mouse, #preview{ | |
| position: absolute; | |
| background-repeat: no-repeat; | |
| height: 22px; | |
| min-width: 15px; | |
| z-index: 100; | |
| } | |
| .mouse{ | |
| background-image: url('../images/cursor.png'); |
| // need to mess with document.defaultAction = true/false to block default action; | |
| // idea from http://www.quirksmode.org/js/keys.html | |
| window.onload = function () { | |
| var keyCodeUp, | |
| keyCodeDown, | |
| currentIndex, | |
| fonts, | |
| currentFont, | |
| setGlobalFont, |
| def tip(msg); puts; puts msg; puts "-"*100; end | |
| # | |
| # 30 Ruby 1.9 Tips, Tricks & Features: | |
| # http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
| # | |
| tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
| tip "Ruby 1.9 supports named captures in regular expressions!" |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
RubyConf 2011 | 2011-09-29 | Gregory Moeck (@gregmoeck)
| require 'openssl' | |
| require 'base64' | |
| rsa = OpenSSL::PKey::RSA.new(2048) | |
| modulus = rsa.n | |
| exponent = rsa.e | |
| oid = OpenSSL::ASN1::ObjectId.new("rsaEncryption") | |
| alg_id = OpenSSL::ASN1::Sequence.new([oid, OpenSSL::ASN1::Null.new(nil)]) | |
| ary = [OpenSSL::ASN1::Integer.new(modulus), OpenSSL::ASN1::Integer.new(exponent)] |
| /**********************************************/ | |
| /* | |
| /* Tomorrow Skin by Ben Truyman - 2012 | |
| /* | |
| /* Based on Chris Kempson's Tomorrow Theme: | |
| /* https://github.com/ChrisKempson/Tomorrow-Theme | |
| /* | |
| /* Inspired by Darcy Clarke's blog post: | |
| /* http://darcyclarke.me/design/skin-your-chrome-inspector/ | |
| /* |
| # SSL self signed localhost for rails start to finish, no red warnings. | |
| # 1) Create your private key (any password will do, we remove it below) | |
| $ openssl genrsa -des3 -out server.orig.key 2048 | |
| # 2) Remove the password | |
| $ openssl rsa -in server.orig.key -out server.key |