Skip to content

Instantly share code, notes, and snippets.

# Convert images to fixed size, while centering
for pic in * ; do convert $pic -background none -gravity center -extent 35x35 $pic ; done
tell application "Aperture"
activate
# Once the folder hierarchy is created, the photos must be
# moved into a project. This is the default name of the project.
set DEFAULT_PROJECT_NAME to "Photos"
set curSel to (get selection)
# Force the user to pick a selection. The parent of the selection is the container
# we'll grab all the images from to organize into the folder hierarchy.
if curSel is {} then
error "Please select a project to organize"
#!/usr/bin/env ruby
require 'rubygems'
require 'amazon/aws'
require 'amazon/aws/search'
require 'optparse'
include Amazon::AWS
include Amazon::AWS::Search
options = {}
#!/usr/bin/env python
#
# Downloads the source photos of a Picasa Web Album using the Python gdata API.
#
#####
import gdata.photos.service
import gdata.media
import gdata.geo
import urllib2
# The MIT License
#
# Copyright (c) 2009 Tom Alison
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#!/bin/bash
#
# Quick-n-dirty installation of aspell plus
# English dictionary on OSX.
######
d=`mktemp -d aspell.XXXXX`
version="0.60.6"
dict_version="6.0-0"
#!/bin/bash
#
# Simple installer for wget on OSX.
#
# Installs latest version from source.
####
d=`mktemp -d wget.XXXXX`
curl -s -o ${d}/wget.tar.gz http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz
#!/bin/bash
#
# Converts a document to a PDF file using
# unoconv and opens it with the evince viewer.
##
file=`basename $1`
dir=`dirname $1`
prefix=${file%.[^.]*}
outfile="${prefix}.pdf"
#!/bin/bash
#
# Prints a file to PDF using OpenOffice and
# CUPS-PDF. Opens output file with evince doc
# viewer.
##
CUPS_HOME="$HOME/PDF"
file=`basename $1`
#!/bin/sh
openssl x509 -in $1 -noout -text