sleepingsucks

Imagemagick on OSX

Posted in Uncategorized by cdeschenes on October 26, 2014

Using Homebrew

  • $ brew update
  • $ brew cleanup
  • $ brew doctor
  • $ brew install imagemagick

That should do it.

Advertisements

Use a USB to Serial adapter on a Macbook

Posted in Uncategorized by cdeschenes on October 22, 2014

Open terminal app or download iTerm

Type: ls /dev/tty.\*

plug in USB to Serial adapter and re-run the previous command. You should see a new tty.XXXXXX that is for the USB device.

Mine is /dev/tty.usbserial-A702XH8W

Were going to use screen to connect to a remote terminal VIA USB. You need to specify the speed of the connection. The defaults are defaults to databits=8, parity=none, stopbits=1

screen /dev/ttySX baud_rate,cs8|cs7,ixon|-ixon,ixoff|-ixoff,istrip|-istrip
  • /dev/ttySX: Linux serial port (e.g., /dev/ttyS0 [COM1] )
  • baud_rate: Usually 300, 1200, 9600 or 19200. This affects transmission as well as receive speed.
  • cs8 or cs7: Specify the transmission of eight (or seven) bits per byte.
  • ixon or -ixon: Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data.
  • ixoff or -ixoff: Enables (or disables) software flow-control for receiving data.
  • istrip or -istrip: Clear (or keep) the eight bit in each received byte.

Open a terminal windows and type:

screen /dev/tty.usbserial-A702XH8W 9600

QPDF Command Line Decryption

Posted in Uncategorized by cdeschenes on October 19, 2014

OS X: # brew install qpdf

qpdf –decrypt inputfile.pdf outputfile.pdf

This may work in windows

@echo off

setlocal enableextensions disabledelayedexpansion

if not exist output\ md output
for %%a in (*.pdf) do qpdf –decrypt “%%~fa” “output\%%~nxa”

Package manager for OS X

Posted in Uncategorized by cdeschenes on October 19, 2014

Homebrew

http://brew.sh/

Install Homebrew

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"