Skip to content

Instantly share code, notes, and snippets.

View jbarrett's full-sized avatar
🤘
Be excellent to each other

John Barrett jbarrett

🤘
Be excellent to each other
View GitHub Profile
@jbarrett
jbarrett / ntfs_safe.pl
Created December 18, 2018 11:00
Very quick and dirty NTFS file renamer since ntfs-3g will happily write "invalid" filenames.
#!/usr/bin/env perl
use strict;
use warnings;
use File::Copy qw/ mv /;
use File::Find ();
my $dir = $ARGV[0] || '.';
use vars qw/*name *dir *prune/;
@jbarrett
jbarrett / reclaimWindows10.ps1
Created August 30, 2017 13:03 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different …
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <[email protected]>
# Modified by: alirobe <[email protected]> based on my personal preferences.
# Version: 2.6.1, 2017-08-02
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, 'smart' features, and 3rd party bloat ...
@jbarrett
jbarrett / adflabel.pl
Last active August 31, 2016 19:09
Dump Amiga Disk Format (ADF) disk label (-ish, sometimes).
#!/usr/bin/env perl
use strict;
use warnings;
use bytes;
use Carp;
my $filename = $ARGV[0] or croak "usage: $0 <ADF filename>";
-f $filename or croak "File does not exist: $filename";
@jbarrett
jbarrett / sc3000_widescreen.pl
Last active July 16, 2016 17:21
SimCity 3000 Widescreen hack - run from same dir as SC3.EXE / SC3U.EXE
#!/usr/bin/env perl
use strict;
use warnings;
use bytes;
use Carp;
use File::Copy qw/ cp /;
# See: http://www.wsgf.org/dr/simcity-3000/en
@jbarrett
jbarrett / echo_headers.pl
Created January 20, 2016 13:29
What were my request headers?
# plackup echo_headers.pl
use strict;
use warnings;
use Plack::Request;
use JSON;
my $app = sub {
my $req = Plack::Request->new(shift);
@jbarrett
jbarrett / RootURIFor.pm
Created April 14, 2015 17:48
Dancer2::Plugin::RootURIFor prototype
package Dancer2::Plugin::RootURIFor;
use strict;
use warnings;
my $VERSION = 0;
use URI::Escape;
use Dancer2::Plugin;
@jbarrett
jbarrett / todo.html
Last active August 29, 2015 14:05
The cheapest firefox todo list ever - add to bookmarks, set to load in sidebar
<meta http-equiv="refresh" content="10" />
<html>
<frameset cols="*">
<frame id="todo" src="todo.txt">
</frameset>
</html>
@jbarrett
jbarrett / repl.rc
Created January 25, 2014 03:29
Devel::REPL config / plugins, goes in ~/.re.pl/repl.rc
use warnings;
load_plugin qw(
Colors
Interrupt
Completion
CompletionDriver::INC
CompletionDriver::LexEnv
CompletionDriver::Keywords
CompletionDriver::Methods
@jbarrett
jbarrett / author-versions.t
Created November 27, 2013 18:07
Check Module, Dist::Zilla's dist.ini, POD and Changelog version number consistency. Probably better to let Dist::Zilla do versioning and changelog generation, but there you go.
BEGIN {
unless ($ENV{AUTHOR_TESTING}) {
require Test::More;
Test::More::plan(skip_all => 'these tests are for testing by the author');
}
}
use strict;
use warnings;
@jbarrett
jbarrett / Makefile
Last active December 22, 2015 11:08
Cheap and cheerful Megadrive Gamepad -> PC via Arduino.
sendkeys: sendkeys.cpp
g++ -o sendkeys sendkeys.cpp -L/usr/lib64/ -lX11
all: sendkeys