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
namespace :gts do | |
desc "get source of lead for client" | |
#target output | |
#client id 1003, from date 2001-01-01 | |
# coupon | |
# www.google.com 13 | |
# www.yahoo.com 7 | |
# quotes | |
# www.google.com 7 |
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
#archive the master | |
git checkout -b master_archive | |
git push origin master_archive | |
#delete old master | |
git checkout development | |
git branch -D master | |
git push origin :master #push empty ref up; force deletion | |
#branch new master off of development |
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
Top 10 CPC keywords | |
=================== | |
select client_id, store_id, keyword, visits from g5a_keywords where medium='cpc' group by client_id, store_id, keyword order by client_id, store_id, visits DESC; | |
Top 10 Organic Keywords | |
====================== | |
select client_id, store_id, keyword, visits from g5a_keywords where medium='organic' group by client_id, store_id, keyword order by client_id, store_id, visits DESC; |
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
it "should lookup by last_updated for abc files" do | |
update_time = Time.now | |
# create a location to match this update_time here | |
file = double("file") | |
file.should_receive(:extension).and_return("abc") | |
file.should_receive(:last_update).and_return(update_time) | |
MyClass.load_file(file).should == Location.find_by_lookup(update_time) | |
end | |
it "should lookup by extension for all other files" do |
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
ChrisK (CTO & chief product strategist) | |
Coby (VP engineering) | |
Support & QA | |
hire another junior engineer here | |
engineers rotate thru 1 week at a time | |
individuals/teams that create bugs should fix them if possible; be shamed; take responsibility | |
Mike Bull (PM) | |
communication in/out of engineering | |
drives scheduling rhythm of active projects & priorities | |
works with team leads around the company and in engineering |
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 itoa(val) | |
val.to_s | |
end | |
require 'test/unit' | |
class TestItoA < Test::Unit::TestCase | |
def bad_test_simple_val | |
s = itoa 10 | |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Drink menu</title> | |
</head> | |
<body> | |
<button id="add-drink">Add drink</button> | |
<ul id="drinks-list"> | |
</ul> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> |
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
it "should return a formatted string of all the errors (comma-delimited)" do | |
@runner.monitor_task { @runner.error "an error happened"} | |
DailyErrorNotifier.expects(:send_error_to_pager_duty).once | |
@runner.check_for_errors | |
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
#adapted from Dave Thomas's screencast on metaprogramming in Ruby | |
module Memoize | |
def remember(name, &block) | |
define_method(name, &block) | |
orig = instance_method(name) | |
mem = {} |
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
<html> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
var running = false; | |
if( !running ) { | |
$('.meter-wrap').hover(function(){ | |
var count = 0; | |
var running = true; |
OlderNewer