Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / dom3d.js
Last active May 9, 2024 03:16
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@eduardo-mior
eduardo-mior / Lista de Órgãos Emissores
Last active May 9, 2024 03:13
Lista completa de órgãos emissores de documentos de identificação.
ABNC - Academia Brasileira de Neurocirurgia
AGU - Advocacia-Geral da União
ANAC - Agência Nacional de Aviação Civil
CAER - Clube de Aeronáutica
CAU - Conselho de Arquitetura e Urbanismo
CBM - Corpo de Bombeiro Militar
CFA - Conselho Federal Administração
CFB - Conselho Federal de Biblioteconomia
CFBIO - Conselho Federal de Biologia
CFBM - Conselho Federal de Biomedicina
/*
* Module Name:
* WorkingSetWatch.cpp
*
* Abstract:
* Tracks page faults that occur within the process.
*
* NOTE: This is not compatible with Wow64 and must be run as a 64-bit
* program on x64 and a 32-bit program on x86.
*
@mattratleph
mattratleph / vimdiff.md
Last active May 9, 2024 03:11 — forked from roothybrid7/vimdiff_cheet.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@zOrg1331
zOrg1331 / wireguard_layer2.md
Last active May 9, 2024 03:11
wireguard, wireguard layer 2, wireguard over TCP

Intro

This note describes how to connect two networks/devices/VMs over public network using Wireguard with Layer 2 support (ARP, IPv6 link-local, etc).

This can also be achieved using SSH and its "tap" tunnel, however, it does not provide the same level of latency and bandwidth as full-blown VPN such as Wireguard.

In addition, this note describes how to tunnel Wireguard over TCP connection. This may be of use if you encounter firewall in-between so, for instance, you can use TCP port 443 only.

Objective

@bradwestfall
bradwestfall / HoC-vs-RenderProps-vs-Hooks.md
Last active May 9, 2024 03:08
An explanation of why Hooks are a nicer way to abstract re-useable state and functionality vs HoC's and Render Props

HoC (pattern) vs Render Props (pattern) vs Hooks (not pattern, a new API)

Someone was asking me about comparing the HoC and Render Props patterns (and their shortcomings) to hooks. I might leave this up as a public gist for others if it's helpful.


tldr;

Issues with HoC:

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 9, 2024 03:03
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@pismy
pismy / ThreadPoolTaskExecutorWithMdcPropagation.java
Created January 12, 2016 09:15
SLF4J Tool: ThreadPoolExecutor that propagates MDC from calling thread to executor thread
import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.RejectedExecutionHandler;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@miliarch
miliarch / install-arch-in-virtual-machine.md
Last active May 9, 2024 02:59
Install Arch Linux in a Virtual Machine
@binary1230
binary1230 / .gitignore (wwise)
Created March 22, 2021 15:38
WWise + Unity .gitignore file example (older, but should still work)
# unofficial .gitignore for WWise + Unity projects
# dom at audiotankstudios dot com for questions
#
# this is based on a slightly older Unity and WWise version but, should be a decent starting point
#
# Instructions:
# 1) Place this in your root folder for your Unity project
# 2) Modify "WWiseProject/" below to be the path to your .wproj folder inside your Unity assets
# Unity portion based on https://github.com/github/gitignore/blob/master/Unity.gitignore