This gist has been moved to https://gist.github.com/3375528
(Github had some wonkiness and I couldn't update the gist files)
| <div id="output"></div> | |
| <script type="text/html" id="greeting-template"> | |
| <div class="greeting"> | |
| Hello, {{ name }}! | |
| </div> | |
| </script> | |
| <script> | |
| function template(id, params) { | |
| var html = document.getElementById(id).innerHTML |
| module.exports = { | |
| load:load | |
| } | |
| function load(callback) { | |
| var testEl = document.createElement('span') | |
| testEl.style.fontFamily = 'sans-serif'; | |
| testEl.innerHTML = 'TEST_STRING' | |
| testEl.style.visibility = 'hidden' | |
| testEl.style.position = 'absolute' |
| import localstorage | |
| import filter | |
| var tasks = [] | |
| localstorage.persist(tasks, 'todo-fun') | |
| <link rel="stylesheet" type="text/css" href="http://addyosmani.github.com/todomvc/reference-examples/vanillajs/css/todos.css" /> | |
| <div id="todoapp"> |
| sudo npm install -g fun | |
| curl https://raw.github.com/marcuswestin/fun/master/apps/todo-mvc/todo-mvc.fun > todo-mvc.fun | |
| curl https://raw.github.com/marcuswestin/fun/master/apps/todo-mvc/todo-mvc.css > todo-mvc.css | |
| fun todo-mvc.fun | |
| # Go to localhost:8080 in your browser |
| setup: | |
| for file in ./node_modules/*; do cd $$file && npm install --production . && cd ../..; done | |
| .PHONY: setup |
| #!/usr/local/bin/node | |
| require('color') | |
| var jsCompiler = require('require/server'), | |
| express = require('express'), | |
| fs = require('fs'), | |
| stylus = require('stylus'), | |
| curry = require('std/curry'), | |
| nib = require('nib') |
| git rev-parse --verify HEAD |
This gist has been moved to https://gist.github.com/3375528
(Github had some wonkiness and I couldn't update the gist files)
| var request = require('request') | |
| var accountSid = 'ABC' | |
| var authToken = 'XYZ' | |
| var twilioSandbox = 'QWE' | |
| var yourPhone = 'ASD' | |
| var text = 'Test' | |
| var url = 'https://'+accountSid+':'+authToken+'@api.twilio.com/2010-04-01/Accounts/'+accountSid+'/SMS/Messages.json' | |
| var params = { From: twilioSandbox, To: yourPhone, Body: text } |