Skip to content

Instantly share code, notes, and snippets.

@DouglasUrner
DouglasUrner / openwrt_add_guest_router.sh
Last active September 12, 2025 06:34 — forked from fbraz3/openwrt_add_guest.sh
[OpenWRT] Shell Script to Create a Fully Isolated Guest Network with Bandwidth Control
#!/bin/sh
#
# FOR USE IN OPENWRT
# This script creates a guest network fully isolated from the main one.
# Tested on a Xiaomi AX3000T router; should work on any OpenWRT-powered router.
#
# - Ensure the Wi-Fi interfaces retain their default names (radio0 and radio1).
# - For enable download/upload limits, you MUST install the sqm-scripts package on your OpenWRT router.
# - For enable roaming (aka wifi mesh):
@DouglasUrner
DouglasUrner / PlayerControllerXXX.cs
Last active October 4, 2021 17:50
Unity PlayerController script with a number of syntax errors for debugging / error message reading practice. To use copy the code and paste it into a new script in your Unity project called PlayerControllerXXX.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerController : MonoBehaviour
{
public float speed = 25; // Meters/second
// Start is called before the first frame update
void Start()
@DouglasUrner
DouglasUrner / learn.md
Last active December 30, 2020 08:06 — forked from rylev/learn.md
How to Learn Rust

Learning Rust

The following is a list of resources for learning Rust as well as tips and tricks for learning the language faster.

Warning

Rust is not C or C++ so the way you're accustomed to do things in those languages might not work in Rust. The best way to learn Rust is to embrace its best practices and see where that takes you.

The generally recommended path is to start by reading the books, and doing small coding exercises until the rules around borrow checking become intuitive. Once this happens, then you can expand to more real world projects. If you find yourself struggling hard with the borrow checker, seek help. It very well could be that you're trying to solve your problem in a way that goes against how Rust wants you to work.

@DouglasUrner
DouglasUrner / docx2md.md
Last active January 21, 2018 21:27 — forked from aembleton/docx2md.md
Convert a Word Document With Images into MD

Convert Word documents with images to Markdown

The Problem

A lot of documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web and I haven't found a way to get it to play nicely with Git. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a Mac you can use homebrew to install Pandoc by running the command brew install pandoc.

The Solution