This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CLI | |
| sudo apt update && apt install \ | |
| git curl docker.io \ | |
| build-essential pkg-config autoconf bison rustc cargo clang \ | |
| libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \ | |
| libvips imagemagick libmagickwand-dev libsqlite3-0 \ | |
| redis-server mysql-server sqlite3 libmysqlclient-dev apache2-utils \ | |
| rbenv | |
| # UI apps |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ruby '2.7.1' | |
| gem 'rails', github: 'rails/rails' | |
| gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
| # Action Text | |
| gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
| gem 'okra', github: 'basecamp/okra' | |
| # Drivers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "AL": "Alabama", | |
| "AK": "Alaska", | |
| "AS": "American Samoa", | |
| "AZ": "Arizona", | |
| "AR": "Arkansas", | |
| "CA": "California", | |
| "CO": "Colorado", | |
| "CT": "Connecticut", | |
| "DE": "Delaware", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Failures: | |
| 1) User List Administrator viewing list of users | |
| Failure/Error: case type | |
| NameError: | |
| undefined local variable or method `type' for #<RSpec::Core::ExampleGroup::Nested_1:0x0000010169fe40> | |
| # ./spec/features/users/user_list_spec.rb:23:in `block (2 levels) in <top (required)>' | |
| # -e:1:in `<main>' | |
| 2) User List Normal user viewing list of users |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - link = "http://www.facebook.com/sharer/sharer.php?s=100&p[url]=#{url_encode('http://google.com')}&p[images][0]=&p[title]=#{url_encode('some title')}&p[summary]=#{url_encode('something something')}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require.config({ | |
| baseUrl: '/backbone-tests/', | |
| paths: { | |
| 'jquery' : '/app/libs/jquery', | |
| 'underscore' : '/app/libs/underscore', | |
| 'backbone' : '/app/libs/backbone', | |
| 'mocha' : 'libs/mocha', | |
| 'chai' : 'libs/chai', | |
| 'chai-jquery' : 'libs/chai-jquery', | |
| 'models' : '/app/models' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| ------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do -> | |
| _parse = Backbone.Model.prototype.parse | |
| _.extend Backbone.Model.prototype, | |
| initNestedCollections: (nestedCollections) -> | |
| @_nestedCollections = {} | |
| _.each nestedCollections, (theClass, key) => | |
| @_nestedCollections[key] = new theClass([]) | |
| @resetNestedCollections() |
NewerOlder