Skip to content

Instantly share code, notes, and snippets.

View Lucent's full-sized avatar

Michael Dayah Lucent

View GitHub Profile
@Lucent
Lucent / declutter_logic.js
Last active August 21, 2018 01:23
Create lists of nonoverlapping plane datablocks
function move_overlaps_higher(overlaps) {
cycle_list[0] = overlaps;
var another_row_needed = true;
for (var cyclerow = 0; another_row_needed; cyclerow++) {
another_row_needed = false;
var this_row = cycle_list[cyclerow];
for (var ident = 0; ident < this_row.length; ident++) {
for (var x = ident - 1; x >= 0; x--) {
if (x < 0) continue;

Keybase proof

I hereby claim:

  • I am Lucent on github.
  • I am lucent (https://keybase.io/lucent) on keybase.
  • I have a public key whose fingerprint is FC33 D4B4 99CE 895A 6636 2933 94B8 A437 120E 3C76

To claim this, I am signing this object:

@Lucent
Lucent / watchhistory.sh
Last active April 3, 2024 22:48
View Plex watch history by user on Synology
#!/bin/bash
db_loc="/volume1/Plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db"
names=$(sqlite3 "$db_loc" "SELECT name from accounts;")
counter=0
while read -r name; do
let counter++
echo "$counter : $name"
nameArray[counter]=$name
done <<< "$names"
read index
04dda9359cbbe5371631773b15ce7fb757293bf2c95002ab72733438b7d511148b64cca7979276450f4d834fff9743723a52339fa859229d339b128662cd58f514
@Lucent
Lucent / rip-dvd-chapters.bat
Created July 31, 2018 03:58
Rip DVD into chapter/title files using VideoLAN
set DVDDrive=E:
set DestPrefix="Whatever"
set Title=2
set FirstChapter=1
set LastChapter=20
for /L %%i in (%FirstChapter%,1,%LastChapter%) do "vlc.exe" --sout "#standard{access=file,mux=ts,dst=%DestPrefix%_c%%i.mpg}" dvdsimple:///%DVDDrive%/#%Title%:%%i-%Title%:%%i vlc://quit
Verifying my Blockstack ID is secured with the address 1GcuXgjPPyChs53Ka2kj2upAgRgpBdzcGY https://explorer.blockstack.org/address/1GcuXgjPPyChs53Ka2kj2upAgRgpBdzcGY
@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
@Lucent
Lucent / logprism.pl
Created August 18, 2018 17:12
Custom logprism for Ptable
#!/usr/bin/perl -w
#=============================================================================
#
# Copyright (C) 2005 - 2007, Matti Tukiainen, http://ktmatu.com/mt/
#
# Program name : LogPrism (logprism.pl)
# Version : 2.03
# Purpose : LogPrism turns Apache access log files (combined) into
# easy to read color highlighted format where user
# sessions, error status codes, external referrers and
@Lucent
Lucent / cd_interest.php
Last active August 21, 2018 01:06
Calculate CD interest over term
<?
setlocale(LC_MONETARY, "en_US");
$cd_list = array(
array("Principal" => 250000, "Interest" => 5.05, "Start" => "27 Apr 2007", "Term" => "6 months", "Interest Term" => "6 months"),
array("Principal" => 250000, "Interest" => 5.10, "Start" => "27 Apr 2007", "Term" => "9 months", "Interest Term" => "9 months"),
array("Principal" => 250000, "Interest" => 5.20, "Start" => "27 Apr 2007", "Term" => "12 months", "Interest Term" => "6 months"),
array("Principal" => 250000, "Interest" => 5.00, "Start" => "27 Apr 2007", "Term" => "90 days", "Interest Term" => "90 days")
);
$total = 0;
@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 ();