This file contains hidden or 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
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) |
This file contains hidden or 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
"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) |
This file contains hidden or 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
# 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 |
This file contains hidden or 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 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}') |
This file contains hidden or 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
before | |
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="http://ecx.images-amazon.com/images/I/{{{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>' + | |
'</div>'); |
This file contains hidden or 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
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; |
This file contains hidden or 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
source 'https://rubygems.org' | |
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 |
This file contains hidden or 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
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 | |
end |
This file contains hidden or 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
var counter = 1; | |
function get_people_to_ask() { | |
if (counter < 10){ | |
counter++ | |
window.setTimeout(foo, 2000); | |
$('.pager_next_link').click() | |
} | |
} | |
get_people_to_ask(); | |
$( "a:contains('Free to Ask')" ).each(function() { $(this).click(); }); |
This file contains hidden or 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
[ | |
{ | |
"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)" | |
}, | |
{ |
OlderNewer