Skip to content

Instantly share code, notes, and snippets.

@shello
shello / onchange.sh
Last active August 29, 2015 14:02 — forked from senko/onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute a command
# when a file or directory is created, modified or deleted.
#
# Modified from the original by: Senko Rasic <senko.rasic@dobarkod.hr>
# https://gist.github.com/senko/1154509
#
# Requires:
# bash
@shello
shello / chrome.css
Created May 18, 2012 15:13 — forked from meqif/chrome.css
Travis-CI maximized main column
body#home { background: none; }
div#left { display: none; width: 0px; }
div#main { padding-left: 100px !important; }
#main .tabs { padding-left: 12px; margin-top: 20px; }
@shello
shello / du_sort.py
Created June 7, 2011 22:16 — forked from meqif/du_sort.py
Short script for sorting 'du' output correctly. meqif did it in both Ruby and Python as practice; I perfected the python version.
#!/usr/bin/env python
import sys
UNIT_FACTORS = {'B': 0, 'K': 1, 'M': 2, 'G': 3, 'T': 4, 'P': 5}
def bytes_multiplier(unit):
if UNIT_FACTORS.has_key(unit):
return 1024 ** UNIT_FACTORS[unit]
else: