As configured in my dotfiles.
start new:
tmux
start new with session name:
(ns express_sample | |
(:require [cljs.nodejs :as node])) | |
(def express (node/require "express")) | |
(def app (. express (createServer))) | |
(defn -main [& args] | |
(doto app | |
(.use (. express (logger))) | |
(.get "/" (fn [req res] |
As configured in my dotfiles.
start new:
tmux
start new with session name:
//------------------------------------------------------------- | |
// | |
// Hypothesis: | |
// | |
// Promises/A is a Monad | |
// | |
// To be a Monad, it must provide at least: | |
// - A unit (aka return or mreturn) operation that creates a corresponding | |
// monadic value from a non-monadic value. | |
// - A bind operation that applies a function to a monadic value |
//BASIC PIECES, 3 functions: unit, bind and the bind argument | |
//function unit(value) | |
//function bind(monad, function(value)) | |
//all three functions return a monad | |
/* The unit function is a constructor (returns a monad object) | |
* The magic is in the bind function | |
* | |
* There are AXIOMS: | |
* bind(unit(value)), f) === f(value) |
Code examples from this stack overflow answer.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
/* ========================================================================== | |
HTML5 display definitions | |
========================================================================== */ | |
/** | |
* Correct `block` display not defined in IE 8/9. | |
*/ |
What are we trying to observe? Raw object data.
// Objects
var obj = { id: 2 };
obj.id = 3; // obj == { id: 3 }
// Arrays
var arr = ['foo', 'bar'];
arr.splice(1, 1, 'baz'); // arr == ['foo', 'baz'];
Entre nosotros [nombre de la compañía]
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
myApp.factory('Excel',function($window){
var uri='data:application/vnd.ms-excel;base64,',
template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
return {