- There are two and only two genders.
- Okay, then there are two and only two biological genders.
- Gender is determined solely by biology.
- Okay, it’s mostly determined by biology, right?
- Please tell me it’s determined by DNA.
- Gender can be reliably determined through visual means. After all, no man would ever wear a burka.
- Once gender is set, it never changes.
- Even if the gender can change, it will only change from the one value to the other value.
- Only one gender can be “active” at the same time.
- We’re tracking gender now, so we’ve always tracked it.
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
couchdb & | |
git clone [email protected]:garbados/quilter.git | |
cd quilter | |
npm install | |
./bin/index.js push --local ~/Pictures --remote http://localhost:5984/eggchair --log info | |
cd .. | |
git clone [email protected]:garbados/egg_chair.git | |
cd egg_chair | |
npm install | |
mv config.js.example config.js |
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
{ | |
_id: '_design/queries', | |
views: { | |
sum_by_date: { | |
map: function (doc) { | |
if (doc.created_at) { | |
// normalize doc.created_at into an integer timestamp | |
// in this case, milliseconds since epoch | |
var date = new Date(doc.created_at).getTime(); | |
emit(doc.created_at, doc.VALUE_YOU_WANT_TO_SUM); |
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
[{ | |
"from": "", | |
"to": "index.html", | |
"method": "GET", | |
"query": {} | |
},{ | |
"from": "/api", | |
"to": "/../../", | |
"query": {} | |
},{ |
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 nano = require('nano'); | |
var url = '...'; // URL to your Cloudant database | |
var db = nano(url); | |
app.get('route', function (req, res) { | |
db.view('design_name', 'view_name').pipe(res); | |
}); |
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
## PERFORMANCE (1/7/13) | |
# | |
# CONGRATULATIONS! You have climbed to the top of the tower and rescued the fair maiden Ruby. | |
# Your average grade for this tower is: A | |
# | |
# Level 1: S | |
# Level 2: A | |
# Level 3: A | |
# Level 4: B | |
# Level 5: A |
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
# N.B. doesn't get maximum score: | |
# * won't get captives behind the warrior | |
# * will shoot captives at look[1] if an enemy is in look[2] | |
class Player | |
def play_turn(warrior) | |
@warrior = warrior | |
## uncomment `@max_health` and `@prev_health` on level 3 | |
# @max_health ||= warrior.health # set to `1` to complete level 8 in 27 turns | |
# @prev_health ||= @max_health |
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
# _all_docs | |
curl http://localhost:5984/eggchair/_all_docs?include_docs=true | jq -c ".rows[] | .doc" | dat --json | |
# _changes | |
curl http://localhost:5984/eggchair/_changes?include_docs=true | jq -c ".results[] | .doc" | dat --json |
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
/* | |
* Given array `records` and function `fn` | |
* returns an array where | |
* any records with duplicate `fn(record)` values | |
* are omitted. | |
* | |
* Runs in O(n) where n is records.length | |
*/ | |
function remove_duplicates (records, fn) { | |
var uniques = {}, |
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
import random | |
prefix = [ | |
'do', | |
'grow', | |
'edge', | |
'next', | |
'build', | |
'sleep', | |
'play', |