Skip to content

Instantly share code, notes, and snippets.

View ablakely's full-sized avatar
:atom:
Working from home

Aaron Blakely ablakely

:atom:
Working from home
View GitHub Profile
@ablakely
ablakely / advmap2mapbin.pl
Created June 16, 2023 02:08
Script for converting Advance Map .map files to map.bin for use with decompiled Pokemon games
#!/usr/bin/perl
# conv2mapbin.pl - Convert Advance Map exports to map.bin for use
# with decompiled Pokemon games.
#
# Written by Aaron Blakely <aaron@ephasic.org>
use strict;
use warnings;
@ablakely
ablakely / irssifetch.pl
Created August 25, 2022 00:57
Irssi neofetch script
#!/usr/bin/perl -w
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => "Aaron Blakely",
contact => 'aaron@ephasic.org',
name => 'neofetch for irssi',
@ablakely
ablakely / snak-sysinfo.pl
Created July 8, 2022 08:05
perl system info script for Snak IRC client
#!/usr/bin/perl -w
use strict;
use warnings;
sub osascript {
my @tmp = map {("-e '", $_, "'")} split(/\n/, $_[0]);
my $prog = "@tmp";
return `osascript $prog`;
@ablakely
ablakely / patch
Created July 8, 2022 06:17
neofetch patch for OS X 10.4 and 10.5
--- a/neofetch
+++ b/neofetch
@@ -1230,7 +1230,14 @@
if [[ $(kextstat | grep -F -e "FakeSMC" -e "VirtualSMC") != "" ]]; then
model="Hackintosh (SMBIOS: $(sysctl -n hw.model))"
else
- model=$(sysctl -n hw.model)
+ if [[ $osx_version =~ "10.4" || $osx_version =~ "10.5" ]]; then
+ model="$(system_profiler SPHardwareDataType | grep Machine\ Name\:)"
+ model=${model/Machine\ Name\:/}
@ablakely
ablakely / hexfetch.pl
Last active June 22, 2022 00:29
Neofetch wrapper for hexchat
# Hexfetch - Hexchat Neofetch script
#
# Written by Aaron Blakely <aaron@ephasic.org>
# Date: 6/22/22
use warnings;
HexChat::register("Hexfetch", "0.0.1", "Neofetch parser for neofetch sysinfo", "Neofetch parser for neofetch sysinfo");
HexChat::hook_command("neofetch", "do_neofetch");
@ablakely
ablakely / camctrl.pl
Last active April 16, 2020 20:57
AXIS 214 CGI Control Script for motion
#!/usr/bin/perl -w
# camctrl.pl: AXIS 214 CGI Control Script
#
# USAGE: For use with motion-project.github.io generic tracking function
# If it tracks something like trees,
# the solution I found is to set the limits for ptz in the camera settings
#
# Copyright 2020 (C) Ephasic Software
# Written by Aaron Blakely <aaron@ephasic.org>
@ablakely
ablakely / conv.js
Last active April 9, 2020 03:58
Automatically converts .mkv files to .mp4
#!/usr/bin/env node
/*
* conv.js: Watches dir and automatically converts .mkv files to .mp4
* Presets:
* - wait 3 mins after file creation to start ffmpeg conversion
* - wait 15 mins after ffmpeg conversion to delete the .mkv file
*
* NOTE:
* I wrote this script for use with http://motion-project.github.io,
@ablakely
ablakely / fahstat.pl
Created April 7, 2020 04:34
Folding@Home Single User Statistics Script
#!/usr/bin/perl -w
# fahstat.pl: Folding@Home Single User Statistic Script
#
# Usage: ./fahstat.pl <user name>
# Written by Aaron Blakely <aaron@ephasic.org>
use strict;
use warnings;
@ablakely
ablakely / elementaryos-changebg.pl
Last active February 13, 2022 19:52
Wallpaper Rotation Script for Elementary OS
#!/usr/bin/perl -w
# changebg.pl: Wallpaper rotation script for ElementaryOS
#
# Tested on
# ElementaryOS v5.1.2
#
# Written by Aaron Blakely <aaron@ephasic.org>
# Copyright 2020 (C) Ephasic Software
@ablakely
ablakely / ballon.bat
Last active June 18, 2022 07:23
perl scp screengrab script
@echo off
if "%~1"=="" call :printhelp & exit /b 1
setlocal
if "%~2"=="" (set Icon=Information) else (set Icon=%2)
powershell -Command "[void] [System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms'); $objNotifyIcon=New-Object System.Windows.Forms.NotifyIcon; $objNotifyIcon.BalloonTipText='%~1'; $objNotifyIcon.Icon=[system.drawing.systemicons]::%Icon%; $objNotifyIcon.BalloonTipTitle='%~3'; $objNotifyIcon.BalloonTipIcon='None'; $objNotifyIcon.Visible=$True; $objNotifyIcon.ShowBalloonTip(5000);"
endlocal
goto :eof