Skip to content

Instantly share code, notes, and snippets.

@brendangregg
brendangregg / dockerpsns.sh
Last active August 23, 2023 10:11
docker ps --namespaces
#!/bin/bash
#
# dockerpsns - proof of concept for a "docker ps --namespaces".
#
# USAGE: ./dockerpsns.sh
#
# This lists containers, their init PIDs, and namespace IDs. If container
# namespaces equal the host namespace, they are colored red (this can be
# disabled by setting color=0 below).
#
@coreymartella
coreymartella / git-commiturl
Created May 2, 2012 18:57
Get a commit url for sharing
#!/usr/bin/env ruby
######
# To Install
# sudo wget https://raw.github.com/gist/2579234/git-commiturl -O /usr/local/bin/git-commiturl
# sudo chmod +x /usr/local/bin/git-commiturl
#
# To use
# git commiturl # gets the HEAD commit hash and copies a github url for it
# git commiturl -c 3dfcb4e7143d0c200e980ee2f65759157e066651 -o #copies a url for a specific commit hash AND opens it in your local browser