Skip to content

Instantly share code, notes, and snippets.

@Nevro
Nevro / deepEqualLite.js
Created May 10, 2024 07:16
Fastest Deep Equal Comparison in JavaScript (Lite version! Objects, Arrays, Maps, Sets, Dates,...)
Object.deepEqualLite ??= function(target, source) {
if (target === null || source === null)
return target === source;
if (typeof target !== 'object' || typeof source !== 'object')
return Object.is(target, source);
let tor = target.constructor;
if (tor !== source.constructor)
return false;
if (tor === undefined) {
const tag = Object.prototype.toString.call(target);
@tatsumoto-ren
tatsumoto-ren / subs.md
Last active May 12, 2024 13:26
Japanese Subtitles

📓 Table of Contents 📚 Resources ✉️ Chat


kitsunekko.net jp subtitles

A large repository of japanese subtitles that is updated reasonably often and has a clean design.| The most popular one, you can upload your own subs.| Often have to be retimed.

@osipxd
osipxd / paper-versions.json
Last active May 12, 2024 13:22
Paper versions links
{
"latest": "1.20.6",
"versions": {
"1.20.6": "https://api.papermc.io/v2/projects/paper/versions/1.20.6/builds/28/downloads/paper-1.20.6-28.jar",
"1.20.5": "https://api.papermc.io/v2/projects/paper/versions/1.20.5/builds/22/downloads/paper-1.20.5-22.jar",
"1.20.4": "https://api.papermc.io/v2/projects/paper/versions/1.20.4/builds/496/downloads/paper-1.20.4-496.jar",
"1.20.2": "https://api.papermc.io/v2/projects/paper/versions/1.20.2/builds/318/downloads/paper-1.20.2-318.jar",
"1.20.1": "https://api.papermc.io/v2/projects/paper/versions/1.20.1/builds/196/downloads/paper-1.20.1-196.jar",
"1.20": "https://api.papermc.io/v2/projects/paper/versions/1.20/builds/17/downloads/paper-1.20-17.jar",
"1.19.4": "https://api.papermc.io/v2/projects/paper/versions/1.19.4/builds/550/downloads/paper-1.19.4-550.jar",
using System;
using System.Collections.Generic;
/// <summary>
/// Représente les coordonnées d'une cellule dans une grille.
/// </summary>
public class CellCoordinates
{
public int X { get; set; }
public int Y { get; set; }
using System;
using System.Collections.Generic;
/// <summary>
/// Représente les coordonnées d'une cellule dans une grille.
/// </summary>
public class CellCoordinates
{
public int X { get; set; }
@topheman
topheman / git-notes.md
Created June 29, 2015 17:39
Git notes cheat sheet
@paulirish
paulirish / what-forces-layout.md
Last active May 12, 2024 13:20
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@paolobrasolin
paolobrasolin / README.md
Last active May 12, 2024 13:17
A::B prompting challenge
#include <iostream>
#include <fstream>
#include <cstdlib> // For rand() and srand()
#include <ctime> // For time()
#include <string>
#include <vector>
const int MAX_WIDTH = 50;
const int MAX_HEIGHT = 40;
const int MAX_FIRE_DISTANCE = 10;
@nickyvanurk
nickyvanurk / camera.tsx
Last active May 12, 2024 13:14
Camera perspective <-> orthographic toggle in r3f and vanilla three.js
import { useEffect, useRef, useState } from 'react';
import { useFrame, useThree } from '@react-three/fiber';
import { MapControls, OrthographicCamera, PerspectiveCamera } from '@react-three/drei';
import type { OrbitControls as OrbitControlsImpl } from 'three-stdlib';
export function Camera() {
const [oldType, setOldType] = useState('PerspectiveCamera');
const [coords, setCoords] = useState({ x: 0, y: 0 });
const gl = useThree((state) => state.gl);