Skip to content

Instantly share code, notes, and snippets.

View Niputi's full-sized avatar
🍣
weebing

Niputi Niputi

🍣
weebing
View GitHub Profile
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active April 22, 2025 18:49
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@yyx990803
yyx990803 / exampe-config.js
Created January 13, 2021 02:58
A vite plugin that loads the specified deps over CDN during dev, and downloads/includes them into bundle during build.
// example vite.config.js
import { cdn } from './vite-plugin-cdn'
export default {
plugins: [
// also supported: esm.run, jspm
// loads the dep over the CDN during dev
// auto downloads and includes into the bundle during build
cdn('skypack', {
vue: '^3.0.5'
// Problem: ABCDE × A = EEEEEE. Each letter is a different digit.
// Source: https://twitter.com/preshtalwalkar/status/1309643691506761728?s=20
// Equation to solve: EEEEEE / A = ABCDE
// You have to try 9 digits E and 8 digits A per E (with A neither zero nor E)
for (let E=1; E <= 9; E++) {
for (let A=1; A <= 9; A++) {
if (A === E) continue;
@ebicoglu
ebicoglu / passwordless-token-provider.md
Last active April 7, 2025 00:07
Implementing Passwordless Authentication in ASP NET Core Identity

Implementing Passwordless Authentication in ASP.NET Core Identity

To allow a user login with a magic URL, you need to implement a custom token provider. I'll show you how to add a custom token provider to authenticate a user with a link.

Step-1

Create a class named PasswordlessLoginProvider in your *.Web project.

PasswordlessLoginProvider.cs

Running benchmark on 1 thread
--------------------
Topic View (dev): 6.298 (±20.8%) op/s
Topic Creation Time - no background queue: 3.855 (±7.1%) op/s
Cooking README.md: 100.992 (±55.9%) op/s
Booting Rails: 1.506 (±1.3%) seconds
Running benchmark on 16 threads
--------------------
@OliverJAsh
OliverJAsh / foo.md
Last active September 4, 2023 15:31
`Option` vs non-`Option`

Option vs non-Option

Option<T> non-Option (T | undefined)
accessing property userOption.map(user => user.age) userNullish?.age
calling a method userOption.map(user => user.fn()) userNullish?.fn()
providing fallback ageOption.getOrElse(0) ageNullish ?? 0
filter ageOption.filter(checkIsOddNumber) `ageNull
@IanColdwater
IanColdwater / twittermute.txt
Last active April 14, 2025 16:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@damieng
damieng / reset-wifi-on-wake.xml
Last active December 17, 2019 23:27
Reset WiFi adapter on wake
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2019-12-17T10:49:39.5675591</Date>
<URI>\Wake on WiFi</URI>
</RegistrationInfo>
<Triggers>
<EventTrigger>
<Enabled>true</Enabled>
<Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="System"&gt;&lt;Select Path="System"&gt;*[System[Provider[@Name='Microsoft-Windows-Power-Troubleshooter' or @Name='power'] and (EventID=1)]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active April 14, 2025 05:39
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@hyonschu
hyonschu / deleteDiscordMessages.js
Created July 11, 2019 19:36 — forked from victornpb/deleteDiscordMessages.js
Delete all your messages from DM or Channel in Discord
//Paste this function in DevTools console inside Discord
/**
* Delete all messages in a Discord channel or DM
* @param {string} authToken Your authorization token
* @param {string} authorId Author of the messages you want to delete
* @param {string} channelId Channel were the messages are located
* @param {string} afterMessageId Only delete messages after this, leave blank do delete all
* @author Victornpb <https://www.github.com/victornpb>
* @see https://gist.github.com/victornpb/135f5b346dea4decfc8f63ad7d9cc182