Skip to content

Instantly share code, notes, and snippets.

View cbrwn's full-sized avatar

Cameron Brown cbrwn

View GitHub Profile
@cbrwn
cbrwn / wordle-bot.js
Last active January 1, 2022 12:32
wordle bot
// quick and dirty bot for wordle (https://www.powerlanguage.co.uk/wordle/)
// it filters out any invalid words from the clues given, enters a random valid word, and continues until finished
// only tested on firefox
// how to use:
// copy this and paste it into your browser's console (F12/option+cmd+I)
// after ~2 seconds it'll start guessing and spitting out info to the console
// many optimisations could be made
// e.g.: guessing words with mutliple of the same letter usually gives you less information, so only doing so when necessary would be better
; line of basic to call my program
; 10 SYS (2304)
*=$0801
BYTE $0E, $08, $0A, $00, $9E, $20, $28, $32
BYTE $33, $30, $34, $29, $00, $00, $00
; start my program at $0900
; BASIC programs memory starts at $0800,
; so I'll use that for my variables and stuff
/*
DArray - Dynamic Array
Simple replacement for std::vector
*/
#pragma once
template <class T>
class DArray
{
public:
@cbrwn
cbrwn / screenshot.py
Last active February 25, 2017 12:42
this sucks real bad
#!/bin/python
import ftplib
import os
import random
import string
import subprocess
import time
# stuff to change
ftp_host = "examples.com"

Keybase proof

I hereby claim:

  • I am cbrwn on github.
  • I am quentin (https://keybase.io/quentin) on keybase.
  • I have a public key ASAcPjuDOoO5xxGDZkbe2svA8yNWnrJ4-TKqFVR5kcjl4Ao

To claim this, I am signing this object:

@cbrwn
cbrwn / GreenEggs.b
Last active June 14, 2022 09:03
Green Eggs and Ham in Brainfuck
--[----->+<]>-----<[-]>>[-]<<-[--->>>++++++++++[<++++>-]<<<]>>-------<<[-]
>>>>[-]<<<<+++[>>>>+++++++++++<<<<-]++[>>++++<<-]>>.>>-.<<<.<++[>++++++<-]
>.>>.>.<<<<++[>>+++++<<-]>>.<<++[>------<-]>.<++[>++++++<-]>.<++++++++++..
[-]++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<+++[>++++<-]>.>>.>.<<<<++[>>++++
+<<-]>>.<<++[>------<-]>.<++[>++++++<-]>.<++++++++++.[-]>>.<<+++[>----<-]>
.<+++[>++++<-]>.>>>.<<<<++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<++[>++++++<
-]>.<++++++++++..[-]++[>>+++++<<-]>>+.<-----.<++[>---<-]>-.<+++[>++++++<-]
>+.>>>.<<-.<<++++[>-----<-]>+.<+++[>++++<-]>.<+++[>>>>++++<<<<-]>>>>+.<<<<
++[>>-----<<-]>>.>>.<<<<+++[>----<-]>.<+++[>++++<-]>.<+++[>>>>----<<<<-]>>
>>.<<<<++++++++++.[-]++[>>+++++<<-]>>+.<-----.<++[>---<-]>-.<+++[>++++++<-