Skip to content

Instantly share code, notes, and snippets.

@bryanhuntesl
bryanhuntesl / cloudformation create cloudformer webserver.md
Created August 3, 2019 16:29
cloudformation create cloudformer webserver
"WebServer": {
      "Condition": "DefaultVPC",
      "Type": "AWS::EC2::Instance",
      "Metadata" : {
        "AWS::CloudFormation::Init" : {
          "configSets" : {
            "full_install" : ["base", "cloudformer"]
          },
          "base" : {
@bryanhuntesl
bryanhuntesl / cmds-1.sh
Last active August 2, 2019 23:49
cleanup fork of riak_core repo - remove all stale branches (many not merged in half a decade)
git branch -rd origin/0.14-trifork
git branch -rd origin/1.0
git branch -rd origin/1.1
git branch -rd origin/1.2
git branch -rd origin/1.3
git branch -rd origin/1.4
git branch -rd origin/1.4.0ranchup
git branch -rd origin/AZ1011-synchronous-vnode-startup
git branch -rd origin/AZ721-louder-2i-errors
@bryanhuntesl
bryanhuntesl / gist:5c3e06a41e14d49f5bc5f2e600a10b5b
Created July 12, 2019 17:44
file consult - but for strings .. can be used for streaming read of file
:erl_eval.exprs(   elem(:erl_parse.parse_exprs(elem(:erl_scan.string('foo.'),1)),1) , :orddict.new)
{:value, :foo, []}
@bryanhuntesl
bryanhuntesl / graphhopper .md
Last active July 10, 2019 11:25
graphhopper route optimisation
@bryanhuntesl
bryanhuntesl / zoom.im removal.md
Last active July 9, 2019 19:45
zoom.im removal
rm -rf "${HOME}/Library/Application Support/zoom.us"
rm -rf "${HOME}/.zoomus"
rm -rf "${HOME}/.Trash/zoom.us.app"
rm -rf "${HOME}/Library/Caches/us.zoom*"
@bryanhuntesl
bryanhuntesl / libcluster debugging.md
Created July 3, 2019 15:19
libcluster debugging

send({HelloWorld.Timer, List.first(:erlang.nodes)} ,:foo) 


:rpc.call(List.first(:erlang.nodes),String,:split,["aba","a"])


Process.list |> Enum.map(&( Process.info(&1,:registered_name)))
{plugins, [
{ rebar_erl_vsn, ".*", {git, "https://github.com/esl/rebar_erl_vsn.git", {tag, "v0.2.2"}} }
]}.
{provider_hooks, [{pre, [{compile, erl_vsn}]}]}.
{erl_opts, [debug_info]}.
{deps, []}.
{shell, [
@bryanhuntesl
bryanhuntesl / gist:0bb537b0f31ad45137d461151d7bb360
Created July 2, 2019 18:46
rebar3 shell get access to state
X = sys:get_status(rebar_agent,1000).
{status, Pid, {module, Mod}, [PDict, SysState, Parent, Dbg, S1] } = X.
[_,_,_ ] = S1.
[_,_,{data,S2} ] = S1.
@bryanhuntesl
bryanhuntesl / docker format and container name grabbing tricks - also listing all available output fields.md
Created June 14, 2019 10:03
docker format and container name grabbing tricks - also listing all available output fields
docker container ls --format='{{json .}}'
docker ps --format "{{.ID}} {{.Names}} " | awk '/agent/{print $2}'