Skip to content

Instantly share code, notes, and snippets.

@jamiely
jamiely / text.md
Created June 19, 2018 02:41
Create a PDF from images, auto rotating based on exif data, downsampling images, reducing quality, and stripping exif data.

Create a PDF from images, auto rotating based on exif data, downsampling images, reducing quality, and stripping exif data.

convert -auto-orient -quality 85% -sampling-factor 4:2:0 -strip *.jpg my.pdf
@jamiely
jamiely / text.md
Last active June 19, 2018 02:38
Change the modified date of a file to match its creation date in the exif data

Change the modified date of a file to match its creation date in the exif data

brew install exiftool
exiftool '-filemodifydate<createdate' *.jpg

Keybase proof

I hereby claim:

  • I am jamiely on github.
  • I am jamiely (https://keybase.io/jamiely) on keybase.
  • I have a public key ASCA0hNk_0pIviZlLMAUVthkYBGdIwmVukXxZwurra7fwAo

To claim this, I am signing this object:

@jamiely
jamiely / -
Created November 3, 2015 16:49
test
# extracts the first potential in a goodrom set
#
require 'tmpdir'
require 'fileutils'
def extract_zip(tmpdir, filename)
cmd = "unzip -d\"#{tmpdir}\" -q \"#{filename}\""
STDERR.puts "Attempting command #{cmd}"
`#{cmd}`
# extracts the first potential in a goodrom set
#
require 'tmpdir'
require 'fileutils'
def extract_7z(tmpdir, filename)
cmd = "7z e -yo\"#{tmpdir}\" \"#{filename}\""
STDERR.puts "Attempting command #{cmd}"
`#{cmd}`
end
@jamiely
jamiely / poker_match.md
Last active August 29, 2015 14:19
poker_match.md
title
Poker Match a Game Using Phaser

Intro

It's been too long since I posted a new entry in this blog. Since I'm not working on anything in particular at the moment, at least in my personal time, I thought I'd comment on the game I wrote in January using the Phaser game framework.

def denoms()
[25, 10, 5, 1]
end
# we want to build a table which
# has the amount of cents, and an
# object containing two properties.
# {
# 31 => {
# :count => 3,
@jamiely
jamiely / entry.md
Created June 23, 2014 14:25
iOS Split View Top-Bottom Controller

Summary

Wherein I create a simple top-bottom split view, incorporating pull-to-reveal.

Intro

I needed a container view similar to a split view, but more like a pull-down to refresh. I looked at various options including MGSplitViewController.