NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.
| ## RubyMotion | |
| imageData = UIImage.UIImageJPEGRepresentation(@image_view.image, 1) | |
| encodedData = [imageData].pack("m0") | |
| data["image"] = encodedData | |
| BW::HTTP.post("http://localhost:3000/upload}", {payload: data}) do |response| | |
| if response.ok? | |
| end | |
| end | 
| https://twitter.com/dagda1/status/231016636847648769 | |
| https://twitter.com/garybernhardt/status/227881347346219008/ | |
| http://ianstormtaylor.com/rendering-views-in-backbonejs-isnt-always-simple/ | |
| backbone: what you'd normally use jquery plugins for, but with an inverted rendering process (js -> DOM instead of DOM -> js) | |
| "islands of richness", jquery data callbacks main pattern. | |
| other frameworks are building out from jQuery's central pattern of DOM selection and event callbacks. | |
| fantastic pattern for adding behavior to documents, but we aren't writing documents. | 
| #!/usr/bin/env ruby | |
| # autoshot.rb | |
| # | |
| # Ryan Funduk (ryanfunduk.com) | |
| # Licensed under WTFPL (http://sam.zoy.org/wtfpl) | |
| # | |
| # Watch a directory and scp new files to a host that | |
| # is running a webserver. Only works on OSX, could be | |
| # made to work on other platforms with alternatives | 
| App.AccountEditRoute = Ember.Route.extend({ | |
| setupController: function(controller) { | |
| controller.set('content', this.get('currentUser')); | |
| } | |
| }); | 
| <script type="text/x-handlebars"> | |
| <div class="row"> | |
| <div class="twelve columns"> | |
| <h1>Ember Stickies</h1> | |
| {{outlet}} | |
| </div> | |
| </div> | |
| </script> | |
| <script type="text/x-handlebars" data-template-name="notes"> | 
| $ -> | |
| window.BR ||= {} | |
| BR.userListWidget = new BR.UserListWidget $('#user-list'), | |
| length: 20 | 
| $nonpareille: 8px!default; | |
| $minion: 9px!default; | |
| $petit: 11px!default; | |
| $bourgeois: 12px!default; | |
| $long-primer: 13px!default; | |
| $small-pica: 15px!default; | |
| $pica: 16px!default; | |
| $english: 19px!default; | |
| $columbian: 21px!default; | |
| $great-primer: 24px!default; | 
| """ Usage: python diff.py FILE1 FILE2 | |
| A primitive `diff` in 50 lines of Python. | |
| Explained here: http://pynash.org/2013/02/26/diff-in-50-lines.html | |
| """ | |
| def longest_matching_slice(a, a0, a1, b, b0, b1): | |
| sa, sb, n = a0, b0, 0 | |
| runs = {} | 
| source 'https://rubygems.org' | |
| gem 'foreman' | |
| gem 'sinatra' | 
NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths
Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.