Photography
Files > 50M older than 4 years
find /somedir -type f -size +50000k -mtime +1095 -exec ls -lh {} \; | awk '{ print $6 "/" $8 " " $9 $10 $11 ": " $5 }'
Shell script date calculations
#!/bin/sh before="$(date +%s)" echo $before sleep 5 Ymd="$(date '+%Y%m%d')" echo $Ymd after="$(date +%s)" echo $after elapsed_seconds="$(expr $after - $before)" echo Elapsed time for code block: $elapsed_seconds
HEYU: Can't open tty line. Check the permissions.
I occasionally get this error when trying to run a heyu command from CLI. This should fix your problem: (As root) chmod 777 /dev/ttyS0
Date Calc using PHP
Need to calculate a date in the future or past? $eight_days_ago = date('Ymd', mktime(0,0,0,date("m"),date("d")-8,date("Y")));
iPhone Gripes
After playing with an iPhone for a few weeks, here are a few of my biggest gripes: Shorter battery life than my Blackberry Slower email composition (more steps) No keyboard shortcuts No consolidated Inbox Ergonomics: isn't as comfortable in my hand No visual indicator...