Skip to content

Instantly share code, notes, and snippets.

@tobrien
tobrien / Turning Original PNGs into Print and Web Images
Created March 18, 2011 16:54
This is a problem I used to solve with Photoshop macros. Here's the problem to be solved. You have hundreds of screen captures and you want to turn these screen captures into images with a dropshadow that will be included in a book. Add to this the
#!/bin/bash
# Convert Originals to Web Images
for IMAGE in `find ./orig -name "*.png"`
do
DEST_IMAGE=./web/`basename $IMAGE`
if [[ ! -e $DEST_IMAGE || $IMAGE -nt $DEST_IMAGE ]]
then
convert $IMAGE -verbose -compress jpeg \
-quality 80 -bordercolor None -border 10x10 \
@tobrien
tobrien / Nexus Fetch Bash Script
Created January 11, 2011 15:58
This is a simple bash script which sends a request to the Nexus redirect service. The Nexus redirect REST service takes a number of parameters, locates the matching artifact, and sends back a 301 to redirect a client. Note that this script simply prod
#!/bin/bash
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging -r repository
#shopt -o -s xtrace
# Define Nexus Configuration
NEXUS_BASE=http://repository.example.com:8081/nexus
REST_PATH=/service/local
ART_REDIR=/artifact/maven/redirect