Skip to content

Instantly share code, notes, and snippets.

View SandeepTuniki's full-sized avatar

Sandeep Tuniki SandeepTuniki

View GitHub Profile
@SandeepTuniki
SandeepTuniki / watch.sh
Created February 1, 2017 15:59 — forked from mikesmullin/watch.sh
watch is a linux bash script to monitor file modification recursively and execute bash commands as changes occur
#!/usr/bin/env bash
# script: watch
# author: Mike Smullin <[email protected]>
# license: GPLv3
# description:
# watches the given path for changes
# and executes a given command when changes occur
# usage:
# watch <path> <cmd...>
#
@SandeepTuniki
SandeepTuniki / countCSSRules.js
Created October 3, 2016 06:19 — forked from psebborn/countCSSRules.js
Count the number of rules and selectors for CSS files on the page. Flags up the >4096 threshold that confuses IE
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
@SandeepTuniki
SandeepTuniki / gitkeep
Created August 24, 2016 08:55 — forked from simoncoulton/gitkeep
Create empty gitkeep files in directories that are empty
find . -type d -empty -exec touch {}/.gitkeep \;