Skip to content

Instantly share code, notes, and snippets.

View jacdebug's full-sized avatar
🕸️
Debugging

jacdebug jacdebug

🕸️
Debugging
View GitHub Profile
for i in /System/Library/Sounds/*; do echo $i; afplay $i; done;
while true; do afplay /System/Library/Sounds/Glass.aiff; sleep 60; done
fn visit_accessibility<'ast:'r,'r>(&mut self,n: &'ast swc_ast::Accessibility,__ast_path: &mut swc_ecma_visit::AstNodePath<'r>){
visit_accessibility_with_path(self,n,__ast_path)
}
fn visit_array_lit<'ast:'r,'r>(&mut self,n: &'ast swc_ast::ArrayLit,__ast_path: &mut swc_ecma_visit::AstNodePath<'r>){
visit_array_lit_with_path(self,n,__ast_path)
}
fn visit_array_pat<'ast:'r,'r>(&mut self,n: &'ast swc_ast::ArrayPat,__ast_path: &mut swc_ecma_visit::AstNodePath<'r>){
fn visit_mut_accessibility(&mut self,n: &mut swc_ecma_utils::swc_ecma_ast::Accessibility){
swc_ecma_visit::visit_mut_accessibility(self,n)
}
fn visit_mut_array_lit(&mut self,n: &mut swc_ecma_utils::swc_ecma_ast::ArrayLit){
swc_ecma_visit::visit_mut_array_lit(self,n)
}
fn visit_mut_array_pat(&mut self,n: &mut swc_ecma_utils::swc_ecma_ast::ArrayPat){
swc_ecma_visit::visit_mut_array_pat(self,n)
nm -an foo | c++filt
const testInput = `$ cd /
$ ls
dir a
14848514 b.txt
8504156 c.dat
dir d
$ cd a
$ ls
dir e
29116 f
const testInput = `mjqjpqmgbljsphdztnvjfqwrcgsmlb
bvwbjplbgvbhsrlpgdmjqwftvncz
nppdvjthqldpwncqszvftbrmjlhg
nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg
zcfzfwzzqfrljwzlrfnpqdbhtmscgvjw`;
const testInput2 = `mjqjpqmgbljsphdztnvjfqwrcgsmlb
bvwbjplbgvbhsrlpgdmjqwftvncz
nppdvjthqldpwncqszvftbrmjlhg
nznrnfrfntjfmvfwmzdfjlvtqnbhcprsg
const allInput = document.body.textContent.slice(0, -1).split('\n');
const inputMoves = allInput.slice(allInput.findIndex(e => e === '') + 1);
const inputStacks = allInput.slice(
0,
allInput.findIndex(e => e === '')
);
const inputLen = inputStacks[inputStacks.length - 1]
// https://adventofcode.com/2022/day/4/input
const input = document.body.textContent.slice(0, -1).split("\n");
const test_input = `2-4,6-8
2-3,4-5
5-7,7-9
2-8,3-7
6-6,4-6
2-6,4-8`.split("\n");
// https://adventofcode.com/2022/day/3/input
// const input = document.body.textContent.slice(0, -1).split("\n")
// const input = document.body.textContent.split("\n").filter(i => i != '')
const INPUT_1 = `vJrwpWtwJgWrhcsFMMfFFhFp
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL
PmmdzqPrVvPwwTWBwg
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn
ttgJtRGJQctTZtZT
CrZsJsPPZsGzwwsLwLmpwMDw`;
// https://adventofcode.com/2022/day/2/input
const input = document.body.textContent.split("\n").filter((i) => i != "");
const checkWin = new Map([
["A X", 0],
["B X", -1],
["C X", 1],
["A Y", 1],
["B Y", 0],