Skip to content

Instantly share code, notes, and snippets.

@MarioHewardt
MarioHewardt / enable_ebpf_on_wsl2
Last active May 19, 2025 07:48
Enable EBPF on WSL2
By default, EBPF programs will not run on WSL2 due to required kernel modules missing. The following example error is an
indication of this problem:
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.84-microso
ft-standard/modules.dep.bin'
modprobe: FATAL: Module kheaders not found in directory /lib/modules/4.19.84-microsoft-standard
chdir(/lib/modules/4.19.84-microsoft-standard/build): No such file or directory
To fix this you need to rebuild the WSL2 kernel with the missing kernel modules. The below instructions are for Ubuntu 18.04 WSL2.
1. git clone https://github.com/microsoft/WSL2-Linux-Kernel.git
@giordanocardillo
giordanocardillo / README.MD
Last active May 19, 2025 07:47
Remove Office 2016 Product Key

Caution

Due to the subject of this Gist there are a lot of spam/scam comments. I try to remove them all as soon as possible. I don't recommend you to click on any link in the comments

How to remove Microsoft Office 2016 Product Key

  1. Open a command prompt as Administrator
  2. In the command prompt, type the following:
  • Office 2016 (32-bit) on a 32-bit version of Windows

cscript "C:\Program Files\Microsoft Office\Office16\OSPP.VBS" /dstatus

@t3dotgg
t3dotgg / model-prices.csv
Last active May 19, 2025 07:46
Rough list of popular AI models and the cost to use them (cost is per 1m tokens)
Name Input Output
Gemini 2.0 Flash-Lite $0.075 $0.30
Mistral 3.1 Small $0.10 $0.30
Gemini 2.0 Flash $0.10 $0.40
ChatGPT 4.1-nano $0.10 $0.40
DeepSeek v3 (old) $0.14 $0.28
ChatGPT 4o-mini $0.15 $0.60
DeepSeek v3 $0.27 $1.10
Grok 3-mini $0.30 $0.50
ChatGPT 4.1-mini $0.40 $1.60
@Bharat-B
Bharat-B / readydedis.com.conf
Last active May 19, 2025 07:45
nGINX rewrite rules for whmcs 8
server {
listen 80 default_server;
server_name readydedis.com www.readydedis.com;
return 301 https://readydedis.com$request_uri;
}
# HTTPS server
#
server {
listen 443;
#!/bin/bash
# ログ出力用の関数(標準エラー出力に出力)
log() {
echo "$@" >&2
}
# 現在の日時を取得(1週間前の日時計算に使用)
current_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
# 1週間前の日時を計算
@K1ethoang
K1ethoang / Active StarUml version 6 for Window | MacOS | Linux.md
Last active May 19, 2025 07:43
Active StarUml version 6 for Window | MacOS | Linux
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 19, 2025 07:39
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@MateusTymoniuk
MateusTymoniuk / prepare-commit-msg
Last active May 19, 2025 07:38
prepare-commit-msg git hook to add jira ticket number to beginning of the commit msg
#!/bin/bash
# Hook based on this article: https://andy-carter.com/blog/automating-git-commit-messages-with-git-hooks
COMMIT_MSG_FILE=$1
COMMIT_SOURCE=$2
SHA1=$3
branch=$(git branch --show-current)
@AlexTech01
AlexTech01 / Bypassing activation lock on A7 devices with Legacy iOS Kit.md
Last active May 19, 2025 07:35
Bypassing activation lock on A7 devices with Legacy iOS Kit

Bypassing activation lock on A7 devices with Legacy iOS Kit

Devices on iOS 10 can bypass activation if /Applications/Setup.app is deleted before first boot. Since A7 devices can be restored to iOS 10.3.3 through Legacy iOS Kit, we can bypass activation lock very easily on these models.

Guide

  1. Get Legacy iOS Kit for macOS or Linux from https://github.com/LukeZGD/Legacy-iOS-Kit. The complete version is not required for this guide.
  2. Connect your activation locked A7 device (mine was an iPad Air 1) and choose Restore/Downgrade -> iOS 10.3.3, then choose the option to download the IPSW file for iOS 10.3.3. Once the file is downloaded, select "Start Restore" and wait for the restore to complete.

Warning

You must immediately boot the device into DFU mode once the restore has completed using the instructions for your device at https://theapplewiki.com/wiki/DFU_Mode. If the device's first boot occurs at this point, you'll need to restore to 10.3.3 again.