Skip to content

Instantly share code, notes, and snippets.

View Forceflow's full-sized avatar

Jeroen Baert Forceflow

View GitHub Profile
javascript:(function x(d,r,s='ensen met e'+r,i=document.createNodeIterator(d,5),n,e){while(n=i.nextNode()){n.nodeType>1?e?.tagName!='STYLE'&&(n.nodeValue=n.nodeValue.replace(/woke(r?s)?/ig,(m,l)=>l?(m>'Wp'?'m':'M')+s:(m>'Wp'?'e':'E')+r)):(n=(e=n).shadowRoot)&&x(n,r,s)}})(document,'en beetje empathie');
@Forceflow
Forceflow / loss_test.sh
Last active February 11, 2022 13:34
Packet Loss Test
#!/bin/bash
# This tool repeatedly sends 100 packets to an internet server (standard: 1.1.1.1 - Cloudflare can take it)
# in the shortest interval ping allows (0.2s) and reports graphically how many packets were lost.
#
# Requirements: bash, ping, (g)awk
TARGET=1.1.1.1
SCRIPTNAME="loss_test"
@Forceflow
Forceflow / csv_to_html_timestamps.py
Last active October 5, 2021 12:57
CSV to timestamped Souncloud URLs for Nerdland Podcast
# This is a script that takes Audobe Audition CSV file output from a project and combines them with a Souncloud URL to generate a list of clickable topic - timestamp entries
# Jeroen Baert - jeroen [at] nerdland [dot]
from datetime import datetime, timedelta
import csv
import sys
# Import CSV file as a list-of-lists
def import_csv(filename):
with open(filename) as csv_file:
@Forceflow
Forceflow / toAC3.sh
Last active September 4, 2021 19:13
Video EAC3 to AC3
#!/bin/bash
# This is a script to convert one or more videos with EAC3 audio to AC3 audio. EAC3 audio triggers audio conversion,
# which leads to this Plex bug: https://forums.plex.tv/t/subtitles-disappear-too-fast-or-line-not-showing-when-transcoding-audio/727924/3
# Requirements: ffmpeg, ffprobe and some space in your /tmp folder, which will be used to store converted files.
#
# This script will only convert files if they contain "eac3" in their ffprobe audio stream output.
# Your original files will be REPLACED if the conversion takes place.
#
# Usage: toAC3.sh /path/to/file1 /path/tofile2 (etc.)
@Forceflow
Forceflow / leopold.csv
Created June 14, 2020 01:53
Leopold Standbeelden TSP input
Place Activity Lat Long
Antwerpen Rubenslei 51.213160 4.413070
Aarlen 49.675160 5.824240
Bergen 50.453330 3.948740
Brussel Troonplein 50.840870 4.364400
Brussel Koningstuin 50.821673 4.371278
Ekeren 51.277136 4.418265
Gent 51.0447935 3.73233438
Genval 50.721161 4.493880
Halle 50.733190 4.237188
@Forceflow
Forceflow / url_to_ip.py
Created June 12, 2020 22:44
Python script to convert URL to IP and Country
import os
import argparse
import socket
import requests
# Get IP and Country from a URL using freegeoip online service
def get_ip_country_freegeoip(url):
print("FreeGeoIP: " + url + ": ", end='')
r = requests.get("http://freegeoip.net/json/"+url)
if not r.status_code // 100 == 2:
@Forceflow
Forceflow / stripmetadata.sh
Created October 10, 2019 14:56
Strip all metadata from video file using ffmpeg
#!/bin/bash
#Usage: ./stripmetadata.sh filename.mp4 (or whatever video format ffmpeg takes)
# Fancy colors
RED='\033[1;31m'
GREEN='\033[1;32m'
NC='\033[0m'
# Grab variables
@Forceflow
Forceflow / gist:36f298d4c7a18f694baf798a045a9ef3
Created September 18, 2019 12:33
Cloudflared Update for pihole
echo "Downloading latest argo tunnel / cloudflared"
wget https://bin.equinox.io/c/VdrWdbjqyF/cloudflared-stable-linux-arm.tgz
tar -xvzf cloudflared-stable-linux-arm.tgz
sudo service cloudflared stop
sudo cp ./cloudflared /usr/local/bin
sudo chmod +x /usr/local/bin/cloudflared
sudo service cloudflared start
echo "Updated cloudflared to"
cloudflared -v
echo "Removing downloaded files"
@Forceflow
Forceflow / Windows1809_endpoints_hosts
Created January 31, 2019 09:59
Windows 1809 Endpoints
# MICROSOFT ENDPOINTS from https://docs.microsoft.com/en-us/windows/privacy/manage-windows-1809-endpoints
# ADDITIONAL ENDPOINTS from network logs
store-images.s-microsoft.com
ctldl.windowsupdate.com
login.live.com
dmd.metaservices.microsoft.com.akadns.net
dmd.metaservices.microsoft.com
cy2.vortex.data.microsoft.com.akadns.net
v10.vortex-win.data.microsoft.com
v20.vortex-win.data.microsoft.com
@Forceflow
Forceflow / Oculus_OVR_startstop.bat
Created August 4, 2017 06:52
Simple script to start/stop Oculus OVR runtime on Windows. Run as admin.
net start "OVRService"
if %errorlevel% == 2 net stop "OVRService"