Skip to content

Instantly share code, notes, and snippets.

View pyksid's full-sized avatar

Pierre pyksid

View GitHub Profile
@pyksid
pyksid / watchdog.sh
Last active January 5, 2022 12:31
openwrt watchdog: interface auto reconnect
#!/bin/sh
ip1=8.8.8.8
ip2=208.67.222.222
tries=3
if [[ -z $1 ]]; then
logger -t watchdog "Missing interface name"
exit 1
fi
@pyksid
pyksid / gist:5a47697ce48b7a6608264a2c21d63789
Created April 17, 2018 07:59
Debian Unstable (Sid) sources.list
deb http://ftp.fr.debian.org/debian/ unstable main contrib non-free
deb-src http://ftp.fr.debian.org/debian/ unstable main contrib non-free
@pyksid
pyksid / sources.list
Created July 12, 2018 17:44
Debian 9 Stretch (Stable) sources.list
deb http://deb.debian.org/debian/ stable main contrib non-free
deb-src http://deb.debian.org/debian/ stable main contrib non-free
deb http://deb.debian.org/debian/ stable-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free
deb http://deb.debian.org/debian-security stable/updates main
deb-src http://deb.debian.org/debian-security stable/updates main
deb http://ftp.debian.org/debian stretch-backports main
@pyksid
pyksid / utf8mb4-convert.php
Created July 25, 2018 19:56
Convert WordPress database to utf8mb4
<?php
/*
Plugin Name: utf8mb4-convert
Version: 1.0
*/
function update_db_to_utf8mb4()
{
set_time_limit(MINUTE_IN_SECONDS * 30);