Skip to content

Instantly share code, notes, and snippets.


Half-Gray jack126guy

View GitHub Profile
jack126guy /
Last active August 29, 2015 14:03
Forigi iksojn el X-sistema Esperanto (Remove X's from X-system Esperanto)
#Tiu-ĉi programo estas en la publikaĵo (This program is in the public domain)
#Legi tekston el norma enigo (Read text from standard input)
while(<STDIN>) {
#Anstataŭigi X-sistemajn vicojn (se ne estas alia X poste) [Replace X-system sequences (if there is not another X afterwards)]
jack126guy / pause
Last active May 28, 2020 21:22
Emulate the DOS/Windows PAUSE command on Unix-like systems
View pause
#You probably want to put this in /usr/local/bin
echo "Press Enter to continue... "
read REPLY
jack126guy / ccports.txt
Last active August 29, 2015 14:10
List of Creative Commons license ports, in a machine-readable format
View ccports.txt
;Creative Commons license ports
;Each jurisdiction is on a separate line. Data for each jurisdiction is presented in fields, separated by semicolons.
;The first field is the jurisdiction code (used in URLs and standard abbreviations), the second is the full name of the jurisdiction, and all subsequent fields are versions in which there was a port for that jurisdiction.
;If the first field is empty or contains only whitespace, then the line shall be considered a comment.
;Note that there were no unported 2.1 licenses.
;This list is derived from the Creative Commons Wiki <>, but it is believed that the data itself is uncopyrightable. This list is in the public domain <>.
jack126guy /
Last active August 29, 2015 14:11
Fix files created with Windows path names
#Instructions: On a Unix-like system, run: find [basedir] -type f | perl
#This script is in the public domain (
use strict;
use File::Path 'make_path';
use File::Copy 'copy';
my ($dn, $fn);
while(<STDIN>) {
($dn, $fn) = m/(.*)\\([^\\]*)/;
jack126guy /
Last active April 8, 2016 09:50
JackBot (Canternet)-specific files for PCommandBot
Main class for JackBot. Like the default main class, it requires a path to the configuration file to be provided on the command line.
Custom responders:
* tk.halfgray.pcommandbot.responders.XkcdResponder:
Available under the MIT License (below):
jack126guy /
Last active February 1, 2022 16:01
Remove trailing whitespace
#This does not read the file from standard input; rather, it processes a list of files, one per line, from standard input.
#This script is in the public domain (
use strict;
use feature 'unicode_strings';
use File::Copy 'move';
while(<STDIN>) {
print 'Processing ', $_, "\n";
jack126guy / freelist.c
Last active August 29, 2015 14:19
"Free list" example
View freelist.c
* This code in the public domain under Creative Commons CC0 1.0 Universal Public Domain Dedication:
typedef struct free_list_node {
void* memory;
size_t size;
struct free_list_node* next;
jack126guy / control
Created June 4, 2015 02:16
"linuxmasterrace" Debian package contents
View control
Package: linuxmasterrace
Version: 1.2
Section: misc
Priority: optional
Architecture: all
Depends: xdg-utils, www-browser
Installed-Size: 1
Maintainer: Jack126Guy <>
Description: Open /r/linuxmasterrace on Reddit
This package contains a simple script to open the
jack126guy / apt-get
Last active March 5, 2021 06:38
"apt-get-rekt" Debian package contents
View apt-get
if [ "$#" -lt 1 ]; then
#No action specified
$APT_GET_REAL #Print default help
echo 'Get rekt.'
jack126guy / pgp-key-info.txt
Created June 29, 2015 21:03
PGP key details
View pgp-key-info.txt
Key ID: 0xBD956688FF815C0D
Fingerprint: 37AC 8245 20FA 0243 CF0E 8309 BD95 6688 FF81 5C0D