This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### CHECK IF COMMAND IS AVAILABLE ### | |
command -v foo >/dev/null 2>&1 | |
if [ $? -eq 0 ]; then | |
#Command found | |
else | |
#command not found | |
fi | |
###GET SCRIPT DIRECTORY #### | |
DIR="$( cd "$( dirname "$0" )" && pwd )" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# usage : | |
# @param source video | |
# @param destination | |
set -e | |
### USAGE HELPER ###### | |
usage () { | |
echo "takes a thumbnail from a video" | |
echo "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <[email protected]> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var rmdir = function(dir,callback){ | |
var i=0; | |
var count = 0; | |
var clbk = function(err){ | |
count++; | |
console.log(" %s vs %s",count,i); | |
if(count >= i){ | |
fs.rmdirSync(dir); | |
callback(err) |
NewerOlder