-
Back up
A few things to think about:
- media
- photos, music, and videos should all be on external drive
- projects/code
- media
- make sure all Git repos are pushed up
| person = { | |
| save: function(){ | |
| $.ajax('...', { | |
| context: this, | |
| success: this.saved, | |
| error: this.errored | |
| }) | |
| }, | |
| saved: function(data){ | |
| console.log('OMG. USEFUL SCOPING.') |
| // iOS Media Queries | |
| // Goal: capture styles for iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2 | |
| // | |
| // Author: Tony Schneider (@tonywok) | |
| // Please tell me where I fail. :) | |
| // iPhone v(4,4S) portrait | |
| // test: black text (overwritten by v* portrait) with blue background | |
| @media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) { | |
| a { |
| ### UPDATE: ruby-debuy19 is no longer maintained, use https://github.com/cldwalker/debugger | |
| # Install with: | |
| # bash < <(curl -L https://raw.github.com/gist/1333785) | |
| # | |
| # Reference: http://blog.wyeworks.com/2011/11/1/ruby-1-9-3-and-ruby-debug | |
| echo "Installing ruby-debug with ruby-1.9.3-p0 ..." | |
| curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem |
| # This is a record, as in a vinyl. | |
| class Record < ActiveRecord::Base | |
| belongs_to :user | |
| belongs_to :album | |
| # explicitly stating what is needed | |
| def from_library_for_album(collector, album) | |
| where(user_id: collector).where(album_id: album) | |
| end |
| ## Rails 3.2.0 (January 20, 2012) ## | |
| * Upgrade mail version to 2.4.0 *ML* | |
| * Remove Old ActionMailer API *Josh Kalderimis* |
| class Lisp | |
| def initialize | |
| @env = { | |
| :label => lambda { |(name,val), _| @env[name] = val }, | |
| :quote => lambda { |sexpr, _| sexpr[0] }, | |
| :car => lambda { |(list), _| list[0] }, | |
| :cdr => lambda { |(list), _| list.drop 1 }, | |
| :cons => lambda { |(e,cell), _| [e] + cell }, | |
| :eq => lambda { |(l,r), _| l == r }, | |
| :if => lambda { |(cond, thn, els), ctx| eval(cond, ctx) ? eval(thn, ctx) : eval(els, ctx) }, |
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| // Use @include colorize('image.png', red, 0.5) | |
| @mixin colorize($image, $color, $opacity) { | |
| background: $color; | |
| $color: transparentize($color, 1 - $opacity); | |
| background: -webkit-linear-gradient(left, $color, $color), url($image); | |
| background: -moz-linear-gradient(left, $color, $color), url($image); | |
| background: -ms-linear-gradient(left, $color, $color), url($image); | |
| background: -o-linear-gradient(left, $color, $color), url($image); | |
| } |
| # About: | |
| # A flight planning algorithm, particularly useful for private pilots. | |
| # The idea is that one might be interested in, say, flying into LED (in Russia) | |
| # from DCA (in DC); bearing in mind that small aircraft can only go so far | |
| # on a single tank of gas, this algorithm will perform the hard work of | |
| # computing a rather tricky route. | |
| # | |
| # Concretely: | |
| # Given a set of airports (and their code, latitude and longitude), | |
| # find the shortest route between any given airport A and B, |