Skip to content

Instantly share code, notes, and snippets.

View liongkj's full-sized avatar
🏫
Focusing

KJ liongkj

🏫
Focusing
View GitHub Profile
@liongkj
liongkj / compress_pdf.md
Created February 28, 2022 07:25 — forked from ahmed-musallam/compress_pdf.md
How to compress PDF with ghostscript

How to compress PDF using ghostscript

As a developer, it bothers me when someone sends me a large pdf file compared to the number of pages. Recently, I recieved a 12MB scanned document for just one letter-sized page... so I got to googlin, like I usually do, and found ghostscript!

to learn more abot ghostscript (gs): https://www.ghostscript.com/

What we are interested in, is the gs command line tool, which provides many options for manipulating PDF, but we are interested in compressign those large PDF's into small yet legible documents.

credit goes to this answer on askubuntu forum: https://askubuntu.com/questions/3382/reduce-filesize-of-a-scanned-pdf/3387#3387?newreg=bceddef8bc334e5b88bbfd17a6e7c4f9

@liongkj
liongkj / command.sh
Last active May 26, 2022 09:32 — forked from zqqf16/IKEv2.mobileconfig
上海交大vpn Linux设置 strongSwan IKEv2 configurations for SJTU VPN
# Download strongSwan
wget https://download.strongswan.org/strongswan-5.9.3.tar.gz
# Extract and uncompress
tar -vzxf strongswan-5.9.3.tar.gz
cd strongswan-5.9.3
sudo apt install build-essential libgmp-dev libssl-dev