Skip to content

Instantly share code, notes, and snippets.

@nitred
nitred / optimal_mtu.md
Last active May 6, 2024 10:50
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
@gaabora
gaabora / batch-style-replace-magic.html
Last active May 6, 2024 10:50
batch-style-replace-magic.html
<!DOCTYPE html>
<html>
<head>
<title>Test report tpl vars</title>
<style>
* { font-size: 10px; }
html, body { margin: 0; padding: 0; }
body { padding: 0 5px; }
.container { height: 100%; display: flex; flex-direction: row; }
.fill-height { height: 100vh; }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Eu te amo Anderson</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
@gaabora
gaabora / webflow-variables-csv-export-import-magic.user.js
Last active May 6, 2024 10:50
Webflow Variables Export Import Magic
// ==UserScript==
// @name Webflow Variables CSV Export Import Magic
// @namespace http://tampermonkey.net/
// @version 0.6
// @description try to take over the world!
// @author gaabora
// @match https://webflow.com/design/*
// @match https://*.design.webflow.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=webflow.com
// @grant none
@jhned
jhned / awesome-wordpress-favicons
Last active May 6, 2024 10:50
Ever wanted to set up custom favicons in the WordPress admin or on the WordPress login screen? Well, now you can.
// First, create a function that includes the path to your favicon
function add_favicon() {
$favicon_url = get_stylesheet_directory_uri() . '/images/icons/admin-favicon.ico';
echo '<link rel="shortcut icon" href="' . $favicon_url . '" />';
}
// Now, just make sure that function runs when you're on the login page and admin pages
add_action('login_head', 'add_favicon');
add_action('admin_head', 'add_favicon');
@pwlin
pwlin / gist:8a0d01e6428b7a96e2eb
Last active May 6, 2024 10:50
Android : add cert to system store
https://code.google.com/p/android/issues/detail?id=32696#c5
If you have a certificate that is not
trusted by Android, when you add it, it goes in the personal cert store.
When you add a cert in this personal cert store, the system requires a
higher security level to unlock the device. But if you manage to add your
cert to the system store then you don't have this requirement. Obviously,
root is required to add a certificate to the system store, but it is quiet
easy.
@itod
itod / split_keyboards.md
Last active May 6, 2024 10:50
Every "split" mechanical keyboard currently being sold that I know of
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active May 6, 2024 10:50
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@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.

@fkraeutli
fkraeutli / downloadGitLfsFiles.md
Last active May 6, 2024 10:49
How to download GIT LFS files

How to retrieve GIT LFS files from GitHub

Retrieving non-LFS files

Through the GitHub API it is possible to retrieve individual files from a Git repository via, e.g. curl. To do so, first retrieve the content information for the relevant file (or folder):

curl https://api.github.com/repos/{organisation}/{repository}/contents/{file or folder path}

For private repositories, authenticate using your username and a personal access token