Skip to content

Instantly share code, notes, and snippets.

View bishwanathjha's full-sized avatar
🏠
Working from home

Bishwanath Jha bishwanathjha

🏠
Working from home
View GitHub Profile
@bishwanathjha
bishwanathjha / tmux.conf
Created November 15, 2017 17:30 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@insytes
insytes / mysqldump-ignore-multiple-tables
Created December 14, 2016 01:30
mysqldump ignore multiple tables
mysqldump -u root -p database --ignore-table=database.table1 --ignore-table=database.table2 > dump.sql
@guifromrio
guifromrio / 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.