Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jasonconnery on github.
  • I am jasonconnery (https://keybase.io/jasonconnery) on keybase.
  • I have a public key whose fingerprint is 5C8E A314 ECC7 3B08 7D3C DCB6 CE3A 9E51 8525 17BD

To claim this, I am signing this object:

@jasonconnery
jasonconnery / roundImageCorners
Created January 8, 2014 10:10
Script to round an image corners, assuming imagemagick is installed, based of comments in this SO answer : http://stackoverflow.com/questions/718314/rounding-corners-of-pictures-with-imagemagick
!# /bin/bash
# Script to round an image corners, assuming imagemagick is installed, based of comments in this SO answer : http://stackoverflow.com/questions/718314/rounding-corners-of-pictures-with-imagemagick
convert $1 \
\( +clone -alpha extract \
-draw 'fill black polygon 0,0 0,15 15,0 fill white circle 15,15 15,0' \
\( +clone -flip \) -compose Multiply -composite \
\( +clone -flop \) -compose Multiply -composite \
\) -alpha off -compose CopyOpacity -composite $2
@jasonconnery
jasonconnery / install_res.sh
Created April 10, 2013 15:46
Android SDK Resource copier
#! /bin/bash
# based on http://stackoverflow.com/questions/8798153/command-line-move-specific-files-and-keep-their-directory-structure
#
# Copy an android resource, such as an icon to the android project in the current directory. This is nice cos it takes all versions, hdpi, xhdpi, etc
# Makes assumptions about android sdk env variables, the platform level, etc so it's kinda tailored to my own setup.
workingDir=`pwd`
cd $ANDROID_HOME/platforms/android-17/data/res
find . -name $1 -print | cpio -pvdumB $workingDir/res
@jasonconnery
jasonconnery / append_build_number.sh
Created February 12, 2013 15:28
In plist file $1 , append $2 to the build number
#! /bin/bash
buildNum=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" $1) ;
echo "Existing Build Number : $buildNum" ;
newBuildNum="$buildNum.$2" ;
echo "New Build Number : $newBuildNum" ;
$(/usr/libexec/PlistBuddy -c "set CFBundleVersion $newBuildNum" $1)