Skip to content

Instantly share code, notes, and snippets.

View nateberkopec's full-sized avatar

Nate Berkopec nateberkopec

View GitHub Profile
@nateberkopec
nateberkopec / about.md
Created August 10, 2011 13:58 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@nateberkopec
nateberkopec / countdownbegin.js
Created August 17, 2011 15:49
First ever javascript...creates time until specified date/time in dd:hh:mm:ss format. Codegolf it please?
var d = new Date();
d.setHours(d.getHours()-d.getTimezoneOffset()/60);
var T2 = Date.UTC(2011,9,13,7,1);
var diff=new Date();
diff.setTime(T2-d);
var days = diff.getDate() < 10 ? "0" + diff.getDate() : diff.getDate();
var hours = diff.getHours() < 10 ? "0" + diff.getHours() : diff.getHours();
var min = diff.getMinutes() < 10 ? "0" + diff.getMinutes() : diff.getMinutes();
var sec = diff.getSeconds() < 10 ? "0" + diff.getSeconds() : diff.getSeconds();
@nateberkopec
nateberkopec / helloworld.go
Created April 6, 2012 21:20
hackdays helloworld
package main
func main() {
println("helloworld")
}
@nateberkopec
nateberkopec / setup_mail.rb
Created May 31, 2012 19:03
config/intializers/setup_mail.rb
ActionMailer::Base.smtp_settings = {
:address => "smtp.postmarkapp.com",
:port => 2525,
:domain => 'derpderp.com',
:user_name => 'derpderp',
:password => 'herpdederp',
:authentication => 'plain',
:enable_starttls_auto => true
}
# in ApplicationController
layout :set_layout
def set_layout
# If this is a PJAX request, don't render a layout.
request.headers['X-PJAX'] ? false : 'application'
end
@nateberkopec
nateberkopec / gist:3078751
Created July 9, 2012 20:38
FD description

Entrepreneurs: Connect w/Amazing People to Start Companies/Projects With

Hi there,

FounderDating (FD) is an invite-only, online network for entrepreneur to connect with cofounders.

  • High Quality - members are carefully screened for quality and readiness (no recruiters, etc.) Applications and members’ identities are confidential, but a few of the folks who are part of the network are former founders or early employees from: stackmob, snapfish, Zynga, Loggly and Gilt just to name a few.
  • Balanced - 50% engineering & 50% non-engineering
  • No Idea Necessary - FD is about the people, so you don’t need to have an idea, just be ready to work on a serious side project
@nateberkopec
nateberkopec / colorscheme.sass
Created September 14, 2012 15:14
actual craft coffee colorscheme.sass
$leche: #BBA993
$caramel: #CC9966
$shit-brown: #330000
$mexican-last-night-brown: rgb(47,17,15)
$craft-red: rgb(238, 64, 55)
$dark-red: #660000
$satan-grey: #666
@nateberkopec
nateberkopec / Gemfile
Created October 11, 2012 17:29
Closure compiler for a Rails 3 app
group :assets do
gem 'closure-compiler'
end
@nateberkopec
nateberkopec / track_link.coffee
Created October 12, 2012 20:24
Active Tracker API example
@nateberkopec
nateberkopec / gist:3961904
Created October 26, 2012 22:20
Interesting academic work in aerodynamic flocking
Speed, pacing strategy and aerodynamic drafting in Thoroughbred horse racing
http://rsbl.royalsocietypublishing.org/content/8/4/678.short
Aerodynamic characteristics as determinants of the drafting effect in cycling.
http://ukpmc.ac.uk/abstract/MED/17218899/reload=0;jsessionid=LRL9A6Q7MbD9Azdvf1SG.4
The mathematics of breaking away and chasing in cycling
http://www.springerlink.com/content/rahtxmaa0uun8cn1/
Cyclist bunch riding: a review of the literature