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 () { | |
var actions = 'call,read,dress,buy,ring,hop,skip,jump,look,rob,find,fly,go,ask,raise,search'; | |
var bridges = 'the,a,an,my,as,by,to,in,on,with'; | |
var targets = 'dog,doctor,store,dance,jig,friend,enemy,business,bull,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday,Mom,Dad'; | |
var capitalizeFirstLetter = function(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} | |
var randomWord = function (list) { | |
list = list.split(','); |
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
<html> | |
<head> | |
<style type="text/css"> | |
body { margin: 0; padding: 0; } | |
div { float: left; background: #f00; } | |
</style> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
var gui = require('nw.gui'); |
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 Example = Map.extend({ }, { | |
define: { | |
name: { | |
value: 'Nailed it' | |
} | |
} | |
}); | |
var NestedMap = Map.extend({ }, { | |
define: { |
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
> It has to be easy to use. If it’s not easy to use, you will not use it. | |
> - [Ronald Walters](https://www.youtube.com/watch?v=dbirU_hqROY&feature=youtu.be&t=56s) |
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
<blockquote> | |
<p> | |
It has to be easy to use. If it’s not easy to use, you will not use it. | |
</p> | |
<a href="https://www.youtube.com/watch?v=dbirU_hqROY&feature=youtu.be&t=56s"> | |
Ronald Walters | |
</a> | |
</blockquote> |
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
messages: function(req, res) { | |
var buf, i, j, len, messages, msg, msgs, type, types, _ref; | |
buf = []; | |
messages = req.flash(); | |
types = Object.keys(messages); | |
len = types.length; | |
if (!len) { | |
return ''; | |
} | |
buf.push('<div id="messages">'); |
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
# This should be run on a new Linode Ubuntu 32-bit 10.04 image as root to prepare it for Nginx, PHP, MySQL, Node, CouchDB environment | |
# To start, something like this works: | |
# scp prepare_server.sh [email protected]:/root | |
# First, install basic linux utilities (compilers, git, libssl) | |
cd /root | |
mkdir /src | |
cd src |
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 statuses = ['drafted', 'on-the-clock']; | |
var self = this; | |
// Method 1: Lazy | |
$(this.el).removeClass(statuses.join(' ')); | |
if (this.model.getStatus() == 'drafted') { | |
$(this.el).addClass('drafted'); | |
} | |
if (this.model.getStatus() == 'on-the-clock') { | |
$(this.el).addClass('on-the-clock'); |