Skip to content

Instantly share code, notes, and snippets.

View aaguilera's full-sized avatar

Angel Aguilera aaguilera

View GitHub Profile
@aaguilera
aaguilera / markdown2pdf.sh
Created October 7, 2022 13:09
Convert Markdown to PDF via Pandoc
pandoc document.md -o document.pdf \
-V geometry:"top=2cm, bottom=1.5cm, left=2.5cm, right=1.5cm" \ # output PDF margins
--highlight-style=tango # syntax highlight theme
@aaguilera
aaguilera / fuckForticlient.sh
Last active June 20, 2023 08:00 — forked from nonamed01/fuckForticlient.sh
fuckForticlient, a command-line client to connect to SAML fortivpn servers by using openfortivpn and the --cookie-in-stdin parameter
#!/bin/bash
# Uncomment the following line to debug the script:
#set -x
#####################################################################################
# fuckForticlient.sh
#
# Script to authenticate against Fortinet SAML servers using Firefox and
# openfortivpn. This replaces Forticlient for GNU/Linux completely.
# Because openfortivpn does not support SAML login (yet), this script uses Firefox
# to authenticate, grabs SVPNCOOKIE and then calls openfortivpn to setup
Found here: https://www.documentsnap.com/reduce-pdf-file-size-ghostscript/
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile=output.pdf input.pdf