Skip to content

Instantly share code, notes, and snippets.

View samizdat-shell-help.bash
### my-script — does one thing well
### Usage:
### my-script <input> <output>
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
Juul /
Last active Feb 24, 2021
How to configure a reverse SSH tunnel that auto-establishes and auto-reconnects

This is a brief guide on how to configure an SSH reverse tunnel that automatically establishes on boot and will continuously attempt to re-connect when it fails.

It is very useful if you are deploying a device somewhere without a public IP, e.g. behind a NAT, and need to be able to SSH into it from the wider internet.

Let's refer to the NAT'ed device as the client. This guide assumes that the client is able to create outgoing SSH connections to at least destination port 443.

You will need root access to a server with a static IP on the internet which runs an openssh server.

On add the following to /etc/ssh/sshd_config, changing tunnel-user to whichever username you want to use (this will be a new user, not an exising user) and changing the PermitOpen line:

Juul /
Created Nov 10, 2019

sit tunnel


ip tunnel add sit1 mode sit ttl 100 remote local
ip addr add dev sit1
ip link set dev sit1 up
echo 1 > /proc/sys/net/ipv4/ip_forward
AnatomicJC /
Created Oct 6, 2019
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

Domin8-IPTV / web-fm.php
Created Jun 24, 2019
browser based file manager sign in username and password with MD5 encryption
View web-fm.php
* File Manager Script
// Default language ('en' and other from 'filemanager-l10n.php')
$lang = 'en';
// Auth with login/password (set true/false to enable/disable it)
$use_auth = true;
Domin8-IPTV /
Created Jun 17, 2019
create hls live stream from files
# Change this to path of file to stream /edit/to/vod/path.mp4
### 480x video400kbps audio40kbps ###
mediaStreams="-map 0"
audCodec="-acodec mp2"
audKbps="-b:a 40k"
Juul /
Created May 29, 2019
How to use Let's Encrypt / certbot with a reverse proxy

apache config

The secret sauce is:

<Location /.well-known>
    ProxyPass !
aptgetupgrade /
Last active Apr 1, 2021
code to poll emails from an IMAP email server and post these to wallabag
# Read email in inbox, look for any URLs and update them to wallabag, delete email if URLs found in it.
# Built from various internet sources. Final code donated under GPL v3 by Github user aptgetupgrade
# Tested using python 2. Could be run as part of a crontab, e.g. every 5 mins.
import sys
import imaplib
import getpass
import email
import email.header
import datetime
Juul /
Last active Jul 22, 2021
How to use 4G LTE modems like the MC7455 on both Debian/Ubuntu and OpenWRT using MBIM

The purpose of this document is to get you familiar with the concepts and command line tools involved with connecting to the internet using modern 4G LTE modems on both Debian/Ubuntu and OpenWRT.

This writeup is based on my experiences with the Sierra Wireless AirPrime MC7455 modem and a Calyx (Sprint) SIM card, but it should apply to most modern 4G LTE modems.

High level overview

These are the steps required:

  • Physically connect antennas
View population.csv
Series Name,Series Code,Country Name,Country Code,2016 [YR2016]
"Population, total",SP.POP.TOTL,Afghanistan,AFG,34656032
"Population, total",SP.POP.TOTL,Albania,ALB,2876101
"Population, total",SP.POP.TOTL,Algeria,DZA,40606052
"Population, total",SP.POP.TOTL,American Samoa,ASM,55599
"Population, total",SP.POP.TOTL,Andorra,AND,77281
"Population, total",SP.POP.TOTL,Angola,AGO,28813463
"Population, total",SP.POP.TOTL,Antigua and Barbuda,ATG,100963
"Population, total",SP.POP.TOTL,Argentina,ARG,43847430
"Population, total",SP.POP.TOTL,Armenia,ARM,2924816