Skip to content

Instantly share code, notes, and snippets.


Francesco Pira pirafrank

View GitHub Profile
pirafrank /
Created Oct 18, 2020 — forked from Knight1/
Hetzner Cloud create temporary Windows Servers
ID=`hcloud server list | tail -1 | grep Windoof | awk '{print $1;}'`
CONTEXT=`hcloud context active`
if [ "$CONTEXT" != "testing" ]; then
echo "[CRIT] Aborting, wrong context"
pirafrank /
Created Sep 19, 2018 — forked from subfuzion/
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

pirafrank /
Created Mar 4, 2017 — forked from MatthieuLemoine/
Install CouchDB from source on Debian Jessie
# Inspired by
# Erlang
echo -e "deb jessie contrib" | sudo tee /etc/apt/sources.list.d/erlang-solutions.list
wget -qO - | sudo apt-key add -
# Update packages
sudo apt-get update
View My Exiftool

Last updated: 2015-08-11

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

pirafrank / .lftp.mockup.rc
Created Dec 10, 2016 — forked from gaubert/.lftp.mockup.rc
~/.lftp.rc parameters detailed
View .lftp.mockup.rc
########## SETTINGS
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on.
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g.
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g.
# 'sleep forever' or 'set dns:cache-expire never'.

Jekyll & Liquid Cheatsheet

A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.


Running a local server for testing purposes:

pirafrank / search.html
Created Aug 19, 2016 — forked from flohei/search.html
An example search page for Jekyll running the jekyll-lunr-js-search plugin.
View search.html
layout: default
permalink: /search/
<div class="home">
pirafrank / version_compare.js
Created Feb 25, 2016 — forked from TheDistantSea/version_compare.js
Function to compare two version strings (e.g. "1.6.1" is smaller than "1.7"). Developed in order to answer
View version_compare.js
* Compares two software version numbers (e.g. "1.7.1" or "1.2b").
* This function was born in
* @param {string} v1 The first version to be compared.
* @param {string} v2 The second version to be compared.
* @param {object} [options] Optional flags that affect comparison behavior:
* <ul>
* <li>
pirafrank /
Created Feb 3, 2016 — forked from h2non/
libvips 7.42.x cross-platform simple installer script (supports OSX, Debian, Ubuntu, CentOS, Fedora, Amazon Linux)
# Orinally made by Lovell Fuller for sharp
# Usage:
# curl -s | sudo bash -
pirafrank /
Created Jan 6, 2016 — forked from MalphasWats/
Post to GitHub Pages from Editorial
#coding: utf-8
import keychain
import console
import editor
import time
import re
import requests
import json