Skip to content

Instantly share code, notes, and snippets.

#/ Contribution leaderboard
#/
#/ Get a leaderboard of contributions in your org
#/
#/ usage: $ env USERNAME=yourusername PASSWORD=yourpassword ORG=yourorgname ruby leaderboard.rb
require 'uri'
require 'net/https'
require 'json'
@chrismytton
chrismytton / .gitignore
Created February 17, 2012 23:11
bookmarklet creater
/node_modules
@chrismytton
chrismytton / license
Created January 5, 2011 21:42 — forked from defunkt/license
#!/bin/sh
# Usage: license
# Prints an MIT license appropriate for totin' around.
#
# $ license > MIT-LICENSE
set -e
echo "Copyright (c) `date +%Y` `git config --global user.name`"
echo '
Permission is hereby granted, free of charge, to any person obtaining
# Author: Pieter Noordhuis
# Description: Simple demo to showcase Redis PubSub with EventMachine
#
# Requirements:
# - rubygems: eventmachine, thin, cramp, sinatra, yajl-ruby
# - a browser with WebSocket support
#
# Usage:
# ruby redis_pubsub_demo.rb
#
window.onload = function () {
if (! document.querySelectorAll) { // Quick & Dirty way to tell the good browsers from the bad ones.
alert("Please upgrade your browser to view this site.");
}
};
// bookmarklet to introspect the source of current page
javascript:(function(d,h){h=d.documentElement.innerHTML;d.open();d.write('<pre>'+('<!DOCTYPE html><html>'+h+'</html>').replace(/[<>]/g,function(m){return{'<':'&lt;','>':'&gt;'}[m]})+'</pre>')})(document);