Skip to content

Instantly share code, notes, and snippets.

Joel Kirchartz JKirchartz

Block or report user

Report or block JKirchartz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
#! /bin/sh
# under aliases, add `rename = !~/path/to/git-rename/.sh`
# then to rename the current branch use `git rename <new branch name>`
old_branch=$(git rev-parse --abbrev-ref HEAD);
git branch -m $old_branch $new_branch # Rename branch locally
JKirchartz / QA-framework.bash
Created Feb 26, 2019
A simple "google forms"-style question and answer framework for BASH.
View QA-framework.bash
#! /bin/bash
# QA-framework.bash
# Copyright (C) 2019 jkirchartz <>
# Distributed under terms of the NPL (Necessary Public License) license.
# A simple "google forms"-style way to survey people via bash
# usage:
JKirchartz /
Created Dec 26, 2018
make your own fake shell in bash
function parser {
shopt -s nocasematch
case "$*" in
exit) exit 0;;
echo*) shift; echo $*;;
*) figlet $* | lolcat;;
View convert.js
let fs = require('fs');
fs.readFile('', function(err, data) {
if ( err ) {
data = JSON.parse(data.toString());
var output = { white: [], black: [] , subtext: [] , origin: ["{cut Toots Against Humanity}#black#", "{cut Toots Against Humanity}#black#\n\n#subtext#"]};
JKirchartz / jkirchartz_exe.js
Created Oct 14, 2018
Javascript to manipulate image in @jkirchartz_exe
View jkirchartz_exe.js
var text = document.getElementById('text');
text.setAttribute('textLength', Math.round(text.clientWidth / 1.1)); = Math.round(text.clientWidth / text.textContent.length) + 'px';
var img=document.getElementById('image');
var svg=document.getElementById('svg');
JKirchartz / Makefile
Last active Aug 22, 2018
A simple publishing platform for ~ clone this into a "drafts" or "src" directory in your home directory, write markdown files here, and run `make` to publish them to your tilde site.
View Makefile
SHELL = /bin/bash
sources := $(wildcard *.md)
objects := $(patsubst,%.html,$(subst $(source),$(output),$(sources)))
all: $(objects)
pandoc --template layout.html5 --standalone --smart --to html5 -o $@ $<
mv *.html ../public_html/
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
# Ely Golden, Jun 14 2018
def recaman(n):
seq = []
for i in range(n):
if(i == 0): x = 0
else: x = seq[i-1]-i
JKirchartz /
Created Jul 28, 2018
Convert hpi files into pngs -- based on Ed Halley's Method:
#! /bin/sh
# depends on ImageMagick 6.8.9-9
for name in *.hpi; do
echo $name
# split hpi into component jpg & png
./ $name
JKirchartz /
Created Apr 9, 2018
Enkiv2's Sketchify script
#!/usr/bin/env python
import sys, os
from PIL import Image, ImageOps, ImageChops, ImageFont, ImageDraw, ImageFilter
# Make an image more closely resemble a pen drawing, with optional shading and coloring
def sketchify(sourceImage, colorized=True, sketchOnly=False):
if sketchOnly:
return sketch
View The Pipe Transcript
When I was 18... 18 years old, I saw for the first time in my life... I saw an image of clarity. I saw a comic strip... a three panel comic strip that, though simple as it seemed, changed me... changed my being, changed who I am... Made me who I am...
Enlightened me...
The strip, Garfield, the comic strip was new... no more than maybe a month and a half since inception, since... since coming into existence... and there it was before me in print, I saw it... a comic strip... What was it called?
You can’t perform that action at this time.