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 / 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
@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 / 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 / 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 / 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 / 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 / post-receive.sh
Created November 14, 2012 11:06
First pass at Git (+ Gitweb) integration with FogBugz. Notes in comments.
#!/bin/bash
# Git hook to link a commit's BugzID in Fogbugz.
#
# Instead of a filename, script populates URL with repository name.
# This saves us needing to configure a repository per-project in Fogbugz.
# Description, first word in file should be repository-name.git
DESC=description
@jbarrett
jbarrett / bitrate_report.pl
Created November 13, 2012 19:32
Quick and dirty script to report on audio files encoded at less than a given bitrate
#!/usr/bin/env perl
use strict;
use warnings;
use v5.10.1;
use Image::ExifTool qw/:Public/;
use Getopt::Long;
use File::Which qw/which/;
@jbarrett
jbarrett / shizzle.pl
Last active July 21, 2017 18:35
Shizzle text script for irssi. Was going to be a bot (bizzle) output mode, but had trouble getting other scripts to emit the right signals
# vim: filetype=perl
use strict;
use warnings;
use Irssi;
use WWW::Mechanize;
=encoding utf8
@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 <disassembler@dasm.cz>
# Modified by: alirobe <alirobe@alirobe.com> 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 ...