View gist:3c94a7ec58ff57b2f3a219aca5d15830
defmodule GpioInput do
use GenServer
@item_in_pin 17
def start_link() do
GenServer.start_link(__MODULE__, [], [])
end
def init(_) do
View gist:d4c259c13ff6199fe0b6
class Turtle
DIRECTIONS = [:UP, :RIGHT, :DOWN, :LEFT]
def initialize(size)
@size = size
@array = Array.new(size)
@array.map! {|line| line = Array.new(size, " ")}
@direction = :RIGHT
@x = 0
@y = 0
View sublist.exs
defmodule Sublist do
defp count(l) do
count(l,0)
end
defp count([], size) do
size
end
View gist:8c56b237cd81b257dedb
I have :
Router.map(function() {
this.resource('dashboards', { path: '/' }, function() {
this.resource('dashboardsEdit', {path: ':id'}, function() {
this.route('newWidget', {path: 'new'});
});
});
});