This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Read sys.config as in a normal start | |
{ :ok, [ conf ] } = :file.consult('/path/to/running-config/sys.config') | |
Enum.each(conf, fn({k, v}) -> | |
Enum.each(v, fn({sk, sv}) -> | |
Application.put_env(k, sk, sv) | |
end) | |
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :my_app, | |
version: get_version, | |
elixir: "~> 1.0", | |
elixirc_paths: elixirc_paths(Mix.env), | |
compilers: Mix.compilers, | |
build_embedded: Mix.env == :prod, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./bin/turbo rpc Elixir.Ecto.Storage up "['Elixir.Turbo.Repo']." | |
./bin/my_app rpc Elixir.Mix.Ecto migrations_path "['Elixir.MyApp.Repo']." | |
# => <<"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations">> | |
./bin/my_app rpc Elixir.Ecto.Migrator run "['Elixir.MyApp.Repo', <<\"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations\">>, up, [{all, true}]]." | |
# => [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A few handy tricks I use on a daily basis, from various sources | |
# Running with UAC and already elevated? No prompts if you call things from here : ) | |
New-Alias -name hyperv -Value "$env:windir\system32\virtmgmt.msc" | |
New-Alias -name vsphere -value "C:\Program Files (x86)\VMware\Infrastructure\Virtual Infrastructure Client\Launcher\VpxClient.exe" | |
New-Alias -Name n -Value "C:\Tools\NotePad2\notepad2.exe" | |
New-Alias -name RSAT -Value "C:\Tools\Custom.msc" | |
#... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My quick notes on what I did to install Elixir on the Raspberry Pi. | |
All the info is here, but it's a self guided tour. | |
# Get Raspbian | |
http://www.raspberrypi.org/downloads | |
http://downloads.raspberrypi.org/raspbian_latest | |
# Copy raspbian.img file to th SD Card | |
diskutils unmountDisk /dev/disk<numberhere> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
# Major releases of erlang should typically start out as separate formula in | |
# Homebrew-versions, and only be merged to master when things like couchdb and | |
# elixir are compatible. | |
class Erlang < Formula | |
homepage 'http://www.erlang.org' | |
# Download tarball from GitHub; it is served faster than the official tarball. | |
url 'https://github.com/erlang/otp/archive/OTP_R16B03-1.tar.gz' | |
sha1 'b8f6ff90d9eb766984bb63bf553c3be72674d970' |