Skip to content

Instantly share code, notes, and snippets.

View briankariuki's full-sized avatar

Brian Kariuki briankariuki

View GitHub Profile
@briankariuki
briankariuki / explanation.js
Created September 22, 2025 04:20 — forked from therightstuff/explanation.js
Convert GUID (UUID) to integer numbers in Javascript (and back again)
// A UUID is a 128-bit number which is too large to be represented as a native integer in Javascript.
// The original solution I posted (based on https://github.com/uuidjs/uuid#uuidparsestr ) wasn't good,
// as it converted the given UUID into a byte array and then selected only the first four bytes to be
// used as the integer.
const uuid = require('uuid');
let convertGuidToInt = (uuid) => {
// parse accountId into Uint8Array[16] variable
let parsedUuid = uuid.parse(uuid);
@briankariuki
briankariuki / unfollow.js.md
Created November 30, 2024 13:02 — forked from JamieMason/unfollow.js.md
Unfollow everyone on twitter.com

Unfollow everyone on twitter.com

  1. Go to https://twitter.com/YOUR_USER_NAME/following
  2. Open the Developer Console. (COMMAND+ALT+I on Mac)
  3. Paste this into the Developer Console and run it
// Unfollow everyone on twitter.com, by Jamie Mason (https://twitter.com/fold_left)
// https://gist.github.com/JamieMason/7580315
//
@briankariuki
briankariuki / introrx.md
Created February 28, 2023 19:00 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing