Skip to content

Instantly share code, notes, and snippets.

@GlitchWitch
GlitchWitch / 0-vlan-to-wan2.md
Last active February 15, 2023 02:17
UDMP VLAN to WAN2 Policy Based Routing

Ubiquiti UDM-Pro Dual-WAN Setup Scripts

VLAN to WAN2 Policy Based Routing + Disable WAN Failover

Tested on UDM-Pro 1.10.0

The following scripts can be used on a UDM-Pro with on boot script to force specific vlans out WAN2 as well as prevent that traffic from going out wan1 and all other traffic from going out wan2 in the event one WAN is disconnected.

curl -fsSLo /mnt/data/on_boot.d/98-vlan_to_wan2.sh https://gist.githubusercontent.com/GlitchWitch/9833888842dbd7d0b42669faab4c4a4a/raw/9ede55da6820c65c3aeb5d0951a71855641b0041/98-vlan_to_wan2.sh 
@scott-maddox
scott-maddox / showbest.js
Last active July 8, 2017 13:51 — forked from thexa4/showbest.js
For use with spaceplan
// Paste in console
var getThings = function(){
var divs = [...document.querySelectorAll("#manufacture__container > div")]
var things = divs.map(function(e){
var result = {e};
var spans = [...e.getElementsByTagName("span")]
spans.map(function(s){
var str = s.innerText.replace(/[^/.0-9]/g, '');
var a = str.split("/");
var num = +a[0];
@jamis
jamis / Whole Wheat Bread Recipe.txt
Last active March 19, 2019 23:41
Jamis' recipe for homemade whole wheat bread
Jamis' Whole Wheat Bread
Ingredients
(Pardon the mixed metric/imperial units. I'm a product of my time.)
450 g warm water
450 g milk
1 tbl apple cider vinegar
1 tbl shortening
@eoinkelly
eoinkelly / postgres-upgrade-recipe.sh
Last active November 9, 2017 16:59
Upgrade Postgres to 9.4 using Homebrew on Mac OSX
#!/bin/bash
# This script can be used in "run & hope" mode or you can use it as a recipe to
# do things manually - you probably want the latter if you really care about
# the data in your databases.
# Happy hacking
# /Eoin/
# Tell bash to stop if something goes wrong
set -e
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end