This file contains 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
code delimiters: <% %> | |
# keynote | |
- your business logic will live longer than your interface | |
- stateless | |
- no "spaghetti state" | |
- application should be able to reflect any combination of data | |
- views should transparently reflect models | |
- backbone patterns | |
- custom model methods |
This file contains 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
define([ | |
// models | |
'models/someModel', 'models/someOtherModel', | |
// collections | |
'collections/someCollection', | |
// views | |
'views/someView', 'views/someOtherView', | |
// templates | |
'text!templates/someTemplate.html', 'text!templates/someOtherTemplate.html', |
This file contains 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
{ | |
"ensure_newline_at_eof_on_save" : true | |
} |
This file contains 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
var prettyLog = function (message, styles) { | |
var rule = ''; | |
for (var property in styles) | |
rule += property + ':' + styles[property] + ';'; | |
console.log('%c' + message, rule); | |
}; |
This file contains 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
// make sure AMD is available | |
if (typeof define !== "undefined") | |
// define a module for the library | |
define([], function(){ | |
// create a local copy | |
var EvilNonAmdSupportingLibrary = window.EvilNonAmdSupportingLibrary; | |
// remove the copy in the global namespace | |
window.EvilNonAmdSupportingLibrary = undefined; | |
// return the local copy to AMD library | |
return EvilNonAmdSupportingLibrary; |
This file contains 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
#!/bin/bash | |
SAVEIFS=$IFS | |
IFS=$(echo -en "\n\b") | |
for i in `find . -name "*.png" -o -name "*.jpg"`; do | |
file=`basename -s .jpg "$i" | xargs basename -s .png | xargs basename -s @2x` | |
result=`grep -r $file .` | |
if [ -z "$result" ]; then | |
git rm "$i" | |
fi |
This file contains 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
startup_message off | |
caption always "%{= kw}%-w%{= BW}%n %t%{-}%+w %-= %c" | |
vbell off |
This file contains 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
function propertyExists (target, path) { | |
if (typeof path === 'string') | |
path = path.split('.'); | |
try { | |
return path.length ? path[0] in target && propertyExists(target[path.shift()], path) : true; | |
} catch (e) { | |
return false; | |
} | |
} |
This file contains 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
# set prefix to ctrl+a | |
unbind C-b | |
set -g prefix C-a | |
bind a send-prefix | |
# use space to cycle between windows | |
bind-key C-a last-window | |
bind-key Space next-window | |
bind-key C-Space previous-window |
This file contains 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
$column-width: 60px; | |
$gutter-width: 20px; | |
$line-height: 20px; | |
@function columns ($columns: 1) { | |
@return $columns * ($column-width + $gutter-width) - $gutter-width; | |
} | |
@function rows ($lines: 1) { | |
@return $line-height * $lines; |
OlderNewer