Skip to content

Instantly share code, notes, and snippets.

View ivanoats's full-sized avatar
💭
🤙 Stoked 🏄‍♂️

Ivan Storck ivanoats

💭
🤙 Stoked 🏄‍♂️
View GitHub Profile
@ivanoats
ivanoats / notes.md
Created May 17, 2016 18:13 — forked from orta/notes.md
Notes on Spacemacs

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

@ivanoats
ivanoats / init.coffee
Created March 30, 2016 17:43
Redo for ex-mode
atom.packages.onDidActivatePackage (pack) ->
if pack.name == 'ex-mode'
Ex = pack.mainModule.provideEx()
Ex.registerCommand 'redo', ->
atom.workspace.observeTextEditors (editor) ->
editor.redo()
@ivanoats
ivanoats / powerball.hs
Created January 13, 2016 17:21
how to win at powerball
import System.Random
main = do
gen <- getStdGen
putStr $ show $ take 5 (randomRs (1,69) gen)
putStr $ show $ take 1 (randomRs (1,26) gen)
@ivanoats
ivanoats / jqh.js
Created December 10, 2015 04:32
Hyperscript for jQuery
// 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 + '>');
@ivanoats
ivanoats / stats.js
Created December 8, 2015 20:02
ivan's stats page
$(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];
});
@ivanoats
ivanoats / pluck-unique-and-compose.js
Created December 8, 2015 19:59
Pluck, Unique, and Compose from scratch in 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
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
@ivanoats
ivanoats / gist:983b678c2c3eb50aeefa
Created November 20, 2015 17:39 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations

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:

@ivanoats
ivanoats / index.html
Last active November 1, 2015 22:43
RevealJS index.html for Aerobatic / 4front
<!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">