Skip to content

Instantly share code, notes, and snippets.

View noelworden's full-sized avatar

Noel Worden noelworden

View GitHub Profile
@noelworden
noelworden / week_march30_output.sh
Last active August 8, 2020 23:26
#blog_snippets
00000000: efbb bf76 656e 646f 725f 6964 2c6e 616d ...vendor_id,nam
@noelworden
noelworden / week_march30_command01.sh
Last active August 8, 2020 23:26
#blog_snippets
pbcopy < path/to/data_dump.csv
@noelworden
noelworden / week_march30_command02.sh
Last active August 8, 2020 23:25
#blog_snippets
pbpaste > path/to/data_dump.csv
@noelworden
noelworden / week_march30_output02.sh
Last active August 8, 2020 23:25
#blog_snippets
00000000: 7665 6e64 6f72 5f69 642c 6e61 6d65 2c69 vendor_id,name,i
@noelworden
noelworden / week_march30_xxd.sh
Last active August 8, 2020 23:24
#blog_snippets
xxd ~/downloads/data_dump.csv
@noelworden
noelworden / week_april13_docker.sh
Last active September 9, 2020 15:13
#blog_snippets
docker-compose exec web elixir -S mix run -e 'MyApp.Manipulations.TestDataManipulation.run()'
[debug] QUERY OK db=4.8ms queue=40.1ms idle=0.0ms
begin []
[debug] QUERY OK source="agents" db=2.9ms
SELECT a0."id", a0."name" FROM "agents" AS a0 WHERE (a0."legacy_id" = $1) [115]
[debug] QUERY OK source="form_as" db=8.1ms
SELECT s0."id", s0."vendors", s0."revenue_share", s0."legacy_id", s0."inserted_at"...
INSERT INTO "agents" ("legacy_id","name","inserted_at","updated_at") VALUES ($1,$2,$3,$4) ...
[debug] QUERY OK db=6.5ms
INSERT INTO "form_as" ("legacy_id","revenue_share","vendors","inserted_at","updated_at") ...
[debug] QUERY OK db=7.0ms
[info] Inserted data for %{name: "PERSON ONE", legacy_id: "115"}
[info] Inserted data for %{name: "PERSON TWO", legacy_id: "123"}
[info] Inserted data for %{name: "PERSON THREE", legacy_id: "73"}
[info] Inserted data for %{name: "PERSON FOUR", legacy_id: "17"}
[info] Inserted data for %{name: "PERSON FIVE", legacy_id: "117"}
[info] Inserted data for %{name: "PERSON SIX", legacy_id: "84"}
[info] Inserted data for %{name: "PERSON SEVEN", legacy_id: "34"}
[info] Inserted data for %{name: "PERSON EIGHT", legacy_id: "69"}
[info] Inserted data for %{name: "PERSON NINE", legacy_id: "16"}
[info] Inserted data for %{name: "PERSON TEN", legacy_id: "114"}
config :logger, :console, format: "[$level] $message\n"
config :logger, level: :info