Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Ebay Motherufcker
// @namespace https://gist.github.com/Eibwen/
// @version 0.5
// @description Bid at the last moment
// @updateURL https://gist.github.com/Eibwen/08fab2f3fe2f10ca25ae96433c7ecc9b/raw/ebay-bid-sniper.user.js
// @author Greg Walker
// @match https://www.ebay.com/itm/*
// @grant none
// ==/UserScript==
@YooWaan
YooWaan / commit-msg
Last active March 21, 2025 05:59
git-conventinal-or-semantic-comits
#!/bin/bash
typ="$(head -n 1 "$1" | grep -Eo '^[A-Za-z_\-]+(\([^)]+\))*!?:' | grep -o '^[A-Za-z_\-]*')"
case "$typ" in
"fix" | "feat" | "refactor" | "docs" | "test" | "style" | "perf" | "build" | "release" | "snipet" | "security" )
printf "%b%s%b\\n" "\\033[32;1m" "commit $typ" "\\033[0m"
;;
*)
printf "%b%s%b\\n" "\\033[31;1m" "unsupported commit type [${typ}] !!!" "\\033[0m"
@manuelbl
manuelbl / README.md
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
@bitsandbooks
bitsandbooks / README.md
Last active March 21, 2025 05:57
Kickstart Files

Kickstart Files

These files are here to install a minimal environment (i.e., no desktop) for Fedora Linux 38 and Rocky Linux 9. They're designed to partition a single disk device, creating a UEFI partition, a /boot partition, and logical volumes for an 8 GB swap partition, and the majority of the space for a single / volume.

Usage

The files are designed so you need only change a few minor things to make it work for you:

  • Set a hostname in the network options
  • Specify the storage device for the ignoredisk and bootloader options (usually something like sda, vda, or nvme0n1)
@LeviSnoot
LeviSnoot / discord-timestamps.md
Last active March 21, 2025 05:57
Discord Timestamp Syntax

Discord Timestamps

Discord timestamps can be useful for specifying a date/time across multiple users time zones. They work with the Unix Timestamp format and can be posted by regular users as well as bots and applications.

The Epoch Unix Time Stamp Converter is a good way to quickly generate a timestamp. For the examples below I will be using the Time Stamp of 1543392060, which represents November 28th, 2018 at 09:01:00 hours for my local time zone (GMT+0100 Central European Standard Time).

Formatting

Style Input Output (12-hour clock) Output (24-hour clock)
Default <t:1543392060> November 28, 2018 9:01 AM 28 November 2018 09:01
@t3dotgg
t3dotgg / try-catch.ts
Last active March 21, 2025 05:59
Theo's preferred way of handling try/catch in TypeScript
// Types for the result object with discriminated union
type Success<T> = {
data: T;
error: null;
};
type Failure<E> = {
data: null;
error: E;
};
@andrebrait
andrebrait / keychron_linux.md
Last active March 21, 2025 05:51
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@hieblmedia
hieblmedia / .gitignore
Last active March 21, 2025 05:41
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@ipenywis
ipenywis / cursor-memory-bank-rules.md
Last active March 21, 2025 05:40
Cursor Memory Bank

Cursor's Memory Bank

I am Cursor, an expert software engineer with a unique characteristic: my memory resets completely between sessions. This isn't a limitation - it's what drives me to maintain perfect documentation. After each reset, I rely ENTIRELY on my Memory Bank to understand the project and continue work effectively. I MUST read ALL memory bank files at the start of EVERY task - this is not optional.

Memory Bank Structure

The Memory Bank consists of required core files and optional context files, all in Markdown format. Files build upon each other in a clear hierarchy:

flowchart TD