View fb-custom-audiences.js
// FB curl example
// curl \
// -F 'pixel_id=<PIXEL_ID>' \
// -F 'name=My New Website Custom Audience' \
// -F 'subtype=WEBSITE' \
// -F 'retention_days=15' \
// -F 'rule={"url":{"i_contains":"shoes"}}' \
// -F 'prefill=1' \
// -F 'access_token=<ACCESS_TOKEN>' \
// https://graph.facebook.com/v2.7/act_<AD_ACCOUNT_ID>/customaudiences
View learning-lens.md

Learning Lens

I tend to focus on core concepts quite a bit more than actual examples, so that the fundamental understanding of what the examples are trying to teach me is building on skills I already have just haven't figured out how to use yet.

tl;dr Your mileage may vary. I learn kind of counterintuitively for others.

Presentations (40-70 minutes)

View Main.hs
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Data.HashMap.Strict as H
import qualified Data.ByteString.Char8 as C
import Control.Applicative ((<|>))
import Snap.Core
import Snap.Util.FileServe
import Snap.Http.Server (quickHttpServe)
import Snap.Util.GZip (withCompression)
View traverse.js
var traverse = function(o, fn) {
for (var i in o) {
fn.apply(this,[i,o[i]]);
if (o[i] !== null && typeof(o[i])=="object") {
traverse(o[i], fn);
}
}
}
// usage
View export modified files from git
sudo git checkout-index `git diff --name-only SHA1 SHA2` -f --prefix=/directory/
View froute-picking-test.ls
should = require \chai .should!
picker = require \froute-picker
describe 'froute picking', (_) ->
it 'should parse url containing a period', (done) ->
result = (picker.match "/up/master/1.1") (picker.pick "/up/{server}/{cur}")
(result.server).should.eql \master
(result.cur).should.eql \1.1
done!
View nyanicon.js
// *** First of all the Favicon.js, Favicon.js - [http://ajaxify.com/run/favicon] ***
var favicon = {
defaultPause: 500,
change: function(iconURL, optionalDocTitle) {
clearTimeout(this.loopTimer);
if (optionalDocTitle) {
document.title = optionalDocTitle;
}
this.addLink(iconURL, true);
},