Skip to content

Instantly share code, notes, and snippets.

View elmer's full-sized avatar
:octocat:
exploring

Elmer Rivera elmer

:octocat:
exploring
View GitHub Profile
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
component: resolv
tier: node
name: resolv
namespace: default
spec:
selector:
@marfillaster
marfillaster / Converge-F670L.md
Last active May 4, 2024 13:29
Converge F670L Bridge mode
  1. Go to Network - WAN - WAN Connection WAN Connection
  2. Right click Type Route dropdown select and click "Inspect" in the context menu.
    In console, run the code below:
    document.getElementById('Frm_mode').options[document.getElementById('Frm_mode').options.selectedIndex].setAttribute('value', 'BRIDGE');
    Change_mode();
    
    output2
  3. Input New Connection Name. Example: Bridge. Click Create.
@nitred
nitred / optimal_mtu.md
Last active May 4, 2024 09:21
Wireguard Optimal MTU

About

  • I faced bandwidth issues between a WG Peer and a WG server. Download bandwidth when downloading from WG Server to WG peer was reduced significantly and upload bandwidth was practically non existent.
  • I found a few reddit posts that said that we need to choose the right MTU. So I wrote a script to find an optimal MTU.
  • Ideally I would have liked to have run all possible MTU configurations for both WG Server and WG Peer but for simplicity I choose to fix the WG Server to the original 1420 MTU and tried all MTUs from 1280 to 1500 for the WG Peer.

Testing

  • On WG server, I started an iperf3 server
  • On WG peer, I wrote a script that does the following:
    • wg-quick down wg0
  • Edit MTU in the /etc/wireguard/wg0.conf file
@bluewalk
bluewalk / GetNordVPNWireGuardDetails.md
Last active May 1, 2024 15:06
Getting NordVPN WireGuard details

About

Instructions to obtain WireGuard details of your NordVPN account. These can be used to setup a WireGuard tunnel on your router to NordVPN.

Source: https://forum.gl-inet.com/t/configure-wireguard-client-to-connect-to-nordvpn-servers/10422/27

Prerequisites

If you have any linux machine, use that or install a vm if you don't have one.

Get their official linux app installed. Make sure you have wireguard installed too. And set the used technology to Nordlynx by running nordvpn set technology nordlynx

@alwynallan
alwynallan / Makefile
Last active April 4, 2024 04:42
Hardware PWM Controller for the Raspberry Pi 4 Case Fan
CC = gcc
RM = rm -f
INSTRUMENT_FOR_PROMETHEUS := false
ifeq ($(INSTRUMENT_FOR_PROMETHEUS),true)
CFLAGS = -Wall -DINSTRUMENT_FOR_PROMETHEUS
LIBS = -lbcm2835 -lprom -lpromhttp -lmicrohttpd
else
CFLAGS = -Wall
@atoonk
atoonk / AWS_v4prefixes.md
Last active April 28, 2024 06:48
AWS prefixes

Summary

Total number of IPv4 addresses: 100,750,168. That’s the equivalent of just over six /8’s Also see this blog: https://toonk.io/aws-and-their-billions-in-ipv4-addresses/

just for fun, let's put a value number on that

Total value at, $20 per IP: => $2,015,003,360

Total value at, $25 per IP: => $2,518,754,200

@ausfestivus
ausfestivus / AzureRegionData.md
Last active May 3, 2024 12:23
A list of the Azure regions

List of Azure Regions

A list of all the region names and locations for Azure

Creating the list

You can recreate the list anytime using this command:

az account list-locations -o table
@sysdig-blog
sysdig-blog / prometheus-metrics-golang.go
Created March 19, 2019 13:01
Prometheus metrics code instrumentation in Golang
package main
import (
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"log"
"time"
"math/rand"
{
"puppet_task_version": 1,
"supports_noop": false,
"description": "Stop or restart a service or list of services on a node.",
"parameters": {
"service": {
"description": "The name of the service, or a list of service names to stop.",
"type": "Variant[Array[String],String]"
},
"norestart": {
@jordansissel
jordansissel / 1-output.txt
Last active November 10, 2021 14:28
Convert curl|bash to an rpm with Docker and FPM
% docker build -t rust .
...
# Export the image to tarball, which itself contains tarballs and a manifest.json
% docker save -o rust.tar rust
# Extract the last layer
# tar's -O flag extracts a single entry from the tarball.
# The file we want is the last "Layer" in the manifest.json
% tar -xf rust.tar -O $(tar -xf rust.tar -O manifest.json | jq -r '.[].Layers[-1]') > curlbash.tar