Skip to content

Instantly share code, notes, and snippets.

@developer-guy
developer-guy / KIND_Networking.md
Created October 21, 2020 10:00 — forked from aojea/KIND_Networking.md
Use KIND to emulate complex network scenarios

Networking scenarios [Linux Only]

KIND runs Kubernetes cluster in Docker, and leverages Docker networking for all the network features: port mapping, IPv6, containers connectivity, etc.

Docker Networking

KIND uses a docker user defined network.

It creates a bridge named kind

@artizirk
artizirk / debug.md
Last active June 20, 2024 23:32
Debug WireGuard Linux kernel module
@FinnWoelm
FinnWoelm / read-text-message.sh
Created December 27, 2019 14:01
How to read text messages from USB modem
# Full instructions: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html
# Examples: http://manpages.ubuntu.com/manpages/bionic/en/man8/mmcli.8.html#examples
# Supported modems: https://www.freedesktop.org/wiki/Software/ModemManager/SupportedDevices/
# Get list of connected modems.
mmcli --list-modems
# Output:
# Found 1 modems:
# /org/freedesktop/ModemManager1/Modem/1 [huawei] E3531
# The number at the end of the path is the modem index.
@brunneis
brunneis / fix-hibernation.md
Last active September 3, 2023 11:19
Fix hibernation / deep sleep issues on MacBook Pro 2013 / 2014 with a NVMe SSD

alt + command + p + r + power

sudo pmset -a hibernatemode 0 standby 0 autopoweroff 0

Default:

sudo pmset restoredefaults
pmset -g
#include <stdio.h>
#include <string.h>
#ifdef ofst
for i in range(12):
MID, ofst, _ = 12, lambda o, i: int(o[i], 16), """
#else
#define ofst(o, i) 0
int main () { int t; char *s, *_; for (int i = 0; i < 12; i++) {
s = " """;
t = (int)(9+(i%3+(int)(i/3))*2-(i>8)*(2*(i-8)+2)) + ofst("466975754C32", i);
@tai271828
tai271828 / README.md
Created September 20, 2018 15:38 — forked from smoser/README.md
MAAS and curtin debug

Debugging curtin from within MAAS

Deploying a node with MAAS cli

You can deploy a node with the maas cli which is often preferable to clicking a button on a web UI.

$ SYSTEM_ID=node-787b19d8-d25c-11e4-9f9e-00163eca91de
$ NAME="random-nodename"
$ MAASNAME="maaslocal"

$ maas $MAASNAME machine allocate "name=$NAME"

@excid3
excid3 / dynamic-nginx-module-ubuntu-18.04.sh
Created June 20, 2018 17:58
How to compile a dynamic nginx module for Ubuntu 18.04
# Install dependencies that nginx was originally compiled with
sudo apt install libperl-dev libgeoip-dev libgd-dev
# Get the nginx source
wget https://nginx.org/download/nginx-1.14.0.tar.gz
tar zxf nginx-1.14.0.tar.gz
# Get the module source
wget https://github.com/fdintino/nginx-upload-module/archive/master.zip
unzip master.zip
@rafaelfess
rafaelfess / README.md
Last active May 11, 2023 07:35
EdgeOS: Scheduled PPPoE reconnect configuration #EdgeRouter

EdgeOS: Scheduled PPPoE reconnect configuration

It will restart the PPPoE connection every day at 7a.m

The benefit to using the task-scheduler is that your commands get saved in config folder which ensures that they get copied over during firmware upgrades.

Creating the script file

cd /config/user-data && sudo mkdir scripts && sudo chown root scripts && cd scripts
@clyang
clyang / gist:9e4279aca6f8dc21b24fc33e68d1a95b
Created July 31, 2017 07:58
Edgerouter-X搭配Hinet IPv6 Dual Stack設定 (eth4串在光世代數據機當wan)
configure
edit firewall
edit ipv6-name WAN6_IN
set default-action drop
set rule 10 action accept
set rule 10 description "Allow established/related"
set rule 10 state established enable
set rule 10 state related enable
set rule 20 action drop