Skip to content

Instantly share code, notes, and snippets.

@mikhailov
mikhailov / gist:9639593
Last active September 24, 2024 11:28
Nginx S3 Proxy with caching
events {
worker_connections 1024;
}
http {
default_type text/html;
access_log /dev/stdout;
sendfile on;
keepalive_timeout 65;
@drawveloper
drawveloper / compress-pdf-with-gs.md
Created August 30, 2013 14:39
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.
@christianchristensen
christianchristensen / semver_notes.md
Created May 13, 2013 16:04
Semantic Versioning (SemVer) Notes

https://github.com/isaacs/node-semver | isaacs/node-semver · GitHub https://github.com/isaacs/node-semver/blob/master/semver.js | node-semver/semver.js at master · isaacs/node-semver · GitHub https://www.google.com/search?q=semver+bash&aq=f&oq=semver+bash&aqs=chrome.0.57.2035j0&sourceid=chrome&ie=UTF-8 | semver bash - Google Search https://gist.github.com/ericbmerritt/4013729 | A script to generate a valid semver version in any git repo http://stackoverflow.com/questions/10228073/looking-for-a-way-automate-the-bump-version-with-git-flow | bash - Looking for a way automate the "bump version" with git flow - Stack Overflow https://gist.github.com/petervanderdoes/2877083 | gitflow hooks and filters for WordPress theme development https://gist.github.com/petervanderdoes/2878492 | gitflow hooks and filter for gitflow development https://github.com/frankvilhelmsen/meedings/blob/master/semver.sh | meedings/semver.sh at master · frankvilhelmsen/meedings · GitHub http://semver.org/spec/v1.0.0.html | Semantic Versionin