Skip to content

Instantly share code, notes, and snippets.

Francesco Pira pirafrank

Block or report user

Report or block pirafrank

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tinyproxy.conf
##
## tinyproxy.conf -- tinyproxy daemon configuration file
##
## This example tinyproxy.conf file contains example settings
## with explanations in comments. For decriptions of all
## parameters, see the tinproxy.conf(5) manual page.
##
#
# User/Group: This allows you to set the user and group that will be
@pirafrank
pirafrank / SauceCode_NerdFont.css
Created Jan 15, 2020
Sauce Code NerdFont packed for Blink Shell iOS. Actual font is embedded in CSS file. Font downloaded from nerdfonts.com, credits to them.
View SauceCode_NerdFont.css
This file has been truncated, but you can view the full file.
@font-face {
font-family: "Sauce Code Nerdfont";
font-style: normal;
font-weight: 400;
@pirafrank
pirafrank / DejaVuSansMono_NerdFont_Mono.css
Created Jan 15, 2020
DejaVuSansMono NerdFont Mono packed for Blink Shell iOS. Actual font is embedded in CSS file. DejaVuSansMono NerdFont Mono downloaded from nerdfonts.com. Credits to them.
View DejaVuSansMono_NerdFont_Mono.css
This file has been truncated, but you can view the full file.
@font-face {
font-family: "DejaVuSansMono NerdFont Mono";
font-style: normal;
font-weight: normal;
@pirafrank
pirafrank / JetBrainsMono.css
Created Jan 15, 2020
JetBrainsMono.css font for Blink Shell. Credits to JetBrains. https://www.jetbrains.com/lp/mono/
View JetBrainsMono.css
This file has been truncated, but you can view the full file.
@font-face {
font-family: "JetBrainsMono";
font-style: italic;
font-weight: bold;
@pirafrank
pirafrank / nordvpn_download.sh
Created Jan 7, 2020
download .ovpn files per country from nordvpn website
View nordvpn_download.sh
#!/bin/bash
country="$1"
# e.g. fr, it, de, etc.
mkdir -p "$country/UDP"
cd $country/UDP
curl -sSL https://nordvpn.com/ovpn | grep -E "\/$country[0-9]*.nordvpn.com" | grep 'UDP' | cut -d'"' -f2 | xargs wget
cd ..
mkdir TCP
@pirafrank
pirafrank / basebalance.py
Last active Jul 9, 2019
quick way to check your Coinbase balance for listed currencies
View basebalance.py
import json
from coinbase.wallet.client import Client
with open('app/credentials.json', 'r') as f:
credentials = json.load(f)
client = Client(credentials["api_key"],
credentials["api_secret"],
api_version='2016-03-03')
@pirafrank
pirafrank / scaleway_vm.sh
Last active Jan 7, 2020
creating, starting, listing and killing Scaleway VMs via script in Pythonista for iOS
View scaleway_vm.sh
#! python2
import console
import dialogs
import urllib2
import json
import requests
import time
api_token = "aaabbb11-9087-5678-1234-000000aaaaaa"
@pirafrank
pirafrank / git_mirror.sh
Created Dec 17, 2018
mirror your git repos to make a backup
View git_mirror.sh
#!/bin/bash
for url in $(ssh git.example.com ls-urls)
do
echo "Cloning $url ..."
git clone --mirror "$url"
done
@pirafrank
pirafrank / ovpn_generator.conf
Last active Jan 9, 2019
Generator of .ovpn files with hardened client config and embedded cert, key and ta.key.
View ovpn_generator.conf
client
dev tun
proto udp
remote <SERVER> <PORT>
resolv-retry infinite
nobind
persist-key
persist-tun
key-direction 1 # <-- DO NOT change this! (server.conf must have: tls-auth ta.key 0)
cipher AES-256-CBC
@pirafrank
pirafrank / exif_datetime_setter.sh
Last active Sep 28, 2018
Update EXIF datetime data from filename pattern (if not set) or update file timestamps from EXIF metadata (if it is set)
View exif_datetime_setter.sh
#!/bin/bash
# Simple script to parse JPG photo filename and set exif datetime,
# creation date and file modification date accordingly.
# Filename pattern is YYYYMMDD_hhmmss.
# Timezone is taken by your PC.
# exec this script by searching for .JPG and .jpg files in given folder
# find . -type f -name "*.JPG" -o -name "*.jpg" -exec /path/to/exif_datetime_setter.sh {} \;
You can’t perform that action at this time.