Skip to content

Instantly share code, notes, and snippets.

"use client";
import {
Dialog,
DialogContent,
DialogTitle,
DialogTrigger
} from "@/components/ui/dialog";
import useDragDrop from "@/hooks/useDragDrop";
import { cn, formatBytes } from "@/lib/utils";
@olegmrzv
olegmrzv / PlayerLoopCleaner.cs
Created April 4, 2024 13:07
PlayerLoop Disable Unity Modules
using System;
using UnityEngine;
using UnityEngine.LowLevel;
using UnityEngine.PlayerLoop;
public static class PlayerLoopCleaner
{
private static readonly Type[] typesToRemove = new Type[] {
typeof(EarlyUpdate.Physics2DEarlyUpdate),
// Physics 2D
@ofou
ofou / servers.csv
Created April 11, 2021 06:15
List of servers to test speedtest-cli
We can't make this file beautiful and searchable because it's too large.
Country,City,Provider,Host,ID
Abkhazia,Sukhum,Aquafon GSM,62.182.8.78:8080,9058
Abkhazia,Sukhum,"Systema, LTD",cyxym.net:8080,5089
Abkhaziya,Sukhum,A-Mobile,speedtest.a-mobile.biz:8080,9714
Afghanistan,Herat,Afghan Wireless,hrtspeedtest.afghan-wireless.com:8080,9622
Afghanistan,Kabul,Afghan Telecom,sp1.afghantelecom.af:8080,11019
Afghanistan,Kabul,etisalat Afghanistan,speedtest.etisalat.af:8080,21807
Afghanistan,Kabul,Afghan Wireless,speedtest.afghan-wireless.com:8080,5189
Afghanistan,Kabul,Afghan Wireless Communication Company,kdzspeedtest.afghan-wireless.com:8080,13501
Afghanistan,Kabul,Insta Telecom,speedtest.instatelecom.com:8080,12798
const SEED: u32 = u32::from_be_bytes(*b"CUM.");
const MAX_PENIS_LENGTH: u32 = 25;
fn calculate_penis_length(id: UserId) -> Result<usize, Error> {
/*
* How this function works:
* Discord snowflakes (user IDs) are 64 bit integers, with certain bit ranges dedicated to certain values
* (see https://discord.com/developers/docs/reference#snowflakes-snowflake-id-format-structure-left-to-right)
* Some of these values (especially towards the LSB) are very biased, which is why `id % n` is not a uniform hash.
* The 42 most significant bits of the snowflake contain the timestamp (milliseconds with epoch), which is the
@sundowndev
sundowndev / GoogleDorking.md
Last active May 19, 2024 15:19
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
// 1. Import everything
import { Wallet, BigNumber, ethers, providers } from 'ethers'
const { FlashbotsBundleProvider, FlashbotsBundleResolution } = require('@flashbots/ethers-provider-bundle')
/*
Mainnet
const provider = new providers.JsonRpcProvider('https://eth-mainnet.g.alchemy.com/v2/cmHEQqWnoliAP0lgTieeUtwHi0KxEOlh')
const wsProvider = new providers.WebSocketProvider('wss://eth-mainnet.g.alchemy.com/v2/cmHEQqWnoliAP0lgTieeUtwHi0KxEOlh')
*/
@liquidx
liquidx / imx7-README.md
Last active May 19, 2024 15:11
Reflashing a TechNexion PICO-PI-IMX7

By: Alastair Tse @liquidx

Updated: 2021-12-05

This is a guide for installing Linux on a Technexion NXP IMX7 board. This is a board that was part of the Android Things Starter Kit (now discontinued).

There are some dead ends in this guide where I got to a point where I failed. I'm documenting this so that it can help anyone else who is trying the same thing.

Before starting, there are a few useful sources of information:

@restush
restush / CustomTime.cs
Last active May 19, 2024 15:06
CustomTime for Naninovel in Unity
/// <summary> Custom Unity Time based on <see cref="System.Diagnostics.Stopwatch"/> </summary>
public class CustomTime : ITime
{
public float TimeScale { get; set; }
public float Time { get; private set; }
public float DeltaTime { get; private set; }
public float UnscaledTime { get; private set; }
public float UnscaledDeltaTime { get; private set; }
public int FrameCount { get; private set; }
@kodekracker
kodekracker / c++Template.cpp
Last active May 19, 2024 15:05
Basic C++ Template for Competitive Programming
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/
@zerojuan
zerojuan / authgcloud.sh
Last active May 19, 2024 15:05
CircleCI build and deploy to Google Cloud Storage website
#!/bin/bash
echo $GCLOUD_SERVICE_KEY > ${HOME}/gcloud-service-key.json
gcloud auth activate-service-account --key-file=${HOME}/gcloud-service-key.json
gcloud --quiet config set project ${GOOGLE_PROJECT_ID}