$> irb
Um in Ruby Dinge zu tun versetzt man sich in die Lage eines Objektes.
Um herauszufinden welches Objekt man gerade ist benutzt man self
self
### Keybase proof | |
I hereby claim: | |
* I am benzimmer on github. | |
* I am benzimmer (https://keybase.io/benzimmer) on keybase. | |
* I have a public key whose fingerprint is 633B 78E8 76FB 1CBF B7A3 6388 796D FEFF D4D2 519C | |
To claim this, I am signing this object: |
$ tmux attach | |
protocol version mismatch (client 7, server 6) | |
$ pgrep tmux | |
3429 | |
$ /proc/3429/exe attach |
.video-wrapper { | |
position: relative; | |
padding-bottom: 56.25%; /* 16:9 */ | |
padding-top: 25px; | |
height: 0; | |
} | |
.video-wrapper iframe { | |
position: absolute; | |
top: 0; |
git checkout --orphan newbranch | |
git rm -rf . | |
<do work> | |
git add your files | |
git commit -m 'Initial commit' |
# Show memory usage of all docker containers | |
$ for line in `docker ps | awk '{print $1}' | grep -v CONTAINER`; do docker ps | grep $line | awk '{printf $NF" "}' && echo $(( `cat /sys/fs/cgroup/memory/docker/$line*/memory.usage_in_bytes` / 1024 / 1024 ))MB ; done | |
# Remove non-running Docker containers | |
$ docker rm `(docker ps -q && docker ps -qa) | sort | uniq -u` |
# Remove point in time backups from timemachine | |
# First mount timemachine volume (for example open Time Machine.app) | |
sudo tmutil delete /Volumes/Time Machine Backups/Backups.backupdb/$(MACHINE_NAME)/$(DATE) | |
# If you have your backups stored in a sparsebundle you can reclaim the freed space with this: | |
sudo hdiutil compact $(DISK_IMAGE_PATH) | |
# Use this if you are on battery and receive a odd warning from the command above ;) | |
sudo hdiutil compact $(DISK_IMAGE_PATH) -batteryallowed |