Skip to content
View gatsby-node.js
const fs = require('fs-extra')
exports.postBuild = function ign (pages, callback) {
console.log('in IGN!')
const file = 'testing'
fs.outputFile(file, 'works', (err) => {
console.log(err)
})
callback()
}
View notes.md

Start out

install via

  brew tap railwaycat/homebrew-emacsmacport
  brew install emacs-mac --with-spacemacs-icon  # OR, brew cask install emacs-mac
  brew linkapps

Terminology

View init.coffee
atom.packages.onDidActivatePackage (pack) ->
if pack.name == 'ex-mode'
Ex = pack.mainModule.provideEx()
Ex.registerCommand 'redo', ->
atom.workspace.observeTextEditors (editor) ->
editor.redo()
View powerball.hs
import System.Random
main = do
gen <- getStdGen
putStr $ show $ take 5 (randomRs (1,69) gen)
putStr $ show $ take 1 (randomRs (1,26) gen)
View jqh.js
// 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 + '>');
View stats.js
$(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];
});
View pluck-unique-and-compose.js
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
View sumOfSquares.js
var square = function(x) {
return x * x;
}
var sum = function(accumulator, x) {
return accumulator + x;
}
function sumOfSquares2(nums) {
return nums
View peterSimms.hs
pictureMath :: Int -> Int -> String
pictureMath x y = show minusPart ++ show plusPart
where
minusPart = x - y
plusPart = x + y
View gist:983b678c2c3eb50aeefa

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

Something went wrong with that request. Please try again.