Skip to content

Instantly share code, notes, and snippets.

@VcamX
VcamX / compress-pdf-with-gs.md
Created October 2, 2016 02:30 — forked from guifromrio/compress-pdf-with-gs.md
Compress PDF files with ghostscript

This can reduce files to ~15% of their size (2.3M to 345K, in one case) with no obvious degradation of quality.

ghostscript -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf

Other options for PDFSETTINGS:

  • /screen selects low-resolution output similar to the Acrobat Distiller "Screen Optimized" setting.
  • /ebook selects medium-resolution output similar to the Acrobat Distiller "eBook" setting.
  • /printer selects output similar to the Acrobat Distiller "Print Optimized" setting.
  • /prepress selects output similar to Acrobat Distiller "Prepress Optimized" setting.
@VcamX
VcamX / apple_dns
Created March 5, 2016 05:47 — forked from billryan/apple_dns
Unbound configuration
forward-zone:
name: "apple.com"
forward-addr: 223.5.5.5
forward-zone:
name: "itunes.com"
forward-addr: 223.5.5.5
forward-zone:
name: "akadns.net"
forward-addr: 223.5.5.5
forward-zone:
@VcamX
VcamX / gist:f26066fd09a992cbce6e
Last active August 29, 2015 14:15
Bug reproduction for T57140
#
# Case 0
# ==============================================
# user-config.py:
#
# family = 'local'
# mylang = 'en'
# usernames['local']['en'] = u'VcamX'
# sysopnames['local']['en'] = u'VcamX'
# password_file = 'password'