Skip to content

Instantly share code, notes, and snippets.

@Lucent
Lucent / mortgage.html
Created June 14, 2020 22:19
Section G mortgage calculator
View mortgage.html
<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 / organization.md
Last active April 12, 2020 21:16
Digital Organization
@Lucent
Lucent / organization.puml
Last active April 12, 2020 21:14
Digital Organization UML
View organization.puml
@startuml
skinparam componentStyle uml2
title Dayah
cloud VUDU
cloud MoviesAnywhere
cloud OneDrive {
@Lucent
Lucent / wake-up.bas
Created November 30, 2019 22:49
Use modem for wake-up call
View wake-up.bas
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
View wikifight.aspx
<%@ 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
View debian-8-jessie-efi-nvme.sh
# 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 / .block
Last active April 3, 2019 15:33 — forked from alisd23/.block
D3v5 Dependencies Graph
View .block
height: 750
@Lucent
Lucent / generate_passwords.php
Created December 9, 2018 08:03
Removing ambiguous characters is the same as never including them
View generate_passwords.php
<?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;
View Verifying my Peepeth
Verifying my identity on Peepeth.com 0x4e6dddefc6047242128697caf28bdfec6c845337
@Lucent
Lucent / bash_utilities.sh
Last active November 30, 2019 22:08
Useful bash one-liners
View bash_utilities.sh
# Remove all empty folders
find . -maxdepth 1 -type d -empty > empty.txt; 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/