Skip to content

Instantly share code, notes, and snippets.

View discountry's full-sized avatar
📕
Learning

Disney discountry

📕
Learning
View GitHub Profile
@Xsir0
Xsir0 / gist:950b13e1c2d003c9209f1c965eefdef9
Created March 13, 2025 14:10
微信公众号HTML手动清理与插入剪贴板内容
// ==UserScript==
// @name 微信公众号HTML手动清理与插入剪贴板内容
// @namespace http://tampermonkey.net/
// @version 0.3
// @description 在微信公众号页面添加按钮,手动清除或插入剪贴板内容到指定路径
// @author Xsir
// @match *://mp.weixin.qq.com/cgi-bin/appmsg*
// @grant none
// ==/UserScript==
@perkinsjr
perkinsjr / middleware.ts
Last active August 7, 2024 11:04
Using Clerk with Upstash for Middleware rate limiting and API Protection
import { getAuth, withClerkMiddleware } from "@clerk/nextjs/server";
import { NextResponse, NextFetchEvent } from "next/server";
import type { NextRequest } from "next/server";
import { Ratelimit } from "@upstash/ratelimit";
import { Redis } from "@upstash/redis";
// Add public paths for Clerk to handle.
const publicPaths = ["/", "/sign-in*", "/sign-up*", "/api/blocked"];
// set your rate limit.
@b3h3rkz
b3h3rkz / faucets.md
Last active January 3, 2026 17:35
Bitcoin Testnet Faucets
@emilianavt
emilianavt / BestVTuberSoftware.md
Last active January 8, 2026 11:44
Best VTuber Software

Best VTuber software

This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.

Additional explanations:

  • iPhone means that an iPhone is basically required
  • iFacialMocap support means that tracking data can be received from the iFacialMocap iPhone app
  • VMC protocol means that the application can send and/or receive tracking data from other VMC protocol capable applications, allowing the combination of multiple tracking methods (e.g. VSeeFace receiving VR tracking from Virtual Motion Capture and iPhone/ARKit face tracking from Waidayo)
  • Tobii means that the Tobii eye tracker is supported
@kevinkub
kevinkub / scriptable-line-chart.js
Last active August 27, 2025 01:41
Simple line chart class for https://scriptable.app 📈
class LineChart {
// LineChart by https://kevinkub.de/
constructor(width, height, values) {
this.ctx = new DrawContext();
this.ctx.size = new Size(width, height);
this.values = values;
}
_calculatePath() {
@ndrbrt
ndrbrt / wait-for-open-websocket-connection.js
Last active October 6, 2024 21:51
Wait for the WebSocket connection to be open, before sending a message.
const waitForOpenConnection = (socket) => {
return new Promise((resolve, reject) => {
const maxNumberOfAttempts = 10
const intervalTime = 200 //ms
let currentAttempt = 0
const interval = setInterval(() => {
if (currentAttempt > maxNumberOfAttempts - 1) {
clearInterval(interval)
reject(new Error('Maximum number of attempts exceeded'))
@sarahsturgeon
sarahsturgeon / bis.md
Last active December 24, 2024 16:31
World of Warcraft 3.3.5a Warmane Complete PvE BiS (Best In Slot) List
@johncantrell97
johncantrell97 / satoshistreasure.md
Last active February 10, 2025 19:04
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes

Today (April 16th 2019 at noon) the first major clues to discover key #1 was set to be released in a few cities. A QR code with the words 'orbital' were found at these locations and looked like this: (https://imgur.com/a/6rNmz7T). If you read the QR code with your phone you will be directed to this url: https://satoshistreasure.xyz/k1

At this URL you are prompted to input a passphrase to decrypt the first shard. An obvious first guess was to try the word 'orbital' from the QR code. Not suprisingly this worked! This reveals a congratulations page and presents the first key shard:

ST-0001-a36e904f9431ff6b18079881a20af2b3403b86b4a6bace5f3a6a47e945b95cce937c415bedaad6c86bb86b59f0b1d137442537a8.

Now, we were supposed to wait until April 17th to get clues from the other cities for keys #2 and #3 but that wouldn't stop me from digging around with all the new information we had. All that time "playing" notpron (http://notpron.org/notpron/) years ago was going to help me here.

The first thing I noticed was

@erdincay
erdincay / sugh.sh
Last active October 8, 2025 17:41
su GitHub (downloading all repositories from a given user)
#!/bin/bash
if [ -z "$1" ]; then
echo "waiting for the following arguments: username + max-page-number"
exit 1
else
name=$1
fi
if [ -z "$2" ]; then
@Dexaran
Dexaran / ERC20_token_standard_vulnerability_classification.md
Last active June 22, 2024 22:51
ERC20 token standard vulnerability classification.

Previously described at: ERC20 critical problems medium article.

Description.

ERC20 is the most common Ethereum token standard. It should be noted that it is also the first Ethereum's token standard as well.

It is also important that the original ERC20 proposal is a definition of token interface. EIP20 does not define a reference implementation for this token standard. Here is OpenZeppelin implementation of ERC20 token: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token/ERC20

ERC20 token standard implementation assumes two ways of token transferring: (1) transfer function and (2) approve + transferFrom pattern.