Skip to content

Instantly share code, notes, and snippets.

@dch
Created March 12, 2024 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dch/d5bee9722994d4bbebb20df1abda20cc to your computer and use it in GitHub Desktop.
Save dch/d5bee9722994d4bbebb20df1abda20cc to your computer and use it in GitHub Desktop.
defmodule I do
def cls, do: IO.puts("\ec")
def qt(m, f \\ :_) do
:recon_trace.calls(
{m, f, :return_trace},
{100, 10000},
pid: :all,
scope: :local,
stack: :return
)
end
def raw(any, label \\ "iex") do
IO.inspect(any,
label: label,
pretty: true,
limit: :infinity,
structs: false,
syntax_colors: [
number: :yellow,
atom: :cyan,
string: :green,
nil: :magenta,
boolean: :magenta
],
width: 0
)
end
def dbg(any, label \\ "iex") do
IO.inspect(any,
label: label,
pretty: true,
limit: :infinity,
syntax_colors: [
number: :yellow,
atom: :cyan,
string: :green,
nil: :magenta,
boolean: :magenta
],
width: 0
)
end
end
IEx.configure(
default_prompt:
[
# ANSI CHA, move cursor to column 1. Breaks stuff.
# "\e[G",
:light_green,
# plain string
"🧪 ",
:white,
:reset
]
|> IO.ANSI.format()
|> IO.chardata_to_string(),
inspect: [limit: :infinity, pretty: true],
colors: [
enabled: true,
syntax_colors: [
number: :yellow,
atom: :cyan,
string: [:italic, :blue],
boolean: [:italic, :magenta],
nil: [:magenta, :bright]
],
ls_directory: :cyan,
ls_device: :yellow,
doc_code: :green,
doc_inline_code: :magenta,
doc_headings: [:cyan, :underline],
doc_title: [:cyan, :bright, :underline]
]
)
import I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment