Skip to content

Instantly share code, notes, and snippets.

Avatar

Nathaniel Budijono nathanielbd

View GitHub Profile
@nathanielbd
nathanielbd / squirdle.js
Created Mar 5, 2022
Script to cheat in Squirdle
View squirdle.js
// input into the console
document.getElementById("guess").value = getCookie("secret_poke", document.cookie)
document.getElementsByClassName("guess_input")[1].click()
@nathanielbd
nathanielbd / wordle.js
Last active Feb 11, 2022
Fail at Wordle by guessing words that give you all grey letters!
View wordle.js
// CTRL-SHIFT-i
// Copy-paste this code into the console and enter
// Use the outputted words as your guesses
let solution = JSON.parse(localStorage.getItem("nyt-wordle-state")).solution;
let wordlist = ["cigar", "rebut", "sissy", "humph", "awake", "blush", "focal", "evade", "naval", "serve", "heath", "dwarf", "model", "karma", "stink", "grade", "quiet", "bench", "abate", "feign", "major", "death", "fresh", "crust", "stool", "colon", "abase", "marry", "react", "batty", "pride", "floss", "helix", "croak", "staff", "paper", "unfed", "whelp", "trawl", "outdo", "adobe", "crazy", "sower", "repay", "digit", "crate", "cluck", "spike", "mimic", "pound", "maxim", "linen", "unmet", "flesh", "booby", "forth", "first", "stand", "belly", "ivory", "seedy", "print", "yearn", "drain", "bribe", "stout", "panel", "crass", "flume", "offal", "agree", "error", "swirl", "argue", "bleed", "delta", "flick", "totem", "wooer", "front", "shrub", "parry", "biome", "lapel", "start", "greet", "goner", "golem", "lusty", "loopy", "round",
@nathanielbd
nathanielbd / bowditch.py
Created Oct 30, 2021
Manim animations to build intuition for Bowditch-Lissajous curves
View bowditch.py
from manim import *
class BowditchParametric(Scene):
def construct(self):
x_circle = Circle(radius=1.5).move_to(2*UP)
y_circle = Circle(radius=1).move_to(4*LEFT+2*DOWN)
x_dot = Dot(x_circle.point_from_proportion((2*PI-PI/9)/(2*PI)), radius=0.08, color=YELLOW)
y_dot = Dot(y_circle.point_from_proportion(0), radius=0.08, color=YELLOW)
self.t_offset = 0
rate = 0.25
View machine_problem_3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nathanielbd
nathanielbd / perceptron.py
Created Jan 8, 2021
Animate the perceptron algorithm with Manim
View perceptron.py
#!/usr/bin/env python
# See the result: https://nathanielbd.github.io/Perceptron.mp4
from manimlib.imports import *
class Perceptron(GraphScene):
CONFIG = {
"x_min": -1.5,
"x_max": 1.5,
@nathanielbd
nathanielbd / slowsort.py
Created Dec 30, 2020
A reluctant sorting algorithm
View slowsort.py
# https://www.mipmip.org/tidbits/pasa.pdf
# Pessimal Algorithmsand Simplexity Analysis. Broder, Stolfi
def helper(A, i, j):
# in-place sort the subarray A[i],...,A[j] using multiply-and-surrender
if i >= j:
return
m = (i+j)//2
helper(A, i, m)
helper(A, m+1, j)
if A[m] > A[j]:
View keybase.md

Keybase proof

I hereby claim:

  • I am nathanielbd on github.
  • I am nathanielbd (https://keybase.io/nathanielbd) on keybase.
  • I have a public key ASAZendYsSbxeurhss5-TTdu3jVNG2YmaX0LMaIubYZAbAo

To claim this, I am signing this object:

@nathanielbd
nathanielbd / protobowl.js
Created Jul 29, 2020
Scripts for trolling on protobowl.com
View protobowl.js
// Escalate to ninja privileges
// pressing 'f' and 'd' will answer a question correctly
go.id = "_";
// reveal the answer every two seconds
// found in the obfuscated client app code
setInterval(tt, 2000);
// display the answer in the console
// found under window global variables
@nathanielbd
nathanielbd / morsecode.js
Last active Jul 9, 2020
Script for typing on morsecode.me
View morsecode.js
// CTRL-SHIFT-i, copy and paste into the console, hit `ENTER`:
// You can now focus on the screen and type
// ---BEGIN---
var table = Object.fromEntries(Object.entries(Translator.alphabet()).map(([k, v]) => ([v, k])))
var button = document.getElementById("key");
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
async function dit() {
$(button).trigger("mousedown");
@nathanielbd
nathanielbd / skribbl.js
Last active Jun 13, 2020
Scripts for trolling on skribbl.io
View skribbl.js
// guess from a database of words by matching regex
// CTRL-SHIFT-i, copy-paste into console, press `ENTER`:
// ---BEGIN---
var guesser = null;
function cheat() {
var url = "https://skribbliohints.github.io/words.json";
var guesses = [];
var i = 0;
fetch(url)
.then(res => res.json())