Skip to content

Instantly share code, notes, and snippets.

Francisco A. Lozano flozano

  • Kii corporation
  • Valencia, Spain
View GitHub Profile
View pdf-utils.sh
#!/bin/bash
# Merge pages from a1 and a2 into b
qpdf --empty --pages a1.pdf 1-z a2.pdf 1-z -- b.pdf
# Merge pages from a* into b
qpdf --empty --pages $(for i in a*.pdf; do echo $i 1-z; done) -- b.pdf
# Remove password
qpdf -password=mypassword -decrypt source_with_password.pdf target_without_password.pdf
@flozano
flozano / mkcacerts
Last active May 9, 2018 — forked from jimblom/certs.sh
Update Java cacerts - enforce JKS type
View mkcacerts
#!/bin/sh
# Script provided by http://www.linuxfromscratch.org/blfs/view/svn/general/openjdk.html#ojdk-certs
# EB 20141217: removed bashisms
# Simple script to extract x509 certificates and create a JRE cacerts file.
get_args()
{
if test -z "${1}" ; then
showhelp
exit 1
View show_mysql_charset.sql
SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%'
View gpg-agent setup
eval $(gpg-agent --daemon --no-grab --write-env-file $HOME/.gpg-agent-info)
export GPG_TTY=$(tty)
export GPG_AGENT_INFO
You can’t perform that action at this time.