Skip to content

Instantly share code, notes, and snippets.


Hans Kristian Flaatten Starefossen

View GitHub Profile
View gist:8676d6306059795657eb2c15ba7c5167
### Keybase proof
I hereby claim:
* I am starefossen on github.
* I am starefossen ( on keybase.
* I have a public key ASBrgxagN9yHjE6uZ3W6fiKcRMNTRXsgyrwvG7rf9Y32DAo
To claim this, I am signing this object:
Starefossen / gist:59e5910c15715bc73f8e5e07caf5171c
Created Dec 26, 2019
Restart macOS with File Vault 2 enabled remotely
View data.json
"postfix": "Rain",
"color": "green",
"data": {
"value": "🌦"
View gist:ea624b6da1b4e12e9b06e7b1e0254ca5
VERSIONER_PERL_PREFER_32_BIT=1 perl -MMac::InternetConfig -le 'print +(GetICHelper "http")[1]
View Dockerfile
FROM ubuntu
MAINTAINER Example McAuthor
RUN apt-get update
RUN apt-get install -y \
RUN mkdir -p /data/db
EXPOSE 27017
Starefossen / gist:7e2a8ef40ba099acbee5ed72e89d0f8e
Last active Dec 27, 2017
Docker Machine with Docker v1.13.1
View gist:7e2a8ef40ba099acbee5ed72e89d0f8e
docker-machine create --driver virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 4096 --virtualbox-boot2docker-url default
View gist:d7393420280a1ac9e1ba

Yank lines 81-91


If your fingers don't like to find the : and , keys, this would work as well (go to line 81, yank 11 lines)


My only use of g is 5gg. To go to the 5th line. 22gg: 22nd line. As jimbo said, it's really only a modifier for some other commands.


On the server with tmux

Create a new tmux session:

tmux new-session -s my-session # launch `top`, `htop`, or anything that will regularly updates, then detach

Stream your session:

Starefossen / gist:319f36ff30694a775806
Created Aug 13, 2015
Resize VirtualBox .vmdk disk
View gist:319f36ff30694a775806
# Clone the .vmdk image to a .vdi.
vboxmanage clonehd "virtualdisk.vmdk" "new-virtualdisk.vdi" --format vdi
# Resize the new .vdi image (30720 == 30 GB).
vboxmanage modifyhd "new-virtualdisk.vdi" --resize 30720
# Optional; switch back to a .vmdk.
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk