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
| ;;; packages.el --- elm Layer packages File for Spacemacs | |
| ;; | |
| ;; Copyright (c) 2012-2014 Sylvain Benner | |
| ;; Copyright (c) 2014-2015 Sylvain Benner & Contributors | |
| ;; | |
| ;; Author: Sylvain Benner <[email protected]> | |
| ;; URL: https://github.com/syl20bnr/spacemacs | |
| ;; | |
| ;; This file is not part of GNU Emacs. | |
| ;; |
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
| console.log("\033[39mRunning tests…"); | |
| function assertEquals(actual, expected, description) { | |
| if(typeof(actual) === "undefined") { | |
| console.error("\033[31m" + description + " not implemented\033[39m"); | |
| } else { | |
| if(actual !== expected) { | |
| console.error("\033[31m" + description + " failed, expected " + expected + ", got " + actual + "\033[39m"); | |
| } else { | |
| console.log(description + " \033[32m ok\033[39m"); | |
| } |
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
| module.exports = dreamCars = [ | |
| { | |
| make: "Aston Martin", | |
| model: "DB9" | |
| }, | |
| { | |
| make: "Lotus", | |
| model: "Elise" | |
| }, | |
| { |
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 IIFE(){ | |
| function init(){ | |
| var something = "cool", | |
| somethingElse = [1,2,3,4,5,6,7,8], | |
| $btn1 = $("btn1"), | |
| $btn2 = $("btn2"), | |
| $btn3 = $("btn3"); | |
| $btn1.click(function hander(evt){ | |
| console.log("1", something); |
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
| // hello world | |
| var curry = require('fn-curry'); | |
| var conditional = curry(function(pred, succ, fail){ | |
| return function(){ | |
| var args = Array.prototype.slice.call(arguments); | |
| return pred.call(this, args) ? succ.apply(this, args) : fail.apply(this, args); | |
| }; | |
| }); | |
| var even = function (i){ |
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
| var funkshun = (function(){ | |
| var concat = Array.prototype.concat; | |
| function replicate(n, x){ | |
| return n===0 ? [] : concat.call(replicate(--n, x),x); | |
| } | |
| function take(n, arr){ | |
| function _take(n, arr){ | |
| var head; |
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
| fizzBuzz :: [Integer] -> [String] | |
| fizzBuzz list = [if mod el 15 == 0 then "FIZZBUZZ" else if mod el 3 == 0 then "FIZZ" else if mod el 5 == 0 then "BUZZ" else show el | el <- list] |
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
| //Because I read twitter at work | |
| //Because we have a proxy that blocks t.co but not twitter.com | |
| //Because I have rewritten this from scratch more than once and not saved it | |
| //I'm keeping this here. | |
| //Paste into bookmarklet, run when I open twitter, be happy. | |
| javascript:(function(){$(document).on("hover","a.twitter-timeline-link",null,function(){var $this = $(this), xUrl = $this.attr("data-expanded-url"); $this.attr("href", xUrl);});})(); |
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
| //So, I came up with this when playing with an idea for a configuration DSL. It's like Expression Builders...I think. | |
| //I think it's really like Partial Application with named functions. | |
| //But is it rubbish? | |
| //This is a contrived example for addition | |
| var add = function(x){ | |
| //Right here is the basic pattern. | |
| //Rather than return a function, return and object with a named function so your chaining becomes more grammatical | |
| return{ | |
| to: function(y){ | |
| return x + y; |
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
| Source Error: | |
| Line 15: protected void Application_Start(object sender, EventArgs e) | |
| Line 16: { | |
| Line 17: FubuApplication.DefaultPolicies().StructureMapObjectFactory().Bootstrap(); | |
| Line 18: | |
| Line 19: } | |
| Source File: c:\Users\Jesse\Documents\Projects\FubuValidation\FubuValidation\Global.asax.cs Line: 17 |