This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| # Surveys Flickr references across post sources (_posts/*.md) to size the | |
| # de-Flickr'ing effort: which posts embed/link Flickr photos, how many, whether | |
| # they're chesterbr's own, whether there's an album/set link, and which URLs are | |
| # dead. Reads source Markdown (not _site) so results map to the files to edit. | |
| # Read-only: prints a decision table and writes tmp/flickr_audit.csv; fixes nothing. | |
| # | |
| # Usage: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # frozen_string_literal: true | |
| # De-Flickr inline images: re-host every hotlinked staticflickr <img> in the | |
| # posts from the local Apple Photos library into /img/YYYY/MM/, and rewrite the | |
| # posts to serve the local copy (click opens the full-size file, lazy-loaded). | |
| # Posts that already serve photos from /wp-content/ are untouched; album/set | |
| # links and dead photo-page links are out of scope (handled separately). | |
| # | |
| # TWO phases so nothing is written until you have reviewed the matches: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CHANGED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 | |
| # <lirc@bartelmus.de> | |
| # | |
| # 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+ | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 | |
| # <lirc@bartelmus.de> | |
| # | |
| # 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+ | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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 |
NewerOlder