Sparkboxers on Twitter
You'll need the t gem
./add-all.sh
# gem install guard | |
# gem install guard-shell | |
# guard - watch the Magic™ | |
guard 'shell', :elixirc_bin => "/usr/local/elixirc" do | |
watch(/(.+\.ex$)/) { |m| `elixirc #{m[0]}` } | |
end | |
guard 'shell', :elixir_bin => "/usr/local/elixir" do | |
watch(/(.+\.exs)/) { |m| `elixir #{m[0]}` } | |
end |
defmodule Movies do | |
defp to_lines(file), do: String.split file, "\n" | |
defp to_movies(line) when is_bitstring(line), do: list_to_tuple String.split line, "\t" | |
defp to_movies([head|tail]), do: [ to_movies(head) | to_movies(tail) ] | |
defp to_movies([]), do: [] | |
def from(path) do | |
# probably use IO module with File.open if we had a large set |
614692 9.2 The Shawshank Redemption 1994 | |
550111 8.9 The Dark Knight 2008 | |
486716 9 Pulp Fiction 1994 | |
471441 9.2 The Godfather 1972 | |
454455 8.8 Fight Club 1999 | |
448117 8.8 The Lord of the Rings: The Fellowship of the Ring 2001 | |
444980 8.7 The Matrix 1999 | |
425515 8.8 The Lord of the Rings: The Return of the King 2003 | |
380364 8.7 The Lord of the Rings: The Two Towers 2002 | |
378917 8.9 Inception 2010 |
function Get-Projects($Path = ($pwd.path)) { | |
ls -path $path -filter *.csproj -recurse | |
} | |
function ConvertTo-Deployable { | |
begin {} | |
process { | |
$Path = $_ | |
$project = New-Object psobject -Property @{ |
** (ArithmeticError) bad argument in arithmetic expression | |
/Users/cromwellryan/projects/elixir/a.exs:7: :elixir_compiler_0."-__FILE__/2-lc$^1/1-1-"/1 | |
/Users/cromwellryan/projects/elixir/a.exs:7: (file) | |
/private/tmp/elixir-QNLB/elixir-0.10.1/lib/elixir/lib/code.ex:291: Code.require_file/2 | |
/private/tmp/elixir-QNLB/elixir-0.10.1/lib/elixir/lib/kernel/cli.ex:299: Kernel.CLI.process_command/2 | |
/private/tmp/elixir-QNLB/elixir-0.10.1/lib/elixir/lib/enum.ex:594: Enum."-map/2-lc$^0/1-0-"/2 |
defmodule JSON do | |
import String | |
def parse( content ) do | |
case parse_content(content) do | |
{ value, "" } -> value | |
{ _, _ } -> raise "crap" | |
end | |
end |
require 'formula' | |
class Ab < Formula | |
homepage 'http://httpd.apache.org/docs/trunk/programs/ab.html' | |
url 'http://www.apache.org/dist/httpd/httpd-2.4.6.tar.bz2' | |
sha1 '16d8ec72535ded65d035122b0d944b0e64eaa2a2' | |
def patches | |
{ | |
# Disable requirement for PCRE, because "ab" does not use it |
var Q = require('q'); | |
console.log(); | |
function hi() { | |
Q.promise( function() { | |
console.log("hi: " + Date()); | |
}); | |
} |
Sparkboxers on Twitter
You'll need the t gem
./add-all.sh
Simple observer, event mechanism for isolating growing business actions.