Skip to content

Instantly share code, notes, and snippets.

View thinkverse's full-sized avatar
🦖

Kim Hallberg thinkverse

🦖
View GitHub Profile
@thinkverse
thinkverse / generatePasswords.php
Created January 19, 2021 10:14
Useful snippet for generating quick random passwords
<?php
$keyspace = '123456789abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ';
$keyspaceLength = mb_strlen($keyspace, 'utf-8') - 1;
$numberOfPasswords = 8;
$numberOfChars = 16;
$passwords = [];
@thinkverse
thinkverse / gallery.css
Last active June 8, 2021 02:59
Single-line images gallery with `array_*` functions and `scandir`.
@thinkverse
thinkverse / bleet.json
Last active April 16, 2023 11:59
Bleet made with Rich Text
{
"text": "This bleet to @shinyakato.dev can be found on this Gist. 👍",
"facets": [
{
"index": { "byteStart": 14, "byteEnd": 29 },
"features": [
{
"$type": "app.bsky.richtext.facet#mention",
"did": "did:plc:iijrtk7ocored6zuziwmqq3c"
}
@thinkverse
thinkverse / node-polyfill-fetch.js
Created April 24, 2023 20:55
A undici fetch Polyfill shamelessly ripped from Next.js
import Undici from "undici";
// Polyfill fetch() in the Node.js environment
// Simplified from https://github.com/vercel/next.js/blob/canary/packages/next/src/server/node-polyfill-fetch.ts
if (!global.fetch) {
function getFetchImpl() {
return Undici;
}