This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function calculate_url { | |
curl -sSL $baseurl | \ | |
grep 'linux-x64_bin.tar.gz' | head -n1 | \ | |
grep -E "data-file[=0-9a-zA-Z'//\.%-_]*" -o | \ | |
cut -d"'" -f2 | cut -d'/' -f3- | \ | |
sed s@/otn/@/otn-pub/@g | sed s@^@https://@g | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python2 | |
# this script is for Pythonista 2 and 3 | |
# author: Francesco Pira (fpira.com) | |
import sys | |
import requests | |
from bs4 import BeautifulSoup | |
import re | |
import clipboard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data:text/html;base64,PCFET0NUWVBFIGh0bWw+DQo8IS0tDQogIFlvdSBjdXJpb3VzIDpQDQogLS0+DQo8aHRtbCBsYW5nPSJlbiI+DQo8aGVhZD4NCiAgPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5pdGlhbC1zY2FsZT0xLjAiPg0KICA8dGl0bGU+RXBoZW1lcmFsIFRleHQgRWRpdG9yPC90aXRsZT4NCiAgPHN0eWxlPg0KICAgIGJvZHkgew0KICAgICAgdGV4dC1hbGlnbjogY2VudGVyOw0KICAgICAgZm9udC1mYW1pbHk6IEFyaWFsLCBIZWx2ZXRpY2EsIHNhbnMtc2VyaWY7DQogICAgfQ0KICAgIC5iZWNvb2wgew0KICAgICAgbGluZS1oZWlnaHQ6MS41Ow0KICAgICAgZm9udC1zaXplOjE4cHg7DQogICAgICBmb250LWZhbWlseTogbW9ub3NwYWNlOw0KICAgICAgbWluLWhlaWdodDogMTBlbTsNCiAgICAgIHBhZGRpbmc6IDE1cHg7DQogICAgICBib3JkZXI6IDJweCBzb2xpZCAjMzMzMzMzOw0KICAgICAgYm9yZGVyLXJhZGl1czogNXB4Ow0KICAgICAgbWFyZ2luLWxlZnQ6IDN2dzsNCiAgICAgIG1hcmdpbi1yaWdodDogM3Z3Ow0KICAgICAgdGV4dC1hbGlnbjogbGVmdDsNCiAgICB9DQogICAgLmZvb3RlciB7DQogICAgICBwYWRkaW5nLXRvcDogMTBweDsNCiAgICAgIGZvbnQtc2l6ZTogMC45ZW07DQogICAgfQ0KICA8L3N0eWxlPg0KPC9oZWFkPg0KPGJvZHk+DQogIDxkaXYgY2xhc3M9InRvcCI+DQogICAgPHA+DQogICAgICBKdXN0IGEgcHJldHRpZXIgPGNvZGU+Y29udGVudGVkaXRhYm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ID=`hcloud server list | tail -1 | grep Windoof | awk '{print $1;}'` | |
CONTEXT=`hcloud context active` | |
if [ "$CONTEXT" != "testing" ]; then | |
echo "[CRIT] Aborting, wrong context" | |
exit | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "s3:ListAllMyBuckets", | |
"Resource": "arn:aws:s3:::*" | |
}, | |
{ | |
"Effect": "Allow", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# available as gist at https://gist.github.com/pirafrank/df40b2b082b91ed79036b328a3f010da | |
# keep it in this order to match SSHFP numbers | |
keylist="/etc/ssh/ssh_host_rsa_key.pub /etc/ssh/ssh_host_dsa_key.pub /etc/ssh/ssh_host_ecdsa_key.pub /etc/ssh/ssh_host_ed25519_key.pub" | |
SSHFP=0 | |
algolist="sha256 sha1 md5" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sometimes you only need to get JWT body data without validating it | |
# WARNING: use this only if you have already validated the token in earlier steps in the chain | |
const jwt = "eyJ0eX..."; | |
const jwtBodyJson = JSON.parse(Buffer.from(jwt.split(".")[1], "base64").toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python2 | |
#import console | |
#import dialogs | |
import urllib2 | |
import json | |
import requests | |
import time | |
api_token = "aaabbb11-9087-5678-1234-000000aaaaaa" |