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
| parent: { | |
| child: { | |
| child_revisions: { | |
| route: '/revisions/:number', | |
| deserialize: function(params) { | |
| // params => { number: 1 } | |
| // number is not a primary key, | |
| // I need access to Child to find the Revision | |
| } | |
| } |
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
| /* | |
| root: | |
| projects: | |
| screens: | |
| revisions: | |
| Project has many Screens | |
| Screen has many Revisions | |
| /projects/1/screens/2/revisions/2 |
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
| <html> | |
| <head> | |
| <style> | |
| * { margin: 0; padding: 0; } | |
| form { | |
| display: table; | |
| width: 400px; | |
| background: #eee; | |
| } |
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
| # Goes in config/application.rb | |
| config.assets.precompile += ['file.css', 'file.js'] |
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
| JQ.Animate = Ember.Mixin.create({ | |
| cssProperties: ['background', 'backgroundAttachment', 'backgroundColor', 'backgroundImage', 'backgroundPosition', | |
| 'backgroundRepeat', 'border', 'borderBottom', 'borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', | |
| 'borderColor', 'borderLeft', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRight', 'borderRightColor', | |
| 'borderRightStyle', 'borderRightWidth', 'borderStyle', 'borderTop', 'borderTopColor', 'borderTopStyle', 'borderTopWidth', | |
| 'borderWidth', 'clear', 'clip', 'color', 'cursor', 'display', 'filter', 'font', 'fontFamily', 'fontSize', | |
| 'fontVariant', 'fontWeight', 'height', 'left', 'letterSpacing', 'lineHeight', 'listStyle', 'listStyleImage', | |
| 'listStylePosition', 'listStyleType', 'margin', 'marginBottom', 'marginLeft', 'marginRight', 'marginTop', 'overflow', | |
| 'padding', 'paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop', 'pageBreakAfter', 'pageBreakBefore', | |
| 'position', 'styleFloat', 'textAlign', 'textDecoration' |
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 'rubygems' | |
| require 'rack/rewrite' | |
| use Rack::Rewrite do | |
| rewrite '/', '/index.html' | |
| end | |
| use Rack::Static, :urls => ['/'], :root => "public" | |
| run Rack::Directory.new('public') |
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
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
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
| // ========================= getStyleProperty by kangax =============================== | |
| // http://perfectionkills.com/feature-testing-css-properties/ | |
| var getStyleProperty = (function(){ | |
| var prefixes = ['Moz', 'Webkit', 'Khtml', 'O', 'Ms']; | |
| var _cache = { }; | |
| function getStyleProperty(propName, element) { |
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
| <style> | |
| * { margin: 0; padding: 0; } | |
| body { padding: 20px; } | |
| ul { | |
| width : 200px; | |
| list-style : none; | |
| } | |
| ul li a { |