Skip to content

Instantly share code, notes, and snippets.

View jamesmacwhite's full-sized avatar

James #FFFFFF jamesmacwhite

View GitHub Profile
@jamesmacwhite
jamesmacwhite / README.md
Last active June 18, 2025 07:04
An example and overview of mwan3 IPv6 configuration with NAT6 (sorry anti IPv6 NAT people)

Deploying mwan3 with IPv6 (using NAT6)

I'm a user of mwan3 and contribute to its development in a small way by mainly providing feedback with my multi WAN setup and maintaining the beast of it's documentation on the OpenWrt wiki (feedback and contributors welcome).

This setup ultimately requires the use of a NAT6 firewall script. NAT6 is currently broke with fw3 and LuCI, so this is an important helper script to workaround this current limitation.

The NAT6 configuration requirements are explained in more detail on the OpenWrt wiki.

This gist is aims to document my configuration for others.

@jamesmacwhite
jamesmacwhite / say_lte.py
Last active April 15, 2024 17:17 — forked from lukpueh/say_lte.py
Script to help me position my `Alcatel Linkhub HH40v` LTE modem for the best signal strength
#!/usr/bin/env python
"""
<Program Name>
say_lte.py
<Authors>
Lukas Puehringer <luk.puehringer@gmail.com>
James White <james@jmwhite.co.uk>
<Purpose>
@jamesmacwhite
jamesmacwhite / nanobox-net-share-manual.md
Last active January 29, 2020 23:54
Nanobox and manually fixing failed mounting on Windows

Nanobox manual mounting of codebase folder

Sometimes Nanobox will fail to mount the codebase of an app through the usual nanobox run command. This will lead to a constant loop of attempting to mount the codebase folder before Nanobox gives up after a few tries, despite entering the correct password. If you look at the logs, this will often be due to a host is down error.

This can often because the mount has not been correctly set. You can do this manually, by running net share as per:

https://github.com/nanobox-io/nanobox/blob/a512a85c181cab4ca454456a915bee5147796a8b/util/provider/share/share_windows.go#L81

The syntax is:

Keybase proof

I hereby claim:

  • I am jamesmacwhite on github.
  • I am jamesmacwhite (https://keybase.io/jamesmacwhite) on keybase.
  • I have a public key whose fingerprint is 7E6F 9A74 C332 D284 8B14 80CA BCB2 5A84 0CFB 1C8E

To claim this, I am signing this object:

@jamesmacwhite
jamesmacwhite / m190416_110112_update_retour_widget_type.php
Created April 16, 2019 11:13
Migration for updating Retour widget from Craft 2
<?php
namespace craft\contentmigrations;
use Craft;
use craft\db\Migration;
use nystudio107\retour\widgets\RetourWidget;
/**
* m190416_110112_update_retour_widget_type migration.
@jamesmacwhite
jamesmacwhite / m190412_182837_tablemaker_update_fieldtype.php
Created April 12, 2019 18:36
Field type migration for Table Maker for Craft 2 to Craft 3 migrations
<?php
namespace craft\contentmigrations;
use Craft;
use craft\db\Migration;
use supercool\tablemaker\fields\TableMakerField;
/**
* m190412_182837_tablemaker_update_fieldtype migration.
@jamesmacwhite
jamesmacwhite / m190411_125323_craft2_focal_point_fields.php
Last active April 11, 2019 21:26
Migrate Craft 2 focal point field data
<?php
namespace craft\contentmigrations;
use Craft;
use craft\db\Migration;
use craft\db\Query;
/**
* m190411_125323_craft2_focal_point_fields migration.
@jamesmacwhite
jamesmacwhite / dd-wrt-inadyn-entware.md
Last active May 21, 2018 18:52
Using the newer version of inadyn on DD-WRT

Using the Entware inadyn package on DD-WRT

Dynamic DNS is a great tool for being able to keep one or more services that rely on a specific DNS name record being accurate. In most cases, DDNS is useful for something like your home ISP IP address which is often dynamic or "sticky". Unless provided (or you pay for the priviledge), residenital ISP broadbrand plans don't usually offer static IP.

DD-WRT includes DDNS (inadyn), but there is one problem. It's very old. DD-WRT includes the version 1.96-ADV. While having older software isn't ideal there is one key area that is a potential security issue. SSL support. The standard DDNS implementation in DD-WRT means you are sending your DNS update request over plaintext. This is bad. Being able to sniff credentials for your chosen DNS provider over the wire means you are wide open to someone being able to intercept and modify the request. In addition, the crendentials used may also be tied to a service multiple services. While it would require some effort and en

Removing metadata from MP4 files

Often MP4 files will have metadata such as titles, comments and other data stored behind the media file. In some cases you'll never notice it, but some media players such as VLC, will use the information like titles and display them. In addition to media players, media organisers like Plex, may also use the metadata information, depending on if "local file information" is treated with a higher priority than indexers like The Movie DB or The TV DB.

Using mp4box (part of GPAC) provides a way to remove standard metadata information from an MP4 file, essentially rewriting the MP4 container, without modifying the original stream.

In place metadata removal

This will remove the metadata from the file in place, a file with out_ is created temporarily for the new ISO data to be written, once completed it will overwrite the original source file.

@jamesmacwhite
jamesmacwhite / Netflix WPAD bypass rules.md
Last active August 9, 2023 13:24
Bypass rules for Netflix when using a WPAD based proxy deployment

Netflix and direct bypass rules using WPAD

If your like me you might already use a VPN to route your traffic through. The problem is some sites just don't like VPN services and will actively block you from using them without disabling or bypassing it.

Netflix is a prime example of a website that does not like VPN services, because they are seen as a way to circumvent the geo-restrictions imposed on the content library offered.

Below are WPAD rules I use to essentially send Netflix traffic directly and avoid any VPN errors/dreaded unknown error network messages. Error messages that Netflix throws back at you related to VPN usage when streaming might include:

  • "You seem to be using an unblocker or proxy"
  • VPN/proxy error M7111-1331-5059