Skip to content

Instantly share code, notes, and snippets.

View seyDoggy's full-sized avatar

Adam Merrifield seyDoggy

View GitHub Profile
@seyDoggy
seyDoggy / base64-encode.sh
Created October 15, 2012 18:05
command line snippet to encode images to a base64 string.
openssl base64 < path/to/file.png | tr -d '\n' | pbcopy
@seyDoggy
seyDoggy / s3cmd-put.sh
Created October 15, 2012 18:58
s3cmd put command
s3cmd put common.min.js s3://seydesign/rw/ -m application/javascript -P --add-header=Cache-Control:max-age=0
@seyDoggy
seyDoggy / yui-js-compression.sh
Created October 16, 2012 14:28
yui JavaScript compression
yui --type js infile -o outfile
@seyDoggy
seyDoggy / regex for plist array.txt
Created October 31, 2012 10:38
regex for plist array
<array>[\s\S]*</array>
@seyDoggy
seyDoggy / zip all files.sh
Created October 31, 2012 13:37
Shell script to zip all files in a folder.
FILES=./*; for f in $FILES; do ditto -ck "$f" "$f.zip"; done
@seyDoggy
seyDoggy / rename-batch-files.sh
Created October 31, 2012 15:17
Unix rename command
rename "s/old-pattern/new-pattern/" *.zip
@seyDoggy
seyDoggy / show-responsive-sub-pages.js
Created November 1, 2012 10:29
Make responsive menu sub pages visible in seydesign themes.
// show nested sub pages
if (nav_toolbar3.find(" > ul li > ul")) {
nav_toolbar3.find("a.current").siblings("ul").css("display", "block").end().parents("ul").css("display", "block");
}
@seyDoggy
seyDoggy / extract-release-notes-regex.txt
Created November 1, 2012 11:25
regex to extract release html notes from my git logs.
[\s]*<<[^>]*>>[\s]*
@seyDoggy
seyDoggy / batch-image-resize.sh
Created November 6, 2012 21:05
Batch image resize with command line sips. Note: Sizes are height then width.
for f in *; do sips -z 193 309 $f; done;
@seyDoggy
seyDoggy / kwdm-jquery-plugin.js
Created November 8, 2012 00:32
Sample jquery plugin used at #KWDM
# plugin code
(function($){
$.fn.myTallest = function(){
var tallest = 0,
thisTallest = 0;
$(this).each(function(){
thisTallest = $(this).height();
if (thisTallest > tallest) tallest = thisTallest;
}).height(tallest);