From the REPL include(/path/to/file.jl) does the trick. This has the same effect as typing the code in the REPL. The same can be done inside another file.
You can also load modules that are not packaged as packages by putting their directories into the LOAD_PATH environment variable.