Skip to content

Instantly share code, notes, and snippets.

View sysr-q's full-sized avatar
💾
Hacking the planet.

Chris sysr-q

💾
Hacking the planet.
  • Auckland, New Zealand
  • 11:07 (UTC +12:00)
View GitHub Profile
job "homeassistant" {
datacenters = ["morsegasse"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "6m"
progress_deadline = "10m"
auto_revert = false
canary = 0
@pamolloy
pamolloy / README.md
Last active January 23, 2024 07:28
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@troyfontaine
troyfontaine / README.md
Last active October 15, 2023 09:58
Ubiquiti USG config.gateway.json Syntax

Ubiquiti USG Advanced Configuration

Overview

Integrated DNS Overview

When using a USG with Ubiquiti's Unifi Controller software (version 5.6 and earlier), the functionality of integrating the hostnames of clients (when they request a DHCP lease) into local DNS does not appear to work as you would find with Consumer grade routers. To work around this limitation, we can add static host mappings to a configuration file that will be provisioned to the USG when either a configuration change is made or we force provisioning to the USG itself.

Non-GUI Supported Dynamic DNS Providers

I've added in the necessary syntax for adding Cloudflare DDNS to the USG for VPN/Services setup courtesy of this post by britannic on the Ubiquiti Forums.

Configuration File

@peteryates
peteryates / guide.md
Last active May 6, 2024 10:49
How to stop adverts appearing on your Samsung TV

I'm getting adverts in my TV's UI, help!

Samsung's otherwise excellent 2016 range of UHD TVs received an update that added advertisements to the UI. This has been complained about at great length on Samsung's forums and repeatedly, Samsung have refused to add an option to remove them.

The ads interrupt the clean UI of the TV and are invasive. Here's an example of how they look:

one two

This guide was originally posted on Samsung's TV forums but unfortunately, that site is a super-slow and barely accessible unusable mess.

@Arinerron
Arinerron / permissions.txt
Last active March 27, 2024 04:59
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO

How Do I Into Git?

a helpful primer for users sick of git's poorly-named commands

I've used Git since 2011, and this is the stuff that I've always had to Google to remember. I hope it helps you not hate Git so much.

Learning About the Repo

Learning About History

@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@duggan
duggan / cast.py
Last active November 28, 2020 21:55
Using pychromecast to headlessly stream youtube videos
#!/usr/bin/env python
"""
Requires pychromecast.
Install with `pip install pychromecast`
usage: cast.py [-h] -d DEVICE -v VIDEO
Cast YouTube videos headlessly.
@tom-lord
tom-lord / thebutton.js
Last active December 22, 2020 18:12
A "nicely formatted" (readable) version of the javascript sourcecode at www.reddit.com/r/thebutton -- taken from http://www.redditstatic.com/reddit.en-gb.KaNkkPAPGl0.js
r.thebutton = {
_setTimer:function(e){
var t = "00000",
n = (e > 0 ? e : 0).toString(),
i = t.substring(0, t.length - n.length) + n;
for(var s = 0; s < 4; s++)
r.thebutton._timerTextNodes[s].nodeValue = i[s];
e%100 === 0 && r.thebutton._drawPie(e, 6e4)
},
_countdown:function(){
@mathiasbynens
mathiasbynens / README.md
Last active August 5, 2023 03:20
Superfish certificate