Skip to content

Instantly share code, notes, and snippets.

@jgambill
jgambill / gist:10401942
Created April 10, 2014 16:57
create css classes to alternate row color of a list of items using mod function #php #basics
<?php
// assuming a loop where i is incremented
if ($i % 2 == 1) $classes .= " odd";
else $classes .= " even";
?>
@jgambill
jgambill / gist:10281183
Last active August 29, 2015 13:58
Change your list bullet to a custom character in CSS —by Ryan Sechrest #css #icons http://ryansechrest.com/2012/11/change-your-list-bullet-to-a-custom-character-in-css/
ul {
list-style: none;
}
ul li:before {
color: #f00;
content: '» \0000a0'; /* unicode character for space */
font-size: 1.2em;
font-weight: bold;
}
@jgambill
jgambill / exiftool-processimage.sh
Created October 12, 2013 01:52
Use exiftool to: remove a field, copy DateTimeOriginal to all dates fields, change 'JPG' file extensions to 'jpg', rename files in chronological order using date and an incremented id #. I have this as an Automator workflow (Folder Action); therefore, these actions are performed on all image files in the specified directory (/Users/username/path…
cd /Users/username/path/to/process/folder
# remove MakerNotes field to appease iOS 7 pics in exiftool
exiftool -MakerNotes= *
# copy DateTimeOriginal to all dates fields
exiftool "-FileModifyDate<DateTimeOriginal" *
exiftool "-AllDates<FileModifyDate" *
exiftool "-FileModifyDate<CreateDate" *