Skip to content

Instantly share code, notes, and snippets.

View uribl-demo.js
const index = require("./index");
(async () => {
const results = {};
results.hstsPreloadOrg = await index.lookup("hstspreload.org", "chromium.hstspreload.lelux.fi", {
servers: ["127.0.0.1"],
includeTxt: false,
});
@theel0ja
theel0ja / tmux_on_login.sh
Created Apr 21, 2019
Tmux on shell login
View tmux_on_login.sh
# https://wiki.archlinux.org/index.php/Tmux#Start_tmux_on_every_shell_login
# https://stackoverflow.com/a/49134974
# https://gist.github.com/theel0ja/3d3c1de607702b87292687d27f99141b
# If not running interactively, do not do anything
[[ $- != *i* ]] && return
# You can replace 0 with the session name you prefer such as "onLogin" (without parenthesis)
[[ -z "$TMUX" ]] && exec tmux new -A -s 0
@theel0ja
theel0ja / nginx.conf
Created Feb 13, 2019
/etc/nginx/sites-available/pi.hole
View nginx.conf
server {
listen 80;
listen [::]:80;
server_name pi.hole;
allow 192.0.2.15;
deny all;
root /var/www/html;
@theel0ja
theel0ja / update-geoip-databases.sh
Created Jan 9, 2019
updates GeoLite2 databases
View update-geoip-databases.sh
rm -rf dist/ *.tar.gz GeoLite2-*/
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-City.tar.gz
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.tar.gz
wget https://geolite.maxmind.com/download/geoip/database/GeoLite2-ASN.tar.gz
tar -xzvf GeoLite2-City.tar.gz
tar -xzvf GeoLite2-Country.tar.gz
tar -xzvf GeoLite2-ASN.tar.gz
View gandi.sh
sudo apt install certbot -t stretch-backports
sudo pip install 'git+https://gitlab.com/cspublic/certbot-plugin-gandi.git'
sudo mkdir /etc/letsencrypt
sudo touch /etc/letsencrypt/dnsgandi.ini
sudo chmod 600 /etc/letsencrypt/dnsgandi.ini
sudo nano /etc/letsencrypt/dnsgandi.ini
sudo certbot --server https://acme-v02.api.letsencrypt.org/directory \
View debfileUnzipper.sh
DEB_FILE="debootstrap_1.0.67+deb8u1_all.deb"
FOLDER_NAME="temp"
mkdir $FOLDER_NAME
cd $FOLDER_NAME
ar vx ../$DEB_FILE
# useless shit
rm debian-binary
@theel0ja
theel0ja / los-a3y17lte.sh
Last active Jan 21, 2019
WIP do not execute manually!
View los-a3y17lte.sh
# MANUAL: comment out `AcceptEnv LANG LC_*` from /etc/ssh/sshd_config
sudo service sshd restart
# MANUAL: relogin
sudo nano /etc/apt/sources.list
# MANUAL: enable universe repositories on ubuntu 18.04
sudo apt update
sudo apt upgrade -y
@theel0ja
theel0ja / ModRewrite.htaccess
Last active Aug 20, 2019
my kapsi.fi let's encrypt conf
View ModRewrite.htaccess
# Jos käytät mod_rewriteä, älä rewriteä acme-challenge kansiota
RewriteRule ^\.well-known\/acme-challenge\/ - [L]
View telegram-widget-demo.html
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.0/css/bootstrap.min.css" integrity="sha256-NJWeQ+bs82iAeoT5Ktmqbi3NXwxcHlfaVejzJI2dklU=" crossorigin="anonymous" />
You can’t perform that action at this time.