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
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
God.watch do |w| | |
w.uid = "git" | |
w.gid = "git" | |
w.name = "camo" | |
w.pid_file = "/data/camo/tmp/camo.pid" | |
w.interval = 30.seconds | |
w.env = { | |
"PORT" => '8080', | |
"CAMO_KEY" => '0x24FEEDFACEDEADBEEFCAFE' |
flashAvail({ waitFor: 10000 }) | |
.done( function(result){ | |
if(result.flashBlocked === false){ | |
// do whatever you need flash for | |
} else { | |
// flash is installed but blocked. present messaging | |
alert('Oops!', | |
'It appears that Flash is being blocked. \ | |
Flash is required for Grill Circle and Facebook. \ | |
Please enable it and refresh the page.'); |
require 'net/http' | |
require 'xmlsimple' | |
url = "http://www.user-agents.org/allagents.xml" | |
xml_data = Net::HTTP.get_response(URI.parse(url)).body | |
data = XmlSimple.xml_in(xml_data) | |
agents = data['user-agent'].select{|agent| type = agent["Type"].first; type.include?("R") || type.include?("S")} | |
agent_names = agents.collect {|agent| agent["String"].first} |
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
Hi David, | |
I came across your profile online and wanted to reach out about Development | |
Opportunities here at Groupon. The company is growing, and we're always | |
looking for folks with solid skills that can make positive contribution to | |
our continued success. Any chance you'd be open to a quick conversation | |
about opportunities, or for any possible networking potential? If so, let me | |
know when you're free and we can set up a time to chat. Also, if you are | |
interested, it would be great if you could forward a current resume over | |
that I can take a look at. I look forward to hearing back from you! Please | |
let me know if you have any questions. |
# Renders an ItemContainer as a <ul> element and its containing items as <li> elements. | |
# Prepared to use inside the topbar of Twitter Bootstrap http://twitter.github.com/bootstrap/#navigation | |
# | |
# Register the renderer and use following code in your view: | |
# render_navigation(level: 1..2, renderer: :bootstrap_topbar_list, expand_all: true) | |
class BootstrapTopbarList < SimpleNavigation::Renderer::Base | |
def render(item_container) | |
if options[:is_subnavigation] | |
ul_class = "dropdown-menu" |
Blog post here