Skip to content

Instantly share code, notes, and snippets.

@jamiely
jamiely / text.md
Created June 19, 2018 02:47
When piping with jq, always include some pattern

How to pipe with jq. Make sure to include a pattern:

jq . < text.json | tee results.json

NOT

jq &lt; text.json | tee results.json
@jamiely
jamiely / text.md
Created June 19, 2018 02:45
Encrypt/Decrypt a file for yourself using keybase

Encrypt a file for yourself using keybase

keybase encrypt my_keybase_username -b -i my.tgz -o my.tgz.enc

Decrypt

keybase decrypt -i my.tgz.enc -o my.tgz
@jamiely
jamiely / text.md
Created June 19, 2018 02:42
Run `mvn compile` whenever a Java file changes in a particular directory.

Run mvn compile whenever a Java file changes in a particular directory.

brew install watchman
watchman-make --make mvn -p 'src/main/java/**/*.java' -t compile
@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 / sge.rb
Created November 25, 2011 21:09
Homebrew file for SGE (an SDL library)
require 'formula'
class Sge < Formula
url 'http://www.digitalfanatics.org/cal/sge/files/sge030809.tar.gz'
homepage 'http://www.digitalfanatics.org/cal/sge/'
md5 'a76975665b6a2bf189130fa2c8821caf'
depends_on "sdl"
depends_on "sdl_image"
<!DOCTYPE html />
<html>
<head>
<style>
#board2 {
border: 1px black solid;
display: inline-block;
}
#board2 .cell {
  1. Install Vim
  2. Find Vim Home via :echo $HOME
  3. Put _gvimrc in that location: https://gist.github.com/jamiely/6436529
  4. Install vundle in $HOME\vimfiles\bundle\vundle
  5. Use the following vundle options:
  • Note to call vundle#rc with the following path call vundle#rc("~/vimfiles/bundle")
@jamiely
jamiely / _gvimrc
Created September 4, 2013 12:54
For use on windows
# Windows-specific
color desert " Default to desert as a last resort
color Tomorrow-Night-Bright
set guifont=Inconsolata:h20
" Creates a right-hand margin
:set colorcolumn=80