Skip to content

Instantly share code, notes, and snippets.

@PatrickChoDev
PatrickChoDev / devcontainer.json
Created November 10, 2023 18:26
PNPM devcontainer multiple project setup
{
"name": "Multiple PNPM projects",
// recommend using microsoft default image
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bullseye",
// !!!! MAGIC STARTS HERE!!!
"mounts": [
"source=global-pnpm-store,target=${containerWorkspaceFolder}/.pnpm-store,type=volume"
@maud3l
maud3l / logid.cfg
Created July 15, 2023 10:20
Logitech MX Master 3S Configuration with LogiOps
devices: (
{
name: "MX Master 3S";
smartshift:
{
on: true;
threshold: 30;
};
hiresscroll:
{
@nitred
nitred / optimal_mtu.md
Last active July 4, 2024 04:10
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
@johnathanmay
johnathanmay / logitech-mx-master-3-extras-for-linux-with-logiops.md
Last active June 27, 2024 00:22
How to install and configure PixlOne's logid to program Logitech MX Master 3 buttons on Linux.

Logitech MX Master 3 Extras for Linux With logiops

The Logitech Options program isn't available for Linux, but by a nice guy on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.

Here are some additional pages with info that I used to generate this documentation:

@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active July 1, 2024 17:54
Building a react native app in WSL2
@douglasmakey
douglasmakey / sender.go
Last active June 7, 2024 15:02
Golang - send an email with attachments.
package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"mime/multipart"
"net/smtp"
"os"
@Mattemagikern
Mattemagikern / Certificates.go
Created May 9, 2019 08:31
Create x509 certificate chain using Golang. Root CA, Designated CA, server CA
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
"math/big"
@behroozam
behroozam / Dockerfile
Last active March 4, 2024 12:15
send nginx custom log to elasticsearch with fluentd syslog input
FROM fluent/fluentd:v1.3-1
# Use root account to use apk
USER root
# below RUN includes plugin as examples elasticsearch is not required
# you may customize including plugins as you wish
RUN apk add --no-cache --update --virtual .build-deps \
build-base ruby-dev \
&& gem install \
@cecilemuller
cecilemuller / 2019-https-localhost.md
Last active July 2, 2024 20:44
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active July 2, 2024 21:29
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com