I'm trying to figure out how to use rebar to:
- create erlang project
- add a dependency on an erlang module from github
- start the app via the erl console
- create a release and start the app from the release (via the generated scripts)
| -module(net_led). | |
| -export([start_light/0, switch/2, light/1, decouple/1]). | |
| decouple(Light_Node) -> | |
| {light, Light_Node} ! decouple, | |
| io:format("Switch is decoupled~n", []). | |
| switch(Light_Node, Action) -> | |
| {light, Light_Node} ! {switch, self(), Action}, |
| { | |
| "directory": "components" | |
| } |
| #!/bin/bash | |
| set -e | |
| # Usage: | |
| # rsync_parallel.sh [--parallel=N] [rsync args...] | |
| # | |
| # Options: | |
| # --parallel=N Use N parallel processes for transfer. Defaults to 10. | |
| # | |
| # Notes: |
| syntax on | |
| set mouse=a | |
| set ai | |
| set ts=4 | |
| set nowrap | |
| set sidescroll=10 | |
| set ignorecase | |
| set tabstop=4 | |
| set shiftwidth=4 | |
| set foldcolumn=3 |
| // For IE | |
| .btn-inverse:active, | |
| .btn-inverse.active { | |
| background-color: #080808 \9; | |
| } | |
| // Add 'btn-flat' to your buttons | |
| .btn-flat { | |
| filter:progid:DXImageTransform.Microsoft.Gradient(enabled='false'); |
| # Tell system when Xcode utilities live: | |
| sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer | |
| # Set "opendiff" as the default mergetool globally: | |
| git config --global merge.tool opendiff |
| var serialport = require('node-serialport') | |
| var sp = new serialport.SerialPort("/dev/ttyO3", { | |
| parser: serialport.parsers.raw, | |
| baud: 9600 | |
| }) | |
| sp.on('data', function(chunk) { | |
| console.log(chunk.toString('hex'), chunk.toString(), chunk) | |
| }) |
| var util = require('util'), | |
| EventEmitter = require('events').EventEmitter; | |
| var Server = function() { | |
| var self = this; | |
| this.on('custom_event', function() { | |
| self.logSomething('custom_event'); | |
| }); |
| # development.pp | |
| stage { 'req-install': before => Stage['rvm-install'] } | |
| class misc { | |
| package { | |
| [ | |
| 'vim', | |
| ]: | |
| ensure => installed, | |
| } |