install via
brew tap railwaycat/homebrew-emacsmacport
brew install emacs-mac --with-spacemacs-icon # OR, brew cask install emacs-mac
brew linkapps
atom.packages.onDidActivatePackage (pack) -> | |
if pack.name == 'ex-mode' | |
Ex = pack.mainModule.provideEx() | |
Ex.registerCommand 'redo', -> | |
atom.workspace.observeTextEditors (editor) -> | |
editor.redo() |
import System.Random | |
main = do | |
gen <- getStdGen | |
putStr $ show $ take 5 (randomRs (1,69) gen) | |
putStr $ show $ take 1 (randomRs (1,26) gen) |
// hyperscript for jQuery | |
// create nested HTML elements with a DSL | |
// used to create reusable, interactive HTML components | |
// | |
// based on the many implentations out there like | |
// https://github.com/dominictarr/hyperscript | |
// https://github.com/Matt-Esch/virtual-dom/tree/master/virtual-hyperscript | |
// and Elm https://github.com/evancz/elm-html | |
var $h = function(element, properties, content) { | |
var $component = $('<' + element + '>'); |
$(function() { | |
// functional core | |
// returns a specified property from a collection of objects | |
// in ES2015, it's even shorter: return collection.map(e => e[property]) | |
function pluck(property, collection) { | |
return collection.map(function(e){ | |
return e[property]; | |
}); |
function pluck(property, collection) { | |
return collection.map(function(e){ | |
return e[property]; | |
}); | |
} | |
// return an array with unique elements | |
// this isn't efficient for sorted arrays, but whatevs | |
function unique(collection) { | |
// ternary operator to guard for empty collection |
var square = function(x) { | |
return x * x; | |
} | |
var sum = function(accumulator, x) { | |
return accumulator + x; | |
} | |
function sumOfSquares2(nums) { | |
return nums |
pictureMath :: Int -> Int -> String | |
pictureMath x y = show minusPart ++ show plusPart | |
where | |
minusPart = x - y | |
plusPart = x + y |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>reveal.js – The HTML Presentation Framework</title> | |
<meta name="description" content="A framework for easily creating beautiful presentations using HTML"> | |
<meta name="author" content="Hakim El Hattab"> |