This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Just run this script you can adjust the value of the speed. Thanks to the creator! nicknorton.net | |
bash <(curl -s nicknorton.net/mousewheel.sh) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "json" | |
require "digest" | |
require "logger" | |
class SlowQueryLogger | |
def initialize(output = nil, opts = {}) | |
# will log any query slower than 500 ms | |
@threshold = opts.fetch(:threshold, "500").to_i | |
@logger = Logger.new(output || STDOUT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lets say this is the response we receive | |
response = { | |
"results" => { | |
"total_count" => 15, | |
"per_page" => 100, | |
"companies" => [ | |
{ | |
"company" => { | |
"name" => "Foo Bar Ltd", | |
"registered_address" => { ... }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g_LastCtrlKeyDownTime := 0 | |
g_AbortSendEsc := false | |
g_ControlRepeatDetected := false | |
*CapsLock:: | |
if (g_ControlRepeatDetected) | |
{ | |
return | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Example usage: phantomjs screenshot.js http://yahoo.com /tmp/yahoo.png | |
// | |
var system = require('system'); | |
var url = system.args[1]; | |
var filename = system.args[2]; | |
var page = new WebPage(); | |
page.open(url, function (status) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$.waypoints.settings.scrollThrottle = 30; | |
try { | |
mpmetrics = new MixpanelLib("<api_key>"); | |
} catch(err) { | |
var null_fn = function () {}; | |
mpmetrics = { | |
track: null_fn, | |
track_funnel: null_fn, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mi = <<HEHE | |
<select name="industryChooser" id="industryChooser-lookingProfileForm"><option value="" selected="">-</option><option value="47" class="corp fin">Accounting</option><option value="94" class="man tech tran">Airlines/Aviation</option><option value="120" class="leg org">Alternative Dispute Resolution</option><option value="125" class="hlth">Alternative Medicine</option><option value="127" class="art med">Animation</option><option value="19" class="good">Apparel & Fashion</option><option value="50" class="cons">Architecture & Planning</option><option value="111" class="art med rec">Arts and Crafts</option><option value="53" class="man">Automotive</option><option value="52" class="gov man">Aviation & Aerospace</option><option value="41" class="fin">Banking</option><option value="12" class="gov hlth tech">Biotechnology</option><option value="36" class="med rec">Broadcast Media</option><option value="49" class="cons">Building Materials</option><option value="138" class="corp man">Business Su |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on: | |
# http://www.hackido.com/2010/12/install-ruby-on-rails-on-ubuntu.html | |
# http://thekindofme.wordpress.com/2010/10/24/rails-3-on-ubuntu-10-10-with-rvm-passenger-and-nginx/ | |
# http://ascarter.net/2011/01/02/rails-development-on-ubuntu-10.10.html | |
sudo apt-get update | |
sudo apt-get dist-upgrade | |
sudo apt-get install build-essential | |
sudo apt-get install git-core |