Skip to content

Instantly share code, notes, and snippets.

View xwxfox's full-sized avatar
🌙
production environments fear me. - Annihilator of Prod 🏆 since 03’

Jay xwxfox

🌙
production environments fear me. - Annihilator of Prod 🏆 since 03’
View GitHub Profile
const stringifyCyclic = (
value: any,
replacer?: ((this: any, key: string, value: any) => any) | undefined,
space?: string | number | undefined
) => {
const seen = new WeakSet<object>();
return JSON.stringify(
value,
function (key, val) {
@xwxfox
xwxfox / tokyo-night-storm.theme.css
Created March 2, 2025 00:07
Custom Tokyo Night Storm theme for Discord
/**
* @name Tokyo Night Storm
* @description Discord Port of Visual Studio Code Theme Tokyo Night Storm
* @author fishylunar
* @version 1.0
* @authorId 907359971337986098
*/
/* DONT TOUCH THIS!!! */
@import url("https://dyzean.github.io/Tokyo-Night/main.css");
@xwxfox
xwxfox / spotiflood.js
Created October 11, 2023 10:22
NodeJS script / CLI to spawn / flood Spotify Connect devices on your local network.
// Spotiflood - skud ud til Meik for at være nederen
// Requires librespot to be installed.
// Lunar 🌙
const { spawn } = require('node:child_process');
const { argv } = require("node:process")
/**
* getRandomDeviceType
* @returns {string} Random device type
@xwxfox
xwxfox / index.js
Last active July 3, 2023 21:50
Simple punycode string decoding without any external libraries - (extends built in string prototype) (browser\node]
// Code
const puny = {
map: (array, callback) => array.map(callback),
mapDomain: (domain, callback) => {
const parts = domain.split('@');
let result = '';
if (parts.length > 1) {
result = parts[0] + '@';
domain = parts[1];
}