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 python | |
""" | |
RSS.py | |
Classes for working with RSS channels as arbitrary data structures. | |
Requires Python 2.2 or newer and PyXML 0.7.1 or newer. | |
ChannelBase - Base class for RSS Channels. | |
CollectionChannel - RSS Channel modeled as a URI-per-entry |
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 php | |
<?php | |
/* | |
* This file can be run as a shell script. It connects to a project's | |
* MySQL DB. If you are in a directory with a WordPress install, it | |
* will use `wp db cli`, if in Drupal it will use `drush sqlc`, if in | |
* Laravel it will parse the `.env` file and use the default connection | |
* names there. | |
*/ |
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
/* | |
createInstances(<array of integers>) | |
ItemFinder.find(<int representing ID of item from list>) | |
returns the item which is found or null | |
item.needsUpdate returns something "truthy" or "falsy" (can be 1,true, "cat", null, NaN, undefined, false, etc.) | |
og.notifications.getNotifier() returns a notifier object. It has at least one method "transmit": | |
notifier.transmit({ |
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
/* | |
Example: | |
var val = createInstances([0,1,2,4,...<set of ascending integers>]); | |
Instructions, each time user stalls, give the new "bug report" | |
1. val.total is giving me NaN! | |
* If a candidate sees the typo (but not that total isn't set), point out that the bug is still there. | |
* If the user sees the reason it's NaN, then ask whether the other properties are being set correctly | |
2. It's not always adding listeners to the right items |
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
function flatten(input){ | |
const out = []; | |
function recurse(a){ | |
// This captures all iterators, not just arrays. | |
if(a[Symbol.iterator]) { | |
for(let v of a){ | |
recurse(v); | |
} | |
} |