Skip to content

Instantly share code, notes, and snippets.

View pcapriotti's full-sized avatar

Paolo Capriotti pcapriotti

View GitHub Profile

Keybase proof

I hereby claim:

  • I am pcapriotti on github.
  • I am pcapriotti (https://keybase.io/pcapriotti) on keybase.
  • I have a public key whose fingerprint is 2461 C117 39FE 5784 858C 9F18 DF96 7258 59FA 1C1F

To claim this, I am signing this object:

@pcapriotti
pcapriotti / arxiv.sh
Created December 7, 2016 18:20
ArXiv submission script
#!/bin/bash
# prepare submission tarball for arXiv.org
set -e
usage() {
echo "Usage: $0 DEST SOURCE..."
exit 1
}
on_exit() {
@pcapriotti
pcapriotti / newgist
Last active December 7, 2016 21:28
Script to create a new gist
#!/bin/bash
set -e
usage() {
echo "Usage: $0 [-f FILE] [-n NAME] [-l LANGUAGE] [-p] [-d] DESCRIPTION" 2>&1
exit 1
}
public=true
dryrun=false
@pcapriotti
pcapriotti / pagination_link
Last active April 8, 2019 19:29
Extract next link from HTTP header
@pcapriotti
pcapriotti / allrepos
Last active July 22, 2024 11:08
List all personal repositories from git hosting services
#!/bin/bash
set -e
usage() {
echo "Usage: $0 USERNAME" 2>&1
exit 1
}
username="$1"
[ -z "$username" ] && usage
@pcapriotti
pcapriotti / i3-exit
Created March 28, 2017 12:46
lock/logout script
#!/bin/bash -e
WALLPAPER_DIR="$HOME/backup/content/pictures/wallpapers"
function lock() {
local wp="$(scaled_wallpaper)"
local cmdline=""
[ -z "$wp" ] || cmdline="-i $wp"
function revert() {