Skip to content

Instantly share code, notes, and snippets.

docker run --rm -it --privileged --pid=host walkerlee/nsenter -t 1 -m -u -i -n bash
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(which docker):/bin/docker \
wagoodman/dive:latest $@

lib/transfer_resolver.csv:

10D,1,Signed to 10-Day Contract
10D2,2,Signed to Second 10-Day Contract
ABS,3,Leave of Absence
ACT,4,Activated
BRV,5,Placed on Bereavement List
CEXP,6,Contract Expired
CEXT,,Contract Extension

Creating a function that generates Streams in one line of code

What is a Stream

From the Elixir documentaion :

iex(8)> h Stream.resource

@bryanhuntesl
bryanhuntesl / signing github commits and general gpg tricks.md
Last active February 3, 2020 12:54
signing github commits and general gpg tricks

Public service announcement - many organisations are implementing a security measure where they will only accept GPG signed git commits.

Specifically they enable a github feature which prevents merging a branch where all commits are not signed (GPG).

How to work with this restriction...

Force git to always use signed commits with the following config:

git config commit.gpgsign true
@bryanhuntesl
bryanhuntesl / 2019-https-localhost.md
Created December 6, 2019 17:21 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

Gimme htop running inside xhyve :

cat <<EOF | docker build -t htop - && docker run -it --rm --privileged --pid host htop
FROM alpine
RUN apk --no-cache add htop
CMD ["/usr/bin/htop"]
EOF
@bryanhuntesl
bryanhuntesl / mix test output.md
Created November 13, 2019 14:53
RSA generation fail using erlang API
  1) test erl generate/verify RSA key pair (RsaGeneratorTest)
     test/rsa_generator_test.exs:21
     Assertion with =~ failed
     code:  assert out =~ "writing RSA key\nRSA key ok\n"
     left:  "unable to load Private Key\n4618671724:error:09FFF064:PEM routines:CRYPTO_internal:bad base64 decode:/BuildRoot/Library/Caches/com.apple.xbs/Sources/libressl/libressl-22.260.1/libressl-2.6/crypto/pem/pem_lib.c:800:\n"
     right: "writing RSA key\nRSA key ok\n"
     stacktrace:
       test/rsa_generator_test.exs:59: (test)
# set-option -g default-shell /bin/zsh
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
#Terminal admin:
#-------------------------------------------------------#
#set mouse off/on - if off, forces you to use keyboard with prefix-[
#set -g mouse on
# set-option -g default-shell /bin/zsh
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf"
#Terminal admin:
#-------------------------------------------------------#
#set mouse off/on - if off, forces you to use keyboard with prefix-[
#set -g mouse on