Skip to content

Instantly share code, notes, and snippets.

def project do
your_options = []
[
...
elixirc_options: your_options ++ options(Mix.env)
]
end
defp options(env) when env in [:dev, :test] do
[exlager_level: 7]
@khia
khia / README.txt
Created November 20, 2013 00:17
mix compile macro from different app
$ mix
==> common
Compiled lib/classes.ex
Generated common.app
==> macro
Compiled lib/method.ex
Generated macro.app
$ touch apps/common/lib/classes.ex
$ mix
==> common
cat priv/spec/db.yml
swagger: '2.0'
info:
title: CouchDB API
description: CouchDB API to define bindings
version: "2.0"
# the domain of the service
host: couchdb.org
# array of all schemes that your API supports
schemes:
@khia
khia / Caddyfile
Last active August 6, 2019 11:55
Tiddlywiki with Bob on android
cat etc/Caddyfile
# entrypoint for accessing from PC
phone.local:8080 {
tls /data/data/com.termux/files/home/etc/phone.crt /data/data/com.termux/files/home/etc/phone.key
basicauth /wiki "username" password
proxy /wiki 127.0.0.1:8090 {
websocket
}
}
# entrypoint for accessing locally from phone
@khia
khia / .bash_profile
Created May 18, 2018 10:58
How to run TW5 on andriod
cat data/data/com.termux/files/home/.bash_profile
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
export SVDIR="$HOME/etc/sv"
mkdir -p $PREFIX/var/run
mkdir -p ~/.log
daemonize -c $PREFIX -l $PREFIX/var/run/runsvdir.lock -p $PREFIX/var/run/runsvdir.pid $PREFIX/bin/applets/runsvdir $SVDIR 2>/dev/null||: