Skip to content

Instantly share code, notes, and snippets.

@wardbekker
Created August 8, 2011 06:41
Show Gist options
  • Save wardbekker/1131312 to your computer and use it in GitHub Desktop.
Save wardbekker/1131312 to your computer and use it in GitHub Desktop.
Autoloading of modules
%% autoload all modules that are in the code:path() and reside in the user directory
%% put in ~/.erlang
[code:ensure_loaded(list_to_atom(filename:rootname(filename:basename(F))))
|| P <- lists:filter(fun(Path) -> string:str(Path, os:getenv("USER")) > 0 end, code:get_path()), F <- filelib:wildcard(P ++ "/*.beam")].
# Includes Rebar dependencies, make sure the beam files are up-to-date.
rebar get-deps compile
erl -pa `pwd`/ebin `pwd`/deps/*/ebin -boot start_sasl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment