Skip to content

Instantly share code, notes, and snippets.

@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
@bryanhuntesl
bryanhuntesl / CRDT.md
Created October 31, 2019 14:54 — forked from joeljacobson/CRDT.md
CRDT Examples

Bucket Types

Bucket types were added in 2.0 to eliminate the need for each bucket to have it's own custom bucket properties. If buckets share the same custom bucket properies, a bucket type can be created for them.

Creating Bucket Types

To get started, you'll want to create a new bucket type with:

riak-admin bucket-type create  
version: "3"
services:
db:
image: "postgres"
container_name: "postgres_db"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=db
ports:
@bryanhuntesl
bryanhuntesl / advanced.config
Created October 21, 2019 16:12 — forked from thirdreplicator/advanced.config
An example Riak advanced.config file adding the delete_mode parameter set to "immediate". On Ubuntu, this file is located here: /etc/riak/advanced.config
%% Config file used to set advanced configuration options
[
{riak_kv, [
{delete_mode, immediate}
]},
{lager,
[
{extra_sinks,
[
@bryanhuntesl
bryanhuntesl / google mail and apps - handle incoming email - invoke http endpoint in response.md
Created August 5, 2019 10:55
google mail / apps - handle incoming email - invoke http endpoint in response