Skip to content

Instantly share code, notes, and snippets.

View opposite-bracket's full-sized avatar

Jesus Rodriguez opposite-bracket

View GitHub Profile
@opposite-bracket
opposite-bracket / local-docker-registry.md
Created January 25, 2017 21:07
Run private local docker registry
# Run a local registry:
docker run -d -p 5000:5000 --name registry registry:2
@opposite-bracket
opposite-bracket / gist:7967303
Created December 15, 2013 01:03
Persistent Tabs with Twitter Bootstrap 3.0.0
$(document).ready(function () {
$('.nav-tabs a').click(function(e) {
e.preventDefault()
var hash = $(e.target).attr("href");
if (hash.substr(0,1) == "#") {
location.replace("#" + hash.substr(1));
}
$(this).tab('show');
});
#!/bin/bash
# Get current swap usage for all running processes
# Erik Ljungstrom 27/05/2011
# Modified by Mikko Rantalainen 2012-08-09
# Pipe the output to "sort -nk3" to get sorted output
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d -regex "^/proc/[0-9]+"`
do
PID=`echo $DIR | cut -d / -f 3`