Skip to content

Instantly share code, notes, and snippets.

View tysone's full-sized avatar

Tyson Evans tysone

View GitHub Profile
require 'rubygems'
require 'garb'
Garb::Session.login(username,password)
class Popular
extend Garb::Model
metrics :pageviews
dimensions :page_path, :page_title
end
/*$Id: commentsModule.css 82379 2011-11-17 21:49:30Z fisherc $
/css/0.1/screen/community/comments/2.0/commentsModule.css
(c)2006 - 2011 The New York Times Company */
/* font stacks */
.commentsContainer .commentsModule,
.commentsContainer .commentReadMore {
font-family: arial, helvetica, sans-serif;
font-size: 12px;
/* http://sonspring.com/journal/clearing-floats */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}
function rvm_version {
local gemset=$(echo $GEM_HOME | awk -F'@' '{print $2}')
[ "$gemset" != "" ] && echo "@$gemset"
}
PS1='\[\033[1;34m\]$(rvm_version)\[\033[0m\] \W$(__git_ps1 "\[\033[1;32m\](%s)\[\033[0m\]") \$ '
desc 'Pretty print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.'
task :pretty_routes => :environment do
all_routes = ENV['CONTROLLER'] ? ActionController::Routing::Routes.routes.select { |route| route.defaults[:controller] == ENV['CONTROLLER'] } : ActionController::Routing::Routes.routes
routes = all_routes.collect do |route|
reqs = route.requirements.empty? ? "" : route.requirements.inspect
{:name => route.name, :verb => route.verb, :path => route.path, :reqs => reqs}
end
File.open(File.join(RAILS_ROOT, "routes.html"), "w") do |f|
f.puts "<html><head><title>Rails 3 Routes</title></head><body><table border=1>"
NYTD.track = function() {
if ('dcsMultiTrack' in window) {
dcsMultiTrack.apply(this, arguments);
} else {
setTimeout(function() {
NYTD.track.apply(this, arguments);
}, 1000);
}
};
<link rel="stylesheet" type="text/css" href="http://graphics8.nytimes.com/css/0.1/screen/common/modules/dialogbox.css"> <link rel="stylesheet" type="text/css" href="http://graphics8.nytimes.com/css/0.1/screen/common/forms.css"> <link rel="stylesheet" type="text/css" href="http://graphics8.nytimes.com/css/0.1/screen/community/comments/2.0/commentsModule.css">
<script src="http://graphics8.nytimes.com/js/app/lib/jquery/jquery-1.6.2.min.js" type="text/javascript"></script>
<script type="text/javascript" language="Javascript" src="http://graphics8.nytimes.com/js/EmbeddedComments/jquery.tmpl.js"></script>
<script type="text/javascript" language="Javascript" src="http://graphics8.nytimes.com/js/EmbeddedComments/commentsConfig.js"></script>
<script type="text/javascript" language="Javascript" src="http://graphics8.nytimes.com/js/EmbeddedComments/embeddedComments.js"></script>
<div class="columnGroup">
<div id="commentsContainer" class="commentsContainer"></div>
</div>

Drilling Down

Articles in the Drilling Down series from The New York Times examine the risks of natural-gas drilling and efforts to regulate this rapidly growing industry.

Learning Too Late of the Perils in Gas Well Leases

Americans have signed millions of leases allowing oil and gas companies to drill on their land, but some landowners are finding out the hard way what their contracts actually say

By Ian Urbina and Jo Craven McGinty

<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-7885722-24']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
@tysone
tysone / gist:3553875
Created August 31, 2012 14:44
#hhba Presentación - Tyson Evans