Skip to content

Instantly share code, notes, and snippets.

View Flinner's full-sized avatar
🐰
🐰 🐰 🐰 🐰 🐰 🐰 🐰 🐰 🐰

Flinner Flinner

🐰
🐰 🐰 🐰 🐰 🐰 🐰 🐰 🐰 🐰
View GitHub Profile
@chumpage
chumpage / erc-setup.el
Created September 26, 2011 23:34
emacs erc setup
(defun erc-needs-tunnel ()
(string= (call-config-script "erc-needs-tunnel.sh") "true"))
(defun erc-default-nick () (if (at-work) "<user1>" "<user2>"))
;; Have erc use a socks proxy when I'm at work to bypass the firewall
(when (and (erc-needs-tunnel)
(require 'socks nil t))
;; !!! fix
;; I shouldn't need this next line, but if I don't have it I get an error when I try
@nauhygon
nauhygon / Build Emacs for Windows 64bit with Native Compilation.md
Last active June 13, 2024 01:29
Step-by-step instructions to build Emacs for Windows 64 bit with MSYS2 and MinGW-w64. Now `native-comp` supported.

Build Emacs-w64 with MSYS2/MinGW-w64 with Native Compilation

Instructions are modified from emacs-w64 Wiki page by zklhp. Many thanks for sharing!

  1. Download the latest MSYS2 from this download page.

  2. Install MSYS2 to, for example, C:\msys2 (make sure no space in path to avoid unwanted problems).

  3. Optionally prettify the MSYS2 console mintty with ~/.minttyrc to make it more pleasing to eyes. Thanks to this awesome theme!

****** Org-agenda Vim Keybindings :orgmode:evil:
#+BEGIN_SRC emacs-lisp
(eval-after-load 'org-agenda
'(progn
(evil-set-initial-state 'org-agenda-mode 'normal)
(evil-define-key 'normal org-agenda-mode-map
(kbd "<RET>") 'org-agenda-switch-to
(kbd "\t") 'org-agenda-goto
"q" 'org-agenda-quit
@SemanticDevice
SemanticDevice / allegro5_basic_game_loop.c
Created October 28, 2019 08:43
Basic game loops in Raylib, SDL2 and Allegro5
#include <allegro5/allegro5.h>
#include <allegro5/allegro_primitives.h>
#include <stdio.h>
#include <stdlib.h>
#define WIN_WIDTH_PX (800)
#define WIN_HEIGHT_PX (800)
#define FPS (60.0f)
static void Initialize();
@deeja
deeja / nuxt-layout-full-height.vue
Created May 25, 2020 14:52
Full height Nuxt.js layout hack
<style>
div#__nuxt,
#__layout,
#__layout > div,
#app {
min-height: 100vh;
}
</style>
@nitred
nitred / optimal_mtu.md
Last active July 16, 2024 11:51
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
@darkxst
darkxst / rules.txt
Last active June 30, 2024 14:20 — forked from denniskupec/rules.txt
KiCad DRC rules for JLCPCB, 2 & 4-layer PCB
(version 1)
#Kicad 7
# 2-layer, 1oz copper
(rule "Minimum Trace Width (outer layer)"
(constraint track_width (min 5mil))
(layer outer)
(condition "A.Type == 'track'"))
(rule "Minimum Trace Spacing (outer layer)"