Skip to content

Instantly share code, notes, and snippets.

Duncan Robertson whomwah

Block or report user

Report or block whomwah

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
whomwah /
Created Oct 7, 2019
[Semantic Commit Messages] #git
whomwah /
Last active Oct 10, 2019
[NSF shared from Mac to Peppermint OS (VirtualBox] #sage #nfs

NSF shared from Mac to Peppermint OS

Instructions on how to share a folder on a Mac onto a Peppermint VM running on Virtualbox.

Setup for Mac

Check to see if you already have an /etc/exports file. If the file does not already exist then create it and give it the following ownership and permissions:

-rw-r--r--  1 root  wheel  151 Feb 25  2015 /etc/exports
whomwah /
Created Apr 11, 2019
[Swift] #swift

To observer any notification

center.addObserver(forName: nil, object: nil, queue: nil) { (note) in
  print("note: \(note)")
whomwah /
Last active Jun 19, 2019
[Docker] useful commands #docker

Execute an interactive bash shell on the container

docker exec -it app-accounting bash

Remove unused volumes

$ docker volume rm (docker volume ls -q -f dangling=true)

Remove all images

whomwah / Gemfile
Last active Apr 11, 2019
[Raspberry Pi] A simple bot in Ruby that uses RPi::GPIO to check a pin on a Raspberry PI with a moisture sensor on it to see if it needs watering. #pi
View Gemfile
source ''
gem 'rpi_gpio', '~> 0.3.3'
gem 'slack-ruby-client', '~> 0.10.0'
whomwah / Dockerfile
Last active Apr 11, 2019
[Legacy Ruby Docker] Simple Dockerfile that does legacy Ruby, for Rails Apps #docker
View Dockerfile
FROM ubuntu:16.04
# Choose your ruby version
# Install packages
RUN apt-get update && apt-get -y install wget \
build-essential \
whomwah /
Last active Apr 11, 2019
[Keybase] #ssh

Keybase proof

I hereby claim:

  • I am whomwah on github.
  • I am whomwah ( on keybase.
  • I have a public key whose fingerprint is B08A 48C6 5AAB 9463 8B53 11D0 A216 9097 FE9D 4B5B

To claim this, I am signing this object:

whomwah / gist:6068816
Last active Apr 11, 2019
[lsof] Check if port is being used #bash
View gist:6068816
# Run this command
lsof -i :3000
~/_dev/kyan/project(kyan_rails_3_2_13_upgrade) $ lsof -i :3000
ruby 8511 duncan 15u IPv4 0xf8ff7ea926138439 0t0 TCP *:hbci (LISTEN)
# kill the rogue PID
kill 8511
whomwah / generate_csr
Last active Apr 11, 2019
[Unix Certs] Generating CSR request, installing SSL cert and configuring Nginx on ubuntu 12.04LTS #ssl #certs
View generate_csr
cd /etc/ssl
openssl req -nodes -newkey rsa:2048 -keyout domain.key -out domain.csr
Generating a 2048 bit RSA private key
writing new private key to 'domain.key'
You are about to be asked to enter information that will be incorporated
into your certificate request.
You can’t perform that action at this time.