Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 08:21
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@henfiber
henfiber / KB-Buying-guide-EU.md
Last active April 27, 2024 08:20
Buying keyboards and keyboard components from EU

Europe

  • SkinFlint : Price comparison site which has some nice filtering options per switch type etc. Searches for offers in UK, Germany, Poland and Austria
  • mykeyboard.eu : Keyboards, keycaps and accessories. Based in Belgium.
  • candykeys.com : European Store selling Vortex, Leopold, KBP, Anne Pro keyboards, keycap sets and components (ISO + ANSI). Based in Germany, ships to EU.
  • falba.tech : custom wooden bamboo cases, and some acrylic and carbon ones. Switch packs (65 browns at 48EUR). Other parts for the GH60, Atreus, ErgoDox. Also Microcontrollers, diodes, leds etc.
  • 42keebs.eu - Mostly PCBs, tools and accessories. Located in Czech Republic.
  • KEYGEM : Switches, Keycaps, lubes, cables, DIY kits and deskmats. Based in Germany, ships to the EU and worldwide.
  • [Eloquent Clicks - Custom Mechanical Keyboard Store](https://www.eloquen
@amanjuman
amanjuman / Install V2Ray Client on OpenWRT and Configure Vmess
Last active April 27, 2024 08:19
Install V2Ray Client on OpenWRT and Configure Vmess
### The original Author of this package had enabled CloudFlare JS verification. As a result, this automated script will not work.
### Therefore you have to download each package and install it manually.
## Change Directory
cd /tmp/
## Update opkg
opkg update
## If wget not installed already
@pchiusano
pchiusano / monads.u
Last active April 27, 2024 08:18
Converting between algebraic effects and monads
-- This gist shows how we can use abilities to provide nicer syntax for any monad.
-- We can view abilities as "just" providing nicer syntax for working with the
-- free monad.
ability Monadic f where
eval : f a -> a
-- Here's a monad, encoded as a first-class value with
-- two polymorphic functions, `pure` and `bind`
type Monad f = Monad (forall a . a -> f a) (forall a b . f a -> (a -> f b) -> f b)
@krezreb
krezreb / linux power management notes.md
Last active April 27, 2024 08:20
linux power management notes

notes for setting up power management under ubuntu 22.04 (kernel 5.15) on a dell xps

I am a developer and system admin. I have a LOT of browser tabs, lots of terminals open, as well as vscode and MS Teams. YMMV but as far as I can tell, the "best" balance of power savings (long battery life) vs maching usability is using tlp and tlpui. This gives approx 5 - 6 hours of battery life on my workload.

I am running an INTEL processor, the below does not apply to AMD

TL;DR

@kcranley1
kcranley1 / workshop.py
Last active April 27, 2024 08:16
A GUI program for use with the Raspberry Pi Camera
from Tkinter import *
import time
import picamera
import RPi.GPIO as GPIO
import numpy as np
import io
from datetime import datetime, timedelta
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active April 27, 2024 08:11
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is tigervnc-standalone-server.

For this setup, I will use Ubuntu 20.04 LTS (Focal Fossa, unfortunately 22.04 does not work), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.

So let's go. First, we need a working WSL2 installation.

@macshome
macshome / IOKit.swift
Last active April 27, 2024 08:09
This playground shows you a few different ways to get device info via IOKit.
// This playground shows you a few different ways to get device info via IOKit.
// If you want to explore IOKit and look for interesting data I would download
// the Additional Developer Tools from Apple and use the IORegistryExplorer app.
// It makes it super easy to poke around in the IOKit planes.
import IOKit
import Foundation
// For convient access we can make a computed getter for the PlatformExpert.
// Traditionally this has been where you go to find all sorts of data about the