toolshed v0.2.4 Toolshed
Making the IEx console friendlier one command at a time
To use the helpers, run:
iex> use Toolshed
Add this to your .iex.exs
to load automatically.
The following is a list of helpers:
cmd/1
- run a system command and print the outputhex/1
- print a number as hextop/2
- list out the top processesexit/0
- exit out of an IEx sessioncat/1
- print out a filegrep/2
- print out lines that match a regular expressiontree/1
- pretty print a directory treehostname/0
- print our hostnamenslookup/1
- query DNS to find an IP addresstping/1
- check if a host can be reached (like ping, but uses TCP)ifconfig/0
- print info on network interfacesdmesg/0
- print kernel messages (Nerves-only)reboot/0
- reboots gracefully (Nerves-only)reboot!/0
- reboots immediately (Nerves-only)fw_validate/0
- marks the current image as valid (check Nerves system if supported)save_value/2
- save a value to a file as Elixir terms (uses inspect)save_term!/2
- save a term as a binaryload_term!/2
- load a term that was saved bysave_term/2
lsusb/0
- print info on USB devicesuptime/0
- print out the current Erlang VM uptime
Link to this section Summary
Functions
Run a command and return the exit code. This function is intended to be run interactively
Inspect a value with all integers printed out in hex. This is useful for one-off hex conversions. If you're doing a lot of work that requires hexadecimal output, you should consider running
Link to this section Functions
cmd(str)
Run a command and return the exit code. This function is intended to be run interactively.
hex(value)
Inspect a value with all integers printed out in hex. This is useful for one-off hex conversions. If you're doing a lot of work that requires hexadecimal output, you should consider running:
IEx.configure(inspect: [base: :hex])
The drawback of doing the above is that strings print out as hex binaries.