Skip to content

Instantly share code, notes, and snippets.

@imskojs
Last active March 17, 2016 07:58
Show Gist options
  • Save imskojs/9a419a0d19778370baf1 to your computer and use it in GitHub Desktop.
Save imskojs/9a419a0d19778370baf1 to your computer and use it in GitHub Desktop.
Server_Development
// sails Objects immutable or mutable?
// mutable only when populate is NOT called
// immutable when populate is called.
// Downgrade node to 0.12.x
// Ubuntu
curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
sudo apt-get install -y nodejs
// Mac
brew tap homebrew/versions
brew search node
brew unlink node
brew install homebrew/versions/node012
// Reduce PDF size
brew install imagemagick
brew install ghostscript
// Only use this together with gs if gs does not work alone
convert -density 600 -set units PixelsPerInch INPUT.pdf pag_%02d.jpg
convert *.jpg -quality 75 -set units PixelsPerInch INPUT.pdf
rm *.jpg
// gs
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out/INPUT.pdf INPUT.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment