Skip to content

Instantly share code, notes, and snippets.

$(document).ready(function(){
$.getScript( "https://d79i1fxsrar4t.cloudfront.net/jquery.liveaddress/2.8/jquery.liveaddress.min.js" )
.done(function( script, textStatus ) {
console.log( "liveaddress loaded " + textStatus );
var liveaddress = $.LiveAddress({
key: "01234567890",
debug: true,
autocomplete: 5,
autoVerify: false,
@wsmoak
wsmoak / MyColors.elm
Last active March 15, 2016 12:52
Elm StartApp skeleton
module MyColors where
import StartApp
import Html exposing (Html, Attribute, text, div)
import Html.Attributes exposing (style)
import Effects exposing (Effects, Never)
app =
StartApp.start { init = init, view = view, update = update, inputs = inputs }
@wsmoak
wsmoak / minty.ex
Last active February 14, 2016 13:37
Minty - parse and summarize transactions.csv from Mint
# Read the transactions.csv file from Mint and summarize it
defmodule Minty do
@amt 3
@drcr 4
@category 5
def read_it do
File.stream!("/Users/wsmoak/Downloads/transactions.csv")
@wsmoak
wsmoak / LICENSE.md
Last active April 24, 2019 07:11
Turning a stepper motor with Elixir

Turny is an Elixir port of the Adafruit Python Library for DC + Stepper Motor HAT, which is a Python library for interfacing with the Adafruit Motor HAT for Raspberry Pi to control DC motors with speed control and Stepper motors with single, double, interleave and microstepping, designed specifically to work with the Adafruit Motor Hat

----> https://www.adafruit.com/product/2348

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Limor Fried for Adafruit Industries. MIT license, all text above must be included in any redistribution

The MIT License (MIT)

@wsmoak
wsmoak / LICENSE.md
Last active January 9, 2016 14:22
Cat Feeder - moved from gist to https://github.com/wsmoak/cat_feeder
@wsmoak
wsmoak / README.md
Last active May 20, 2017 03:02
Blink an external LED with elixir_ale

Blinky

@wsmoak
wsmoak / LICENSE.md
Last active June 12, 2022 00:57
Spinning a servo with elixir_ale
@wsmoak
wsmoak / gist:c967f757851076fe71e9
Created September 27, 2015 13:33
Building the Elixir docs
Building the documentation requires ExDoc to be installed and built in the same containing folder as Elixir.
# After cloning and compiling Elixir
git clone git://github.com/elixir-lang/ex_doc.git
cd ex_doc && ../elixir/bin/mix do deps.get, compile
cd ../elixir && make docs
@wsmoak
wsmoak / gist:299c81607dcd1306a048
Last active September 7, 2015 19:06
elixir test failure with different version number
PROBLEM: Changing the version number makes a bunch of tests fail
SOLUTION: Avoid adding a newline to the VERSION file. Edit with `vim -b VERSION`.
$ git remote -v
origin https://github.com/elixir-lang/elixir.git (fetch)
origin https://github.com/elixir-lang/elixir.git (push)
$ git log | head
commit 1660d7d5c910e479d2db8963c3b9766183a89b64
@wsmoak
wsmoak / gist:f5fd090df809e87a13fb
Last active September 7, 2015 21:53
Example.Rmd showing executable Elixir code in Tufte Handout RMarkdown format
---
title: "Executable Elixir in Tufte Handout"
author: "Wendy Smoak"
date: "September 1, 2015"
output: rmarkdown::tufte_handout
---
```{r setup, echo=FALSE}
# Adapted from http://datadrivensecurity.info/blog/posts/2015/Jun/running-other-languages-in-r-markdown-files/
# Licensed CC-BY-SA http://creativecommons.org/licenses/by-sa/4.0/