Skip to content

Instantly share code, notes, and snippets.

View etienne-napoleone's full-sized avatar

Etienne Napoleone etienne-napoleone

  • 👀
  • Lausanne
  • 23:09 (UTC +01:00)
View GitHub Profile
@etienne-napoleone
etienne-napoleone / 1-setup.md
Created August 7, 2019 02:43 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.

#!/bin/sh
# get tomochain container id
container_id=$(docker ps -q -f "name=tomochain")
# remove all peers
echo "\n------------------------\n!! Removing all peers\n------------------------\n"
docker exec -t $container_id tomo attach data/tomo.ipc --exec "for (i = 0; i < admin.peers.length; i++) { admin.removePeer(admin.peers[i].id) }"
# add TomoChain peers
@etienne-napoleone
etienne-napoleone / docker-size.sh
Created July 17, 2018 06:20 — forked from thecodingmonkey-zz/docker-size.sh
List all docker containers + volume sizes
#!/bin/sh
for d in `docker ps -a | awk '{print $1}' | tail -n +2`; do
d_name=`docker inspect -f {{.Name}} $d`
echo "========================================================="
echo "$d_name ($d) container size:"
sudo du -d 2 -h /var/lib/docker/aufs | grep `docker inspect -f "{{.Id}}" $d`
echo "$d_name ($d) volumes:"