Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 18:42
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; // ¯\\_(ツ)_/¯
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active March 28, 2024 18:41
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
@robleh
robleh / youtube-recommendations.filter
Last active March 28, 2024 18:40
uBlock Origin filter to remove YouTube homepage, endscreen and sidebar recommendations
! Homepage
www.youtube.com##.grid-disabled.grid.ytd-browse.style-scope > .ytd-two-column-browse-results-renderer.style-scope
! Sidebar recommendations
www.youtube.com##ytd-watch-next-secondary-results-renderer.ytd-watch-flexy.style-scope
! End screen tiles
www.youtube.com##.ytp-endscreen-content
@rxaviers
rxaviers / gist:7360908
Last active March 28, 2024 18:39
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mattbell87
mattbell87 / remote-wsl.md
Last active March 28, 2024 18:38
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Change your OpenSSH shell

SSH to your Windows host (SSH Server must be installed in Windows Features)

ssh user@windowshost
@osamaqarem
osamaqarem / nginx_macos.md
Last active March 28, 2024 18:37
Nginx on MacOS

Install nginx (Homebrew)

brew install nginx

Configuration file for nginx will be at /usr/local/etc/nginx/nginx.conf

Web apps can be stored at /usr/local/var/www

Commands

Start:

@heiswayi
heiswayi / repo-reset.md
Created February 5, 2017 01:32
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@yusuke
yusuke / Android Studio30分集中超絶技巧100選メモ DroidKaigi 2018 #DroidKaigi #DroidKaigi_room3
Created February 9, 2018 02:10
Android Studio30分集中超絶技巧100選メモ DroidKaigi 2018 #DroidKaigi #DroidKaigi_room3
Android Studio30分集中超絶技巧100選 DroidKaigi 2018
山本 ユウスケ @yusuke
マウス、トラックパッドを使うのはやめましょう
今日は以下のキーマップの話です
Mac OSX: Mac OSX 10.5+
Windows/Linux: Default
他のキーマップだとQiitaやドキュメント、ブログなどを見る際に苦労します。
設定画面 Cmd + , (Ctrl + Alt + S)
プロジェクト設定画面 Cmd + ;
File > Power Save Modeでバッテリー節約
@hf02
hf02 / DOM3D.user.js
Last active March 28, 2024 18:38 — forked from OrionReed/DOM3D.js
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// ==UserScript==
// @name 3D DOM viewer
// @namespace https://gist.github.com/hf02/2f2fb776ba233fd758af559b9de9e177
// @version 2024-03-27
// @description 3D DOM viewer
// @author OrionReed (forked by hf02)
// @match *://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant GM_registerMenuCommand
// ==/UserScript==
@kuroski
kuroski / camelCase-snake_case-types.ts
Last active March 28, 2024 18:32
Typescript type camelCase / snake_case conversion
type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}`
? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}`
: Lowercase<S>
type KeysToCamelCase<T> = {
[K in keyof T as CamelCase<string & K>]: T[K]
}
type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ?