Skip to content

Instantly share code, notes, and snippets.

View Ravenstine's full-sized avatar

Ten Bitcomb Ravenstine

View GitHub Profile
@stsvilik
stsvilik / gulpfile.js
Last active June 4, 2019 11:24
Gulp browserify, babelify, uglify and concat vendor files
/*! gulpfile.js */
const gulp = require("gulp");
const gutil = require("gulp-util");
const browserify = require("browserify");
const buffer = require("vinyl-buffer");
const uglify = require("gulp-uglify");
const sourcemaps = require("gulp-sourcemaps");
const source = require("vinyl-source-stream");
const concat = require("gulp-concat")
@JoshuaCarroll
JoshuaCarroll / gist:f6b2c64992dfe23feed49a117f5d1a43
Last active October 24, 2025 00:20
Regular expression (regex) for non-US amateur radio call signs
All amateur radio call signs:
[a-zA-Z0-9]{1,3}[0-9][a-zA-Z0-9]{0,3}[a-zA-Z]
Non-US call signs:
\b(?!K)(?!k)(?!N)(?!n)(?!W)(?!w)(?!A[A-L])(?!a[a-l])[a-zA-Z0-9][a-zA-Z0-9]?[a-zA-Z0-9]?[0-9][a-zA-Z0-9][a-zA-Z0-9]?[a-zA-Z0-9]?[a-zA-Z0-9]?\b
US call signs:
^[AKNW][A-Z]{0,2}[0-9][A-Z]{1,3}$
@islishude
islishude / caret.js
Last active November 26, 2023 00:16
[DEPRECATED]get/set caret position in contentEditable or textarea/input element(JavaScript)
/**
* @file get/set caret position and insert text
* @author islishude
* @license MIT
*/
export class Caret {
/**
* get/set caret position
* @param {HTMLColletion} target
*/
@gadiener
gadiener / generate-bitcoin-keys.sh
Last active November 20, 2024 14:22
OpenSSL commands to create a Bitcoin private/public keys from a ECDSA keypair
#!/bin/sh
PRIVATE_KEY="ECDSA"
PUBLIC_KEY="ECDSA.pub"
BITCOIN_PRIVATE_KEY="bitcoin"
BITCOIN_PUBLIC_KEY="bitcoin.pub"
echo "Generating private key"
openssl ecparam -genkey -name secp256k1 -rand /dev/random -out $PRIVATE_KEY
@espinz
espinz / README.md
Last active December 7, 2025 00:59
Debian Headless install - simple-cdd

Description

The following will create an automated custom debian iso image using simple-cdd.
Copy the iso to the USB. Plug in the USB and press power; it will automatically restart with a fresh debian install. No prompts, or typing required. Barebone and vm tested.

Jump to Code
Anchor links do not work on github gists. please scroll down.

Install the required package

@ouija
ouija / sleep.sh
Last active February 15, 2023 09:15
Android-x86 "Suspend-To-Idle" (freeze power state) script
#!/system/bin/sh
# sleep fix script by @ouija - for baytrail/cherrytrail devices that only support 'Suspend-to-Idle' or freeze power state
while true
do
# get device wakefulness state
WAKE_STATE=$(dumpsys power | grep -m1 'mWakefulness' | cut -d = -f 2)
@raveenb
raveenb / ssh_into_android.md
Last active July 28, 2026 17:47
SSH into Android

Connecting to an Android device over SSH

Initial Setup

Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running

adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
@notwa
notwa / halokey.c
Last active August 13, 2026 02:02
Halo CE product key, reverse engineered
/*
most of this code was reverse engineered from PidGen.dll, with hashes:
MD5: 3e275cb6c964ad9e3bffa3f37e1eef1e
SHA-1: 325d4bc9b603075ba96c48bfaf31588cb57026c6
SHA-256: 62361c9b86f7899d736986829d7a8529573e030c6656f04f3244f3b792a6b291
how to debug:
* ensure Halo is not installed OR temporarily rename the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft Games\Halo
* run the Halo CE installer off the CD
@atoponce
atoponce / instructions.md
Last active January 28, 2025 05:52
Tutorial for generating Bitcoin wallet mnemonic seeds by hand (almost)

Creating a BIP39 mnemonic 100% by hand (almost)

This document shows how we can create Bitcoin wallet mnemonic seeds by hand in a provably secure way. It follows the BIP-39 specification. The steps are straight forward, and we'll go into each of them in detail with this doc.

The steps are as follows:

  • Generate cryptographically secure bits
  • Divide into 11-bit bytes
@dehanjl
dehanjl / HM-10_Commander.ino
Created September 22, 2020 13:50
Change AT settings of the HM-10
// Dehan Lamprecht, 2020
// Allows changing the settings of the HM-10 (or MLT-BT05) module
// Adapted from http://www.martyncurrey.com/hm-10-bluetooth-4ble-modules/
#include <SoftwareSerial.h>
SoftwareSerial BTSerial(2, 3); // RX | TX
char c=' ';
boolean NL = true;