Skip to content

Instantly share code, notes, and snippets.

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 19:34
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; // ¯\\_(ツ)_/¯
@kepano
kepano / obsidian-web-clipper.js
Last active March 28, 2024 19:29
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@zenoyu
zenoyu / gist:f63799a9079a5df376d5daf3cea27be4
Last active March 28, 2024 19:28
AWS Lambda (Node) - Using Insight API to Query your Cloudwatch Log for Daily Error Report
/**
* AWS Lambda (Node) - Using Insight API to Query your Cloudwatch Log for Daily Error Report
* @author Zeno Yu <zeno.yu@gmail.com>
*/
const AWS = require('aws-sdk');
var cloudwatchlogs = new AWS.CloudWatchLogs();
exports.handler = async (event) => {
// Cloudwatch Log Group name
@ceving
ceving / Web Component for Copyright Years.md
Last active March 28, 2024 19:27
Web Component for Copyright Years
@0xdevalias
0xdevalias / _deobfuscating-unminifying-obfuscated-web-app-code.md
Last active March 28, 2024 19:25
Some notes and tools for reverse engineering / deobfuscating / unminifying obfuscated web app code
import Lean
opaque g (n : Nat) : Nat
@[simp] def f (i n m : Nat) :=
if i < n then
f (i+1) n (g m)
else
m
termination_by n - i
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active March 28, 2024 19:19
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@mateusflorez
mateusflorez / settings.json
Last active March 28, 2024 19:18
Vscode configs
{
// Security
"security.workspace.trust.untrustedFiles": "newWindow",
// Fonts
"editor.fontSize": 14,
// "editor.fontSize": 20,
"editor.fontWeight": 100,
"editor.tabSize": 2,
"editor.lineHeight": 22,
// "editor.lineHeight": 24,
@qoomon
qoomon / conventional_commit_messages.md
Last active March 28, 2024 19:18
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

ℹ️ git-conventional-commits A CLI util to ensure this conventions and generate changelogs

Commit Message Formats

Default