Skip to content

Instantly share code, notes, and snippets.

View sudojunior's full-sized avatar
:shipit:
It'll be fine, let it run. 💥

Junior sudojunior

:shipit:
It'll be fine, let it run. 💥
View GitHub Profile
@iamtimmy
iamtimmy / set_explorer.reg
Created March 1, 2025 17:03
registry files to set and unset filepilot as the default file manager.
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Drive\shell]
@="none"
[-HKEY_CLASSES_ROOT\Drive\shell\open]
[HKEY_CLASSES_ROOT\Directory]
@="File Folder"
const recursive = (input: string[][]): string[][] => {
if (input.length === 0) return [];
if (input.length === 1) return input[0].map((i) => [i]);
const arr = input[0];
const perm = recursive(input.slice(1));
const result = arr.map((a) => perm.map((p) => [a, ...p])).flat(1);
return result;
};
@Stuyk
Stuyk / aInterfaces.ts
Last active June 11, 2025 17:36
GTA:V Clothing Maximums (April 22, 2023)
interface ComponentData {
[component: number]: {
[drawable: number]: number;
};
}
interface ClothingList {
clothing: { [dlc: number]: ComponentData };
props: { [dlc: number]: ComponentData };
}
@Stuyk
Stuyk / leaderboard.ts
Created July 21, 2021 13:41
alt:V Player List Snippet
import * as alt from 'alt-client';
import * as native from 'natives';
import { SYSTEM_EVENTS } from '../../shared/enums/system';
import { requestScaleForm, Scaleform } from '../utility/scaleform';
import { Timer } from '../utility/timers';
const SCALEFORM_NAME = 'mp_mm_card_freemode';
const MAX_PLAYERS = 16;
let index = 1;
@Stuyk
Stuyk / timers.ts
Created July 19, 2021 14:28
Keep Track of Timers, Average Completion Time, and What is Turned On / Off
import * as alt from 'alt-client';
interface TimerInfo {
name?: string;
id: number;
ms: number;
}
const TIMER_CATEGORIES = {
SMALLEST: [0, 1],
@sindresorhus
sindresorhus / esm-package.md
Last active January 7, 2026 12:41
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@imjuniper
imjuniper / discord-verification-rundown.md
Last active February 18, 2024 13:40
Rundown of all the info about Discord's bot verification

Quick rundown of the Discord bot verification situation.

Remember, there's not rush to get verified before October 7th, since verification takes about 5 days anyways. If you are in less than a 100 servers, no need to worry, your bot will still work as it does currently. Keep in mind some stuff is NOT official, so unless there's a source, take it with a grain of salt.

Verification

  • If you are in a team, the owner gets verified, which verifies the whole team. Source
  • If you can't provide ID verification, you could transfer ownership of your team to another member so they can do the verification process. Source
  • The Stripe verification piece is on the user itself, but the other parts of the form are per-bot.
  • You do NOT need a Stripe account to verify, only your ID. [Source](https://discordapp.com/channels/613425648685547541/6972
let myObj = {
//add an asyncIterator method to my object
[Symbol.asyncIterator]() {
//which will return an object that contains a method called next()
return {
i: 0 /* my counter property */,
next() {
if (this.i < 3) {
//return value from the next method must be an object
//the object should contain a value and a done property
@quantum9Innovation
quantum9Innovation / color_blender.js
Last active April 11, 2020 00:54
An additive color blending algorithm in 10 lines of code that blends colors while retaining the brightness of each color to create realistic blends.
/*
Pass in 2 colors {r1,g1,b1} and {r2,g2,b2}
Select bi the blend intensity of the first color (0-->1)
Output is in form {r,g,b}
*/
var blend2A = function (r1,g1,b1,r2,g2,b2,bi) {
var endR = bi*r1+r2*(1-bi)
var endG = bi*g1+g2*(1-bi)
var endB = bi*b1+b2*(1-bi)
@nerrixde
nerrixde / vpn.md
Last active April 30, 2024 19:23 — forked from joepie91/vpn.md
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.