Skip to content

Instantly share code, notes, and snippets.

View shaneriley's full-sized avatar

Shane Riley shaneriley

View GitHub Profile
@shaneriley
shaneriley / optimize.sh
Created April 7, 2016 14:28 — forked from ryansully/optimize.sh
image optimization script (pngcrush & jpegtran)
#!/bin/sh
# script for optimizing images in a directory (recursive)
# pngcrush & jpegtran settings from:
# http://developer.yahoo.com/performance/rules.html#opt_images
# pngcrush
for png in `find $1 -iname "*.png"`; do
echo "crushing $png ..."
pngcrush -rem alla -reduce -brute "$png" temp.png
@shaneriley
shaneriley / AHHHHHHH
Created August 21, 2012 18:00 — forked from lessallan/AHHHHHHH
@for sass function issue
$colors: lighten(#026dbd, 45%), lighten(#fad52c, 20%), lighten(#f17d32, 20%), lighten(#da1c1c, 25%), lighten(#8266ba, 20%), lighten(#7bb545, 17%)
$i: 1
@each $color in $colors
&:nth-child(#{$i})
background-color: $color
$i: $i + 1