Skip to content

Instantly share code, notes, and snippets.

@thegreatestminer
thegreatestminer / encoded-20201212150102.txt
Created December 12, 2020 15:01
MobaXTerm Professional x64 License Key [READ COMMENTS]
UEsDBBQAAAAIABNQjFGCf/GfLgAAACwAAAAHAAAAUHJvLmtleTMqdncpCXQOKDAp9woMzEo1MTVOrHAzTjTLME7VNs1LK8owTjQpcU8tcuLlAgBQSwECFAAUAAAACAATUIxRgn/xny4AAAAsAAAABwAAAAAAAAAAAAAAAAAAAAAAUHJvLmtleVBLBQYAAAAAAQABADUAAABTAAAAAAA=
@Offirmo
Offirmo / intercept.js
Last active April 18, 2024 10:20
[Intercepting fetch and/or XHR in JavaScript] #JavaScript #browser #growth
/////// fetch ///////
const originalFetch = window.fetch;
window.fetch = async (...args) => {
const fetchee = await originalFetch(...args);
return new Proxy(fetchee, {});
};
new Proxy(target, {
@Masuzu
Masuzu / gaps.sql
Last active April 18, 2024 10:20
SQL Islands and Gap Recipe - Given a list of 1D segments which may overlap, the islands and gaps problem aim is to union together the overlapping segments and find gaps between non overlapping segments
WITH SegmentGroupings AS (
SELECT ROW_NUMBER () OVER (ORDER BY SegmentId, SegmentStart, SegmentEnd) AS Row,
SegmentId,
SegmentStart,
SegmentEnd,
MAX(SegmentEnd) OVER (
PARTITION BY SegmentId
ORDER BY SegmentStart, SegmentEnd
ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING
) AS PreviousSegmentEnd
@smx-smx
smx-smx / XZ Backdoor Analysis
Last active April 18, 2024 10:13
[WIP] XZ Backdoor Analysis and symbol mapping
XZ Backdoor symbol deobfuscation. Updated as i make progress
@helje5
helje5 / SwiftUIDataUnitTest.swift
Created August 17, 2023 16:19
Unit Testing a SwiftUI Query
//
// Created by Helge Heß.
// Copyright © 2023 ZeeZide GmbH.
//
import XCTest
import UIKit
import SwiftData
import SwiftUI

Project Design Document: Golf Range Simulator

  • Created at: mm/dd/yyyy
  • Author: Name

Project Concept

1. Player Control

You control a [PLAYER TYPE] in this [TOP DOWN / SIDE VIEW / ISOMETRIC] game where [USER INPUT TYPE] makes the player [DESCRIPTION OF PLAYER MOVEMENT].

@mmocny
mmocny / inp-devtools-watch.js
Created April 14, 2023 14:12
Add these snippets to DevTools (console) Watch expressions
// max-INP:
(()=>{let o=globalThis;return void 0===o.winp&&(o.winp=0,new PerformanceObserver(n=>{for(let e of n.getEntries()){if(!e.interactionId)continue;o.winp=Math.max(e.duration,o.winp);let r=o=>o<=200?"color: green":o<=500?"color: yellow":"color: red";console.log(`%c[Interaction: ${e.name.padEnd(12)}] %cDuration: %c${e.duration}`,"color: grey; font-family: Consolas,monospace","",r(e.duration))}}).observe({type:"event",durationThreshold:0,buffered:!0})),o.winp})();
// interactionCount
performance.interactionCount;
import Benchmark from "benchmark";
const datetimeValidationSuite = new Benchmark.Suite("datetime");
const DATA = "2020-01-01";
const MONTHS_31 = new Set([1, 3, 5, 7, 8, 10, 12]);
const MONTHS_30 = new Set([4, 6, 9, 11]);
const simpleDatetimeRegex = /^(\d{4})-(\d{2})-(\d{2})$/;
const datetimeRegexNoLeapYearValidation =
@catalinmiron
catalinmiron / README.md
Created April 16, 2024 20:36
Expo app.json Apple Privacy Manifest

About

The privacy details that you may need to add for Apple Privacy Manifest.

This config plugin it's already available from expo >=50.0.17 (Part of this PR by aleqsio)

Tip

Read more about Privacy Manifest File from Apple docs

@li-xunhuan
li-xunhuan / cli.py
Created August 6, 2023 00:16
SmsForwarder使用 SM4 加密主动控制接口Python调用案例
import base64
import hmac
import time
import json
import urllib.parse
from gmssl.sm4 import CryptSM4, SM4_ENCRYPT, SM4_DECRYPT
class SmsF:
"""