Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Hello world!

Wouter wouterds

:octocat:
Hello world!
View GitHub Profile
View wordlist.txt
raspberry
dietpi
uploader
marketing
webadmin
webmaster
maintenance
techsupport
logon
Passw@rd
View gist:95b302ad8449db82a5280c1480ea8d1e
mysqlcheck --all-databases --optimize --skip-write-binlog -u root -p
@wouterds
wouterds / docker-compose.yml
Last active Mar 25, 2021
Umbrel behind (traefik) reverse proxy
View docker-compose.yml
version: '3.7'
x-logging: &default-logging
driver: journald
options:
tag: "{{.Name}}"
services:
tor:
container_name: tor
image: lncm/tor:0.4.4.7@sha256:48094db3afff76472b20cd7b6a41151ef5e380e5ec5e6042c36b0f861236c45f
@wouterds
wouterds / backup.sh
Last active Mar 25, 2021
rsync backup script
View backup.sh
#!/bin/sh
RSYNC="/usr/bin/sudo /usr/bin/rsync"
DTIME=`date +"%Y%m%d"`
LOCATION=/mnt/backups/servers/$1/$DTIME
mkdir -p $LOCATION
rsync -avx \
--rsync-path="$RSYNC" \
@wouterds
wouterds / mysql-docker.sh
Created Feb 6, 2021 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@wouterds
wouterds / gist:fd548d3400d79bce47be87def9857739
Created Nov 6, 2020
Cache static assets served from node container for a year
View gist:fd548d3400d79bce47be87def9857739
location ~ \.(?:ico|css|js|gif|jpe?g|png|webp|gif|svg|txt)$ {
proxy_pass http://node:3000;
proxy_hide_header Cache-Control;
add_header Cache-Control "public, max-age=31536000, immutable";
}
View .eslintrc.js
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'react',
'react-hooks',
'prettier',
],
extends: [
@wouterds
wouterds / m3u8-to-mp4.md
Created Mar 20, 2020 — forked from tzmartin/m3u8-to-mp4.md
m3u8 stream to mp4 using ffmpeg
View m3u8-to-mp4.md

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
View gist:e96211df8d405090dd23974bf17b4200
This method also works with wireless doorbells and other similar systems.
We're gonna need a RTL-SDR, which is basically a radio dongle and a cheap radio transmitter.
We will also need a microcontroller to interface with the transmitter, any Arduino would do it.
You can get one for less than 8$ on Ebay, a 433MHz radio transmitter for less than 1$ and any kind of arduino clone for less than 3$.
Let's start...
First you need to install the drivers for the RTL-SDR, the Arduino IDE if you don't already have it,
the Audacity Audio Analyser/Editor and finally a spectrum analyzer, you can use http://airspy.com/?ddownload=3130 SDR# or https://github.com/pothosware/pothos/wiki/Downloads GQRX in Windows and https://github.com/pothosware/pothos/wiki/Downloads GQRX on linux.
@wouterds
wouterds / useAppState.ts
Created Feb 22, 2020
React Native useAppState hook
View useAppState.ts
import { useState, useEffect, useCallback } from 'react';
import { AppState, AppStateStatus } from 'react-native';
const useAppState = () => {
const [appState, setAppState] = useState(AppState.currentState);
const handleAppStateChange = useCallback(
(nextAppState: AppStateStatus) => {
setAppState(nextAppState);
},
[setAppState],