Skip to content

Instantly share code, notes, and snippets.

View nevesnunes's full-sized avatar


View GitHub Profile
nevesnunes /
Last active April 7, 2024 07:24 — forked from hanjianwei/
Extract title from pdf file.
#!/usr/bin/env python2.7
Extract title from PDF file.
pip install --user unidecode pyPDF PDFMiner
find . -name "*.pdf" | xargs -I{} pdftitle -d tmp --rename {}
nevesnunes /
Created July 6, 2020 12:55 — forked from florianbeer/set-tmux-title
Set tmux pane title to short hostname on ssh connections
ssh() {
# grep -w: match command names such as "tmux-2.1" or "tmux: server"
if ps -p $$ -o ppid= \
| xargs -i ps -p {} -o comm= \
| grep -qw tmux; then
# Note: Options without parameter were hardcoded,
# in order to distinguish an option's parameter from the destination.
# s/[[:space:]]*\(\( | spaces before options
# \(-[46AaCfGgKkMNnqsTtVvXxYy]\)\| | option without parameter
nevesnunes / openssl_client.c
Last active February 7, 2022 13:51 — forked from MartinMReed/openssl_client.c
OpenSSL Client, Reference Example
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#define HOST ""
* Example SSL client that connects to the HOST defined above,
* and prints out the raw response to stdout.