Skip to content

Instantly share code, notes, and snippets.


Niels van der Zanden scarhand

  • Phusion (
View GitHub Profile

Keybase proof

I hereby claim:

  • I am scarhand on github.
  • I am scarhand ( on keybase.
  • I have a public key whose fingerprint is C75E 02CE 7045 C9A7 5385 D98E C8B1 850C A994 C6D5

To claim this, I am signing this object:

scarhand / .bash_aliases
Last active Nov 17, 2015
Docker aliases
View .bash_aliases
# docker aliases
alias dps='docker ps'
alias dpsa='docker ps -a'
alias diip='docker inspect --format "{{ .NetworkSettings.IPAddress }}"'
alias dstats='docker stats $(docker inspect --format="{{ .Name }}" `docker ps -q`)'
alias druby='docker run -it --rm --entrypoint=/bin/bash scarhand/vim-ruby'
alias dclean='docker rmi $(docker images | grep "^<none>" | awk "{print $3}")'
function dex {
if [ -z "$2" ]; then
View JavaScript

Adding a JavaScript file to an html document

As a rule of thumb, JavaScript (JS) files should always be included at the end of the document. Most of the times the JS will interact with elements on the page. Putting the JS at the bottom of the document will reduce the chance that an element that is to be interacted with does not exist. JavaScript can be included from an external file, or placed directly inside the document. The former is in general preferred because it increases maintainability and reusability. Directly in the document:

    <script type="text/javascript">