Skip to content

Instantly share code, notes, and snippets.

View MaverickEsq's full-sized avatar
🔦
lasers?

sloth MaverickEsq

🔦
lasers?
View GitHub Profile
@MaverickEsq
MaverickEsq / foo_jscript_panel3_tracklogger.js
Created September 17, 2023 17:45
Track log to textfile for foo_jscript_panel3
var myhistory = fb.ProfilePath + "np.txt";
var maxfilesize = 5242880; //5MB in bytes
if (utils.IsFile(myhistory) == false) {
utils.WriteTextFile(myhistory, "");
}
function save_history() {
var fsize = utils.GetFileSize(myhistory);
if (fsize < maxfilesize) {
@MaverickEsq
MaverickEsq / gallery.php
Created September 17, 2023 17:35 — forked from neamtua/gallery.php
Image gallery generator
@MaverickEsq
MaverickEsq / rotated_display.h
Created April 10, 2022 11:38
function to print upside down on a 7 segment display
// Function to display rotated characters
// on a 7 segment display to go with TM1637Display
//
// Usage:
// dispArr(int[0,4]);
//
// eg:
// dispArr(104);
@MaverickEsq
MaverickEsq / rotator.pl
Created April 10, 2022 11:31
rotates character map for a 7 segment display
#!/usr/bin/perl
# rotates a character map for an 8 segment display so
# that you can generate a character map for an
# upside down display.
#
# Used to make a header, kept in case I need to rotate something else?
#my @map = (0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f, 0x77, 0x7f, 0x7C, 0x39, 0x58, 0x3f, 0x5E, 0x79, 0x71, 0x7d, 0x76, 0x74, 0x06, 0x1f, 0x76, 0x38, 0x06, 0x54, 0x3f, 0x5c, 0x73, 0x50, 0x6d, 0x3e, 0x3e, 0x66, 0x5b, 0x40, 0x08, 0x00);
my %map = (
@MaverickEsq
MaverickEsq / tempalup.html
Last active January 22, 2020 16:06
Browser uploader for tempal style curl pastebins
<html>
<head>
<title>tempal up</title>
<script>
// Set this to the destination host
var host = '//paste.bin';
// Set this to the destination host name
// ie "tempal" for temp.al
var name = 'tempal';
</script>
@MaverickEsq
MaverickEsq / error_page.php
Last active April 6, 2022 23:46
Windows NT BSOD 404 / generic error page
<?php
$error = $_SERVER['REDIRECT_STATUS'];
$page = $_SERVER['REDIRECT_URL'];
$email = 'Your email here';
/* Alias for apache httpd conf
Alias "/error" "/var/www/html/error_page.php"
*/