Skip to content

Instantly share code, notes, and snippets.

View robzolkos's full-sized avatar
📈
Building products

Rob Zolkos robzolkos

📈
Building products
View GitHub Profile
http://backbonejs.org/
http://marionettejs.com/
https://github.com/documentcloud/backbone/wiki/Tutorials,-blog-posts-and-example-sites
http://backbonefu.com/2011/11/modifying-your-urls-on-the-fly-using-the-request-method-with-sync-in-backbone-js/
http://addyosmani.github.com/backbone-fundamentals/#marionette
http://addyosmani.github.com/backbone-fundamentals/#memory-management
https://github.com/jsoverson/todomvc/tree/master/labs/architecture-examples/backbone_marionette
http://davidsulc.com/blog/2012/04/15/a-simple-backbone-marionette-tutorial/
http://davidsulc.com/blog/2012/04/22/a-simple-backbone-marionette-tutorial-part-2/
http://davidsulc.github.com/backbone.marionette-collection-example/
@robzolkos
robzolkos / ghost_backbone.txt
Created August 19, 2012 09:45 — forked from dougo-chris/ghost_backbone.txt
How to create ghost pages with backbone templates
Why
---
My site is backbone.js and rails, including the static marketing content. I wanted this content to be readable by google and I don't want two copies.
Background
----------
I'm using the haml_assets gem so I can write backbone.js views in haml.
Routes
------
@robzolkos
robzolkos / nginx.conf
Created July 29, 2012 06:50
nginx rewrute
location /system {
rewrite /system/ http://cr.s3.amazonaws.com/system/$1 permanent;
}
@robzolkos
robzolkos / gist:3163049
Created July 23, 2012 10:45 — forked from dougo-chris/gist:1992666
remote file uploads
TEMPLATE
----
%form#uploadAsset{"accept-charset" => "UTF-8", :action => "/admin/assets", "data-remote" => "true", :enctype => "multipart/form-data", :method => "post"}
%div{:style => "margin:0;padding:0;display:inline"}
%input{:name => "utf8", :type => "hidden", :value => "✓"}/
%input{:name => "authenticity_token", :type => "hidden", :value => ""}/
.element
.avatar.thin
%label.hint#assetLabel
Your Asset
@robzolkos
robzolkos / extension.js.coffee
Created July 23, 2012 10:45 — forked from dougo-chris/extension.js.coffee
Nested model in backbone.js
do ->
_parse = Backbone.Model.prototype.parse
_.extend Backbone.Model.prototype,
initNestedCollections: (nestedCollections) ->
@_nestedCollections = {}
_.each nestedCollections, (theClass, key) =>
@_nestedCollections[key] = new theClass([])
@resetNestedCollections()
@robzolkos
robzolkos / deploy.rb
Created June 25, 2012 07:03
deploy.rb for Linode
#$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require 'bundler/capistrano'
require 'rvm/capistrano'
require "capistrano_colors"
require 'thinking_sphinx/deploy/capistrano'
require 'delayed/recipes'
set :normalize_asset_timestamps, false
set :rvm_type, :user
set :rvm_ruby_string, 'ruby-1.9.3-p125@appname'
@robzolkos
robzolkos / gist:2970521
Created June 22, 2012 05:33
Heroku/S3 application creation notes
gem install bundler --pre
create a "appname-staging" bucket on S3
create a "appname-production" bucket on S3
rails new appname -d postgresql
rvm ruby-1.9.3-p194-perf@appname --create
add ruby "1.9.3" to Gemfile (2nd line)
@robzolkos
robzolkos / 0-readme.md
Created June 20, 2012 05:49 — forked from lazyatom/0-readme.md
ruby-1.9.3-p194 cumulative performance patch.

Patched ruby 1.9.3-p194 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.

Huge thanks to funny-falcon for the performance patches.

@robzolkos
robzolkos / .rspec
Created June 10, 2012 11:46 — forked from coreyhaines/.rspec
Loading just active record
--colour
-I app
@robzolkos
robzolkos / image_uploader.rb
Created June 8, 2012 14:11 — forked from DAddYE/image_uploader.rb
CarrierWave on the fly resizer (work as dragonfly)
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :file
def thumb(size)
begun_at = Time.now
size.gsub!(/#/, '!')
uploader = Class.new(self.class)
uploader.versions.clear
uploader.version_names = [size]