Skip to content

Instantly share code, notes, and snippets.

View samip5's full-sized avatar

Skyler Mäntysaari samip5

View GitHub Profile
@davidedmundson
davidedmundson / PlasmaNested.sh
Last active May 21, 2024 22:04
Run plasma from within gamescope
#!/bin/sh
# Remove the performance overlay, it meddles with some tasks
unset LD_PRELOAD
## Shadow kwin_wayland_wrapper so that we can pass args to kwin wrapper
## whilst being launched by plasma-session
mkdir $XDG_RUNTIME_DIR/nested_plasma -p
cat <<EOF > $XDG_RUNTIME_DIR/nested_plasma/kwin_wayland_wrapper
#!/bin/sh
@ishad0w
ishad0w / oci_ubuntu_to_debian.multiarch.sh
Last active July 2, 2024 19:45
Debian 12 on Oracle Cloud (Free Tier) - (AMD64/ARM64)
#!/bin/bash
trap "exit" INT
echo -e "\nHost:"
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 22 ubuntu@$1 \
'uname -a && arch && uptime && sudo touch /home/ubuntu/.hushlogin /root/.hushlogin'
echo -e "\nAdding temporary SSH-key for Ubuntu root user..."
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=ERROR -p 22 ubuntu@$1 \
'sudo cat /home/ubuntu/.ssh/authorized_keys | sudo tee /root/.ssh/authorized_keys'
@versionsix
versionsix / docker_l3_routed_ipvlan.md
Created April 10, 2021 05:26
Docker ipvlan use a routed subnet.
❯ multipass launch \
  -m 8G \
  -c 4 \
  -d 30G \
  --name dockrr \
    focal
Launched: dockrr
@AmazingTurtle
AmazingTurtle / how-to-restore.md
Last active July 3, 2024 12:01
restore access to unifi controller

Restore access to a unifi controller

When you are unable to login to the unifi controller or forgot admin password, you can restore access using SSH and manipulating mongodb directly.

Warning

Do not uninstall unifi controller - most of the data is not stored in mongodb. In case you thought a mongodb backup would be sufficient, you may have fucked up already, just like me. However I managed to write this "tutorial" for anyone to not run into the same trap.

Apparently this guide no longer works with recent unifi controller versions (starting nov/dec 2022). Since I no longer use unifi hardware in my home system, I can not update the guide myself. In case you've gotten here to recover your data, you're likely doomed. But giving it a try won't hurt anyway, therefore: good luck.

@theel0ja
theel0ja / ModRewrite.htaccess
Last active August 20, 2019 10:59
my kapsi.fi let's encrypt conf
# Jos käytät mod_rewriteä, älä rewriteä acme-challenge kansiota
RewriteRule ^\.well-known\/acme-challenge\/ - [L]
Enable systemd-networkd debugging
mkdir -p /etc/systemd/system/systemd-networkd.service.d/
Create Drop-In /etc/systemd/system/systemd-networkd.service.d/10-debug.conf with following content:
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
And restart systemd-networkd service:
systemctl daemon-reload
@chaeplin
chaeplin / Vagrantfile
Created September 7, 2017 14:28 — forked from evianzhow/Vagrantfile
Cross-compile Vagrant box for EdgeRouter
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1024"
end
config.vm.provision "shell", inline: <<-SHELL
@jamesmacwhite
jamesmacwhite / Workarounds for Netflix and the blocking of IPv6 tunnels.md
Last active June 24, 2024 20:05
Prevent proxy/VPN streaming error messages from Netflix when using a Hurricane Electric IPv6 tunnel.

Workarounds for Netflix and the blocking of Hurricane Electric IPv6 tunnels

The dreaded "You seem to be using an unblocker or proxy." error message. Cool story bro.

This gist was essentially created out of my own rant about Netflix being hostile to IPv6 tunnel services since June 2016. You are welcome to read my opinion on the matter, this is the more technical side to the issue and how to combat it within your own network.

Since I wrote this, various GitHub users have contributed their thoughts and ideas which has been incorporated into this gist. Thank you to everyone who have contributed their own methods and implementations.

The problem

Netflix now treats IPv6 tunnel brokers (such as Hurricane Electric) as proxy servers. A while ago it became apparent to users and Netflix that somewhat by accident, IPv6 tunnel users were being served content outside of their geolocation because of the way Netflix was identifyi