Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 22:12
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
@yasirkula
yasirkula / FileDownloader.cs
Last active April 27, 2024 22:12
C# Download Public File From Google Drive™ (works for large files as well)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Text;
/* EXAMPLE USAGE
FileDownloader fileDownloader = new FileDownloader();
@subramanya
subramanya / css-only-responsive-multi-level-mega-menu.markdown
Created November 11, 2022 14:43
CSS only responsive multi-level mega menu
@jmontleon
jmontleon / gist:ae5457e1d289719046f915a9cb83a32b
Last active April 27, 2024 22:09
Install Fedora 40 on the VisionFive 2
##############################################################################################
There is some long text that needs to be copied into grub in order to boot.
You should be able to copy and paste it using minicom if you add a 1 ms delay to text input
Ctrl-A Z Minicom Menu
T Terminal Settings
F Character tx delay (ms)
1
##############################################################################################
### Choose your SD Card
on letsWatchThatStinkingFolder () {
«Changes
«3/7/23; 11:55:58 AM by DW
«Created.
local (prefix = "chat-gpt-");
local (sourcefolder = "Macintosh HD:Users:davewiner:Downloads:");
local (destfolder = user.prefs.publicfolder + "chatgpt:");
fileloop (f in sourcefolder) {
local (fname = file.filefrompath (f));
if fname beginswith prefix {
@ncmiller
ncmiller / HOWTO_LinuxKernelQemu.md
Last active April 27, 2024 22:06
How to build the Linux kernel and test changes locally in qemu

This is the process I followed on my Fedora 23 host machine to build a small/minimal vanilla Linux kernel and test in Qemu (based on this blog post). This will provide a safe sandbox in which to test kernel changes, and is generally faster than developing natively on the host machine. Qemu will boot the kernel image directly in the emulated system.

Install required build tools on host machine

sudo dnf install ncurses-devel kernel-devel kernel-headers gcc gcc-c++ git qemu openssl-devel glibc-static

Prepare a working space for kernel development

@yokawasa
yokawasa / ghcr.md
Last active April 27, 2024 22:05
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

@swiss6th
swiss6th / multi-homebridge-systemd.md
Last active April 27, 2024 22:00
Setting up multiple Homebridge instances with systemd

Setting up Multiple Homebridge Instances with systemd

This guide, adapted from oznu's Homebridge Config UI X Wiki, will show you how to set up multiple instances of Homebridge and Homebridge Config UI X using systemd on a Raspberry Pi. This guide assumes you already have a Pi set up and running a recent version of Raspbian.

Step 1: Assume root

All the steps in this guide assume you are running as the root user:

sudo su
@mattia-beta
mattia-beta / ddos.conf
Last active April 27, 2024 22:00
IPtables DDoS Protection for VPS
### 1: Drop invalid packets ###
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
### 2: Drop TCP packets that are new and are not SYN ###
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP
### 3: Drop SYN packets with suspicious MSS value ###
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP
### 4: Block packets with bogus TCP flags ###
-- OverloadedStrings is often useful.
:set -XOverloadedStrings
-- Scoped type variables is often useful so we can specify the types
-- of variables (for example, in lambda expressions).
:set -XScopedTypeVariables
-- useful for import from specified package
:set -XPackageImports