Skip to content

Instantly share code, notes, and snippets.

{
"TODO": {
"prefix": "TODO",
"body": [
"$LINE_COMMENT TODO (name, $CURRENT_YEAR$CURRENT_MONTH$CURRENT_DATE): "
],
"description": "TODO with name and date"
},
"NOTE": {
"prefix": "NOTE",
{ hello: 'world' }
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'

Keybase proof

I hereby claim:

  • I am apatten on github.
  • I am adampatten (https://keybase.io/adampatten) on keybase.
  • I have a public key whose fingerprint is BBC1 2985 4703 3AD4 92E1 BFA5 8CB0 10DB 1234 9E31

To claim this, I am signing this object:

_____
| |
| 0 |
| 0 0 |
| 0 0 0 |
---------
diff --git a/lib/tasks/mongo.thor b/lib/tasks/mongo.thor
index 77aa8c9..16046aa 100644
--- a/lib/tasks/mongo.thor
+++ b/lib/tasks/mongo.thor
@@ -34,7 +34,7 @@ class Mongo < Thor
print "Downloading latest backup....\n"
s3_dir = connection.directories.get("com.estimize.backup")
- latest_backup = s3_dir.files.keep_if{|o| o.key =~ /mongo_daily/}.map(&:key).sort.last
+ latest_backup = s3_dir.files.keep_if{|o| o.key =~ /mongo_daily/}.map(&:key).sort[-2]
<tfoot id="view-more-pagination">
<tr>
<td colspan="6">
<a href="/aapl?page=2" class="more" data-remote="true" rel="next">Show Next 16 estimates</a>
</td>
</tr>
</tfoot>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hi Bwyan</title>
<link rel="stylesheet" href="/styles.css" type="text/css" media="screen" charset="utf-8">
</head>
<body>
</body>
Estimate.excludes(score: nil).all.each do |estimate|
estimate.wallstreet_eps_score_delta = estimate.eps_score - estimate.release.wallstreet_eps_score
estimate.wallstreet_revenue_score_delta = estimate.revenue_score - estimate.release.wallstreet_revenue_score
estimate.wallstreet_score_delta = estimate.score - estimate.release.wallstreet_score
estimate.save
end
User.all.each do |user|
user.estimates_count = user.estmates.count
user.save
@apatten
apatten / ultemplate.rb
Created December 7, 2011 01:15 — forked from Lytol/ultemplate.rb
Rails 3 Application Template
# Rails application template for Rails 3 + MySQL + Git + haml + JQuery + Rspec + FactoryGirl
# by Brian Smith <bsmith@swig505.com>
# Create a default README
file "README.md", <<-EOF
#{app_name}
#{"=" * app_name.length}
TODO: description