Linux

Watermark pictures using exiv2

Quick and dirty batch script to watermark and add IPTC data to a set of files in the supplied dir to -Copyright. #!/bin/bash # Copyright Andy Wright – www.litost.org 2006. # You have permission to do what you want with it as long as you don’t # blame me if it insults your mother etc. […]

Read More
Linux

Crontab explained

The time and date fields are: field allowed values —– ————– minute 0-59 hour 0-23 day of month 1-31 month 0-12 (or names, see below) day of week 0-7 (0 or 7 is Sun, or use names) A field may be an asterisk (*), which always stands for “first-last”. Ranges of numbers are allowed. Ranges […]

Read More
Web

CSS Shorthand Guide

Ok. Let’s set the record straight. There is no official guide for each and every CSS shorthand property value. So let’s work together and put one together shall we? Ok. Straight to the business. Anytime I’ve ran into a specification (besides the confusing mess at the W3C), it turns into showing off a couple of […]

Read More
Scripting

Start/Stop script for a prosess run as another user

#!/bin/sh # rc.flexlm – Init.d start/stop script for the FlexLM License Manager # Variables: LM_DIR=”/usr/local/matlab71/etc” LM_BIN=”lmgrd” PROG_BIN=”$LM_DIR/glnx86/$LM_BIN” LICENSE_FILE=”$LM_DIR/license.dat” RUN_AS=flexlm LOG_FILE=”/var/log/flexlm.log” PROG_ARGS=”-c $LICENSE_FILE -l $LOG_FILE” # Sleep time for restart. SLEEP=1 start() { echo -n “Starting FlexLM License Manager ($LM_BIN): ” # already running? PID=$(pidof -s $PROG_BIN) if [ -z $PID ]; then # Initialize log […]

Read More