Skip to content

Instantly share code, notes, and snippets.

View chesterbr's full-sized avatar
👾

Carlos Duarte Do Nascimento (Chester) chesterbr

👾
View GitHub Profile
@chesterbr
chesterbr / import_disqus.mjs
Created February 14, 2024 00:55
A script that imports Disqus posts into a format usable by Staticman
// import_disqus.mjs
// =================
//
// Converts Disqus XML export to a format compatible with Staticman (https://staticman.net/)
//
// Requires Node.js and the following packages:
//
// npm install xml2js crypto-js strip-indent
//
// (c) 2024 Carlos Duarte Do Nascimento (https://chester.me)
@chesterbr
chesterbr / compress_words.rb
Created February 1, 2022 05:58
First attempt to fit the Wordle word list in an Atari VCS non-bankswitched ROM
#!/bin/ruby
# I'm trying to figure out whether we could fit the Wordle dictionary in a 4K ROM with enough space
# to squeeze an non-bankswitched Atari 2600 game port.
#
# As a first study, this Ruby script compresses a list of word in a way that a simple CPU (6507)
# could decompress on-the-fly, even after some Huffman coding is applied. Not worried with the
# Huffman coding itself; just checking https://resources.nerdfirst.net/huffman.html; previous art of
# Huffman decompression (if we use it) - can be found at http://forum.6502.org/viewtopic.php?t=4642.
#
@chesterbr
chesterbr / dump.txt
Created June 26, 2021 03:19
Formatted dump of breadboard Atari VCS CPU + cart + TIA running Hello World
00 00 00 F0 F0 F0
A9 A9 02 A9 02 02
85 85 85 00 00 00
40 02 02
85 85 85 02 02 02
42 02 02
85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
85 85 85 02 02 02
42 02 02
85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85 85
@chesterbr
chesterbr / test.txt
Last active March 11, 2021 23:39
test
CHANGED
@chesterbr
chesterbr / washing_machine_alarm.ino
Created December 23, 2017 02:42
Washing Machine Alarm with Arduino and ADXL-345 acceleration sensor
// washing_machine_alarm.ino
//
// Copyright by Carlos Duarte Do Nascimento, 2017
// Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
// More info: https://chester.me/archives/2017/12/motion-sensing-arduino-based-washing-machine-alarm/
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345_U.h>
#include <LowPower.h>
@chesterbr
chesterbr / Insignia_RMC-SB314.lircd.conf
Created December 12, 2017 23:47
Insignia RMB-SB314 remote control codes for LIRC (for Insignia NS-SB314 Sound Bar System)
# Please take the time to finish this file as described in
# https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <[email protected]>
#
# This config file was automatically generated
# using lirc-0.9.4c(default) on Thu Dec 7 01:07:17 2017
# Command line used: --disable-namespace -f -d /dev/lirc0 /home/chester/lircd.conf
# Kernel version (uname -r): 4.9.59+
#
@chesterbr
chesterbr / Sharp_LCDTV-845-039-40B0.lircd.conf
Created December 12, 2017 23:45
Sharp LCDTV 845-039-40B0 TV Remote Control codes for LIRC (for Sharp LC-40LE431U TV)
# Please take the time to finish this file as described in
# https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <[email protected]>
#
# This config file was automatically generated
# using lirc-0.9.4c(default) on Thu Dec 7 01:17:39 2017
# Command line used: --disable-namespace -d /dev/lirc0 /home/chester/lircd.conf
# Kernel version (uname -r): 4.9.59+
#
@chesterbr
chesterbr / 6507_clock_and_monitor.c
Last active September 9, 2017 16:16
10Hz clock pulse generator / 13-bit monitor (for 6507 CPU)
// Turns an Arduino into a 10Hz clock generator and a monitor for a 13-bit address bus
//
// Based on David Barton's clock generator/monitor in http://www.plingboot.com/2015/10/homebrew-6502-part-2/
// (MIT License; full license information on footer)
// Pulse pin 13
#define CLOCK 13
// Read pins 0-12 as a 13 bit value from 6507's address bus
#define ADDRA 0
#define ADDRB 1
@chesterbr
chesterbr / brasileiros_toronto.md
Last active October 28, 2019 16:51
Sugestões para Brasileiros visitando Toronto

Sempre que alguém visita Toronto (em particular vindo do Brasil) a gente fica em dúvida sobre onde levar/recomendar.

O @djlebersilvestre compartilhou comigo uma lista de sugestões. Eu fiz alguns adendos e publiquei aqui. Sugestões são bem-vindas!

Locais / passeios

  • CN Tower (A visita vale a pena. O restaurante é um pouco caro - pelo preço tem opções melhores, mas é giratório)
  • Ripley's Aquarium
  • Real Sports Bar
  • Distillery District (falam que o restaurante Clooney é muito bom)
@chesterbr
chesterbr / original-WNDR3700v3.txt
Created March 19, 2017 01:14
Boot messages from the original firmware on my Netgear WNDR3700v3 router
Decompressing..........done
Decompressing..........done
CFE for WNDR3700v3 version: v1.0.6
Build Date: Wed May 18 17:25:10 CST 2011
Init Arena
Init Devs.
Boot partition size = 262144(0x40000)
Found an ST compatible serial flash with 128 64KB blocks; total size 8MB