Skip to content

Instantly share code, notes, and snippets.

You should follow me on Twitter. I won't waste your time. 😉

Quincy Larson QuincyLarson

You should follow me on Twitter. I won't waste your time. 😉
View GitHub Profile
View gist:8236553
Happy 2014!
Rather than make fuzzy resolutions, I've decided to measure my key activities Quantified Self-style
and improve upon my 2013 metrics. I plan to track these during my weekly review (GTD style)
using RescueTime, Run Keeper, Sleep Cycle, invoices from O'Reilly/Amazon, and Course Forward
(which will be in Open Beta soon).
My 2013 results:
- coded 1977 hrs (up from ~1800 in 2012)
- ran 2340 km (up from ~500 in 2012)
View gist:8791205
"Part of what makes programming difficult is most of the time we’re doing stuff we’ve never done before. If it was stuff that had been done before we’d be reusing something else. For most of what we do, we’re doing something that we haven’t done before. And doing things that you haven’t done before is hard. It’s a lot of fun but it’s difficult." - Douglas Crockford (Coders At Work interview)
View gist:11408790
# To use, put this file, jay.rb, in a directory with the csv files you need to convert.
# Then just run the following command from the prompt:
# ruby jay.rb [name of file without the .csv]
# Get the libraries you need
require 'csv'
require 'json'
# ARGV[0] gets the name of the first argument you passed from the command line - in this case, the name of the csv file
View gist:6d6f45e28061b023c1a4
function randomCallback(success, content) {
if (success) {
for (var i = 0; i < content.hits.length; ++i) {
window.location.assign("/?id=" + content.hits[0].id);
$('#random_button').click(function(e) {
var index = client.initIndex('#{Clip.index_name}')
View gist:b0abb26621c98d15f839
var template = Hogan.compile('<div class="hit-auto-complete col-md-12">' +
'<div class="row">' +
'<img class="col-lg-1 col-md-1 col-sm-2 col-xs-2" src="{{{i}}}._SL100_.jpg"</img></td>' +
'<div class="typeahead-product-name col-lg-11 col-md-11 col-sm-10 col-xs-10">{{{_highlightResult.p.value}}}</div>' +
'<div class="typeahead-transcript col-lg-11 col-md-11 col-sm-10 col-xs-10">{{{_highlightResult.t.value}}}</div>' +
'<div class="id" style="display: none;">{{{objectID}}}</div>' +
'</div>' +
QuincyLarson / gist:429fcb33d8adc528f734
Created May 15, 2014 select all the expansions real quick (couldn't get automatch settings to work due to some php weirdness)
View gist:429fcb33d8adc528f734
document.getElementById("seek_2p").checked = true;
document.getElementById("figures").checked = true;
document.getElementById("echoes").checked = true;
document.getElementById("cities").checked = true;
document.getElementById("extra").checked = true;
View gist:c41bf1e164b2affe5ff5
source ''
ruby '2.1.2'
gem 'rails', '4.1.5'
gem 'pg'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'
gem 'jquery-rails'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
View gist:e80372aca9a6da4a10be
def parse_instance(params)
instance = params.delete('instance')
puts '=========='
puts instance
puts '=========='
wixInstance = Hive::Client.parse_instance_data(instance, '371f1483-6a37-402c-a004-91d3d8416923')
return wixInstance.instanceId
QuincyLarson / gist:56e5605a7e9525b190f5
Created Oct 11, 2014
When asking a question, Quora only gives you a few "Free to Ask" options at a time. This script will load more and then click all the "Free to Ask" buttons for you.
View gist:56e5605a7e9525b190f5
var counter = 1;
function get_people_to_ask() {
if (counter < 10){
window.setTimeout(foo, 2000);
$( "a:contains('Free to Ask')" ).each(function() { $(this).click(); });
QuincyLarson / gist:b18d7366440af0f37054
Last active Aug 29, 2015
Interview Questions for Interview Question Machine
View gist:b18d7366440af0f37054
"question": "Time Complexity of Accessing Array Index (int a = ARR[5];)",
"answer": "O(1)"
"question": "Time Complexity of Inserting a node in Linked List",
"answer": "O(1)"