Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / dom3d.js
Last active May 11, 2024 15:08
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; // ¯\\_(ツ)_/¯
@Deub27
Deub27 / UIStackView+removeAll.swift
Created November 25, 2017 14:00
Remove all arranged subviews from UIStackView at once
import UIKit
extension UIStackView {
func removeAllArrangedSubviews() {
let removedSubviews = arrangedSubviews.reduce([]) { (allSubviews, subview) -> [UIView] in
self.removeArrangedSubview(subview)
return allSubviews + [subview]
}
@Francesco149
Francesco149 / osu_on_linux_overhaul.md
Last active May 11, 2024 15:05
Ultimate guide to low-latency osu on linux
import xmltodict
import json
import numpy as np
import pandas as pd
#Parse XML to dictionary
with open('export.xml') as f:
health = xmltodict.parse(f.read())
#Extract desired data and turn into a Data Frame
@DMeechan
DMeechan / word-list.js
Last active May 11, 2024 15:01
BIP39 mnemonic phases word list (2048 words)
const WORDLIST = ["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse",
"access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act",
"action","actor","actress","actual","adapt","add","addict","address","adjust","admit",
"adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent",
"agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert",
"alien","all","alley","allow","almost","alone","alpha","already","also","alter",
"always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger",
"angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique",
"anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic",
"area","arena","argue","arm","armed","armor","army","around","arrange","arrest",
@erorus
erorus / itembonus.csv
Last active May 11, 2024 15:00
7.2.0 item bonus IDs
id quality level previewlevel levelcurve tag tagpriority name namepriority
1 20 Heroic 0
2 4 Pristine 10
3 of Power 0
15 4 20
17
18
19 of the Fireflash 0
20 of the Fireflash 0
21 of the Fireflash 0
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 11, 2024 14:59
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"
/*
* Test Code For Hoverboard with this firmware:
* https://github.com/p-h-a-i-l/hoverboard-firmware-hack
*
* Connect the PPM Receiver Data Pin to Arduino Pin 3
* And set the Amount of channels of the PPM Receiver.
* this code uses the Arduino Hardware serial.
*
*/
@joaohcrangel
joaohcrangel / validation-cpf.ts
Last active May 11, 2024 14:57
Função para validar CPF em TypeScript
function isValidCPF(value: string) {
if (typeof value !== 'string') {
return false;
}
value = value.replace(/[^\d]+/g, '');
if (value.length !== 11 || !!value.match(/(\d)\1{10}/)) {
return false;
}