Skip to content

Instantly share code, notes, and snippets.

@jakeprem
jakeprem / elixir_inspect.json
Created February 18, 2020 18:32
Snippet for VS Code to add inspect statements to Elixir code
{
"Inspect": {
"prefix": "ins",
"body": [
"|> IO.inspect(label: \"${0:$TM_FILENAME:$TM_LINE_NUMBER}\")"
],
"description": "Insert a labeled inspect statement"
}
}
@jakeprem
jakeprem / differ.exs
Last active January 9, 2020 20:33
Checks whether a tag already exists for the currently set version in mix.exs of app that have changed
defmodule Differ do
require Logger
def cli do
changed_app_versions = get_changed_apps() |> get_app_versions()
tags = get_tags()
changed_app_versions
|> Enum.filter(&(&1 in tags))
|> Enum.map(fn {app, vsn} ->
@jakeprem
jakeprem / smartcity_dataset_xref.txt
Last active December 9, 2019 15:00
SmartCity.Dataset xref results
➜ smartcitiesdata git:(master) ✗ mix xref callers SmartCity.Dataset
==> reaper
lib/reaper/collections/extractions.ex:3: SmartCity.Dataset.__struct__/0
lib/reaper/collections/extractions.ex:5: SmartCity.Dataset.__struct__/0
lib/reaper/collections/file_ingestions.ex:3: SmartCity.Dataset.__struct__/0
lib/reaper/data_extract/processor.ex:25: SmartCity.Dataset.__struct__/0
lib/reaper/data_extract/processor.ex:71: SmartCity.Dataset.__struct__/0
lib/reaper/decoder.ex:28: SmartCity.Dataset.__struct__/0
lib/reaper/decoder.ex:48: SmartCity.Dataset.__struct__/0
lib/reaper/decoder/csv.ex:15: SmartCity.Dataset.__struct__/0
@jakeprem
jakeprem / mailman.ex
Created December 4, 2019 15:47
Mailman - Useful process mailbox functions for Elixir
defmodule Mailman do
def get_all, do: do_get_all()
def peek(pid \\ nil) do
{:messages, messages} = :erlang.process_info(pid || self(), :messages)
messages
end
defp do_get_all(msgs \\ []) do
This is file 1
@jakeprem
jakeprem / _0_outline.md
Last active April 16, 2018 18:20
Vue.js Bootstrapping Outline

Learn Vue.js in Y Minutes

A guide to give you a working mental model in areas of core importance to Vue.js. You won't become an expert but it should give you a foundation to build on.

##Features

  • Do stuff
  • Do other stuff
  • maybe even some more stuff

##Bug Fixes

  • Fixt
  • So many
  • Bugs

Keybase proof

I hereby claim:

  • I am jakeprem on github.
  • I am jakeprem (https://keybase.io/jakeprem) on keybase.
  • I have a public key ASAvBeTDrtoCVK037p_9ncBwMJzu2_tUXNqAjJFAYpnK3Qo

To claim this, I am signing this object:

@jakeprem
jakeprem / 0_reuse_code.js
Created May 23, 2017 18:29
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jakeprem
jakeprem / graphite.md
Created July 18, 2016 14:07 — forked from ashrithr/graphite.md
Installing graphite 0.10, collectd and grafana on centos 6

Installing Graphite:

Graphite does two things:

  1. Store numeric time-series data
  2. Render graphs of this data on demand

What Graphite does not do is collect data for you, however there are some tools out there that know