Skip to content

Instantly share code, notes, and snippets.

View Lucent's full-sized avatar

Michael Dayah Lucent

View GitHub Profile
@Lucent
Lucent / thread_replies.py
Last active March 27, 2024 18:21
Convert Bluesky JSON export to plain text separated by day with replies, embeds, images, and facets to markdown
# Process account JSON export from https://observablehq.com/@aendra/bluesky-backup-tool
import json
import sys
def read_json(filename):
with open(filename, 'r') as file:
return json.load(file)
def transform_text_to_markdown(text, facets):
@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 / totp-paypal-ebay.html
Last active August 30, 2023 18:57
Use Google Authenticator/TOTP/2FA on PayPal and eBay. Obsolete now that they offer it.
<html ng-app="textInputExample">
<head>
<base href="/QRCodeInHTML/">
<link rel="stylesheet" href="bootstrap.min.css">
<style>p, span { font-size: x-large; }</style>
</head>
<body ng-controller="QRController" style="margin: 1em;">
<?php
$credential = shell_exec('vipaccess provision -t VSMT -p');
$credentials = explode("\n", $credential);
@Lucent
Lucent / lightroom-sync.md
Last active June 14, 2023 21:04
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 / mortgage.html
Created June 14, 2020 22:19
Section G mortgage calculator
<html>
<head>
<title>Section G Mortgage Calculator</title>
<style type="text/css">
TH { text-align: left; font-weight: normal; border: thin solid black; }
INPUT { text-align: right; }
</style>
<script type="text/javascript">
function cents(amount) {
@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 / wikifight.aspx
Created November 30, 2019 22:47
Compare the length of two Wikipedia articles
<%@ Page EnableViewState="false" EnableEventValidation="false" Language="VB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.OleDb" %>
<script language="VB" runat="server">
Sub Page_Load(Src as object, E as EventArgs)
End Sub
Sub btnRunQuery_OnClick(Sender As Object, E As EventArgs)
Dim objConnection As OleDbConnection
@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 / generate_passwords.php
Created December 9, 2018 08:03
Removing ambiguous characters is the same as never including them
<?php
$LENGTH = 4;
$SAMPLES = 100000;
$all = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
$ambig = ["l","1","I","o","O","0"];
$unambig = str_replace($ambig, "", $all);
function generate_passwords($remove, $set, $length, $samples) {
global $ambig;
$numbers_yes = 0;
Verifying my identity on Peepeth.com 0x4e6dddefc6047242128697caf28bdfec6c845337