Skip to content

Instantly share code, notes, and snippets.

View Lucent's full-sized avatar

Michael Dayah Lucent

View GitHub Profile
@Lucent
Lucent / substack_draft_timeline.js
Last active October 31, 2025 15:37
Fetches Substack draft save times bins them into configurable N-minute chunks, and prints one ASCII line per day showing active vs idle periods
// Substack versions → per-day ASCII timeline + window-independent total.
// Paste into console on a /publish/post/{id} page.
(async () => {
const CHUNK_MINUTES = 5; // bucket size for both display and totals
const START_HOUR = 8; // display window start (local)
const END_HOUR = 2; // display window end (next day, local)
const ACTIVE_CHAR = "━"; // writing
const INACTIVE_CHAR = "·"; // idle
const FOLLOW_PREVIOUS = true; // walk previousBucket chain

openpgp4fpr:3057B3A23A272B93408E34C4ADFE984091983F93

@Lucent
Lucent / routing.md
Last active August 30, 2023 22:05
Fantasy of Trees Teardown Routing

As early as possible

  • Obtain a list of all possible items that can be sold and their creators from Teresa Booth.

Throughout the show

  1. As items are sold, mark them off on master list as either pick-up or delivery.
  2. Enter each delivery item into Microsoft Streets & Trips and rename the pushpin as the code with no leading zeros (A-9 vs A-009). Include pick-up items if purchased with deliverable trees (A-9, TT-5, D-15).
  3. Change pushpins to icons for numbers 1-10 for cardinal directions.

At teardown

  1. Saturday A.M. walk the showroom floor and find every item not marked as sold for delivery or pickup.
@Lucent
Lucent / lightroom-sync.md
Last active January 14, 2025 16:18
Lightroom CC/Cloud and Lightroom Classic synchronization

How to use Classic and keep a cloud backup of full-size originals and videos

I have no interest in organizing using CC's Collections and prefer to use folder hierarchy from Classic.

  • Keep Import folder separate to catch problems! Preferences, Lightroom Sync, Location, Specify location for Lightroom's Synced images
  • Set Catalog Settings > Metadata > Automatically write changes into XMP so removing from Classic to add back some data is recovered
  • Video edits don't propagate, but if added to CC first, they can be moved among synced Collections

https://community.adobe.com/t5/lightroom-classic-discussions/persistent-sync-issues-in-lightroom-classic-with-dng-and-tif/m-p/13163319

@Lucent
Lucent / wake-up.bas
Created November 30, 2019 22:49
Use modem for wake-up call
CLS
WakeupTime$ = "11:02:00"
OPEN "COM1:9600,N,8,1,BIN" FOR OUTPUT AS #1 ' Open the COM port
LOCATE 10, 10, 0: PRINT "Current Time: ";
LOCATE 11, 10, 0: PRINT " Wakeup Time: "; WakeupTime$;
DO
LOCATE 10, 24, 0: PRINT TIME$;
@Lucent
Lucent / debian-8-jessie-efi-nvme.sh
Created November 29, 2019 23:26
Install Debian 8 Jessie on NVMe disk in UEFI mode
# Must use DVD or netinst images. CD image does not boot into UEFI mode.
# Disable CSM in BIOS.
# Clear secure boot keys.
# Expert install
# Alt+F2 to open shell
cd /target
mount --rbind /proc proc/
mount --rbind /sys sys/
mount --rbind /dev dev/
@Lucent
Lucent / bash_utilities.sh
Last active July 5, 2023 00:35
Useful bash one-liners
# Remove all empty folders
find . -maxdepth 1 -type d -empty -print0 > empty.txt; xargs -0 rmdir < empty.txt
# Remove empty folders 2 levels deep, and their parent
find . -maxdepth 2 -type d -empty > empty.txt; rmdir $(<empty.txt)
find . -maxdepth 1 -type d -empty > empty.txt; rmdir $(<empty.txt)
# Move all folders with certain name into their own named folder
find -maxdepth 2 -name 'lavajava' -printf '%h\n' > lavajava.txt; mkdir lavajava; mv $(<lavajava.txt) lavajava/
@Lucent
Lucent / journal_search.php
Created August 19, 2018 04:11
Search and cleanup LiveJournal entries
<?php
if ($_GET["password"] != "password") { ?>
<p>Private search feature. Intrusion logged.</p>
<?php
return; }
set_time_limit(300);
$journal_dir = "C:\documents and settings\michael dayah\my documents\lj backup";
$username = "lucent";
$entry_array = array ();
@Lucent
Lucent / spotify_library.txt
Last active January 12, 2024 17:16
Spotify library sorted by artist
https://open.spotify.com/local///Here%20Comes%20The%20Boom%20-%20Nelly/235
https://open.spotify.com/local///The%20Living%20Tombstone%20Gypsy%20Bard%20%5Bremix%5D/196
https://open.spotify.com/track/19X5dUlxVWC5jDg3eOysMz
https://open.spotify.com/track/316r1KLN0bcmpr7TZcMCXT
https://open.spotify.com/track/0ibdklhZmwLo3bzHqF435c
https://open.spotify.com/track/7pSJmBTlbA4S5zSLsj6Pzz
https://open.spotify.com/track/5q10Ov2JEbODDK2tk4NYWW
https://open.spotify.com/track/6rEr7AsF3cmfUR3birakRF
https://open.spotify.com/track/6Fe3Flc9SjE03pqwD6PVQl
https://open.spotify.com/track/0HDaKOlVAfUWXdFR2RhBtN
Verifying my Blockstack ID is secured with the address 1GcuXgjPPyChs53Ka2kj2upAgRgpBdzcGY https://explorer.blockstack.org/address/1GcuXgjPPyChs53Ka2kj2upAgRgpBdzcGY