Skip to content

Instantly share code, notes, and snippets.

View JKirchartz's full-sized avatar
🤖

Joel Kirchartz JKirchartz

🤖
View GitHub Profile
@JKirchartz
JKirchartz / demo.tex
Created September 11, 2020 14:10
A Latex class to emulate Kik-messenger UI - found here: https://tex.stackexchange.com/a/239511/139326
\documentclass{kik-android}
\setPartnerName{Dave Johnson}
\setPartnerPic{Man.jpg}
\setHours{12}
\setMinutes{11}
\begin{document}
\you{Knock knock}
\me{Who's there?}
@JKirchartz
JKirchartz / README.md
Last active February 8, 2021 21:22
TZ to Lat/Long Hack

TZ to LatLong

A simple BASH script to fetch and convert the [IANA tz database][1] into a list of IANA timezone names with a relative latitude/longitude exemplifying the timezone (according to [nodatime][2]) with the powers of [jq][3] and [curl][4]

I mean, it's basically this:

curl https://nodatime.org/TimeZones?format=json | jq '{ "data": [.Zones[] | {"names":[.Id, .Aliases[]], "location": { "lat": .Location.Latitude, "long": .Location.Longitude }}]}' > TZLatLong.json
@JKirchartz
JKirchartz / ALEerrors.md
Last active August 28, 2020 15:04
ALE plugin errors

Bash script enter

Error detected while processing function <SNR>105_NetrwBrowseChgDir[180]..BufWinEnter Autocommands for "*"..function ale#events#LintOnEnter[5]..ale#Queue[33]..<SNR>88_Lint[26]..ale#engine#RunLinters[24]..<SNR>94_GetLintFileValues[27]..<lambda>8[1]..<SNR>94_RunLinters[6]..
<SNR>94_RunLinter[6]..<SNR>94_RunIfExecutable[29]..<SNR>94_RunJob[26]..ale#command#Run[10]..ale#command#FormatCommand[29]..<SNR>95_FormatFilename[11]..ale#Escape:
line   14:
E121: Undefined variable: shellescape
Error detected while processing function <SNR>105_NetrwBrowseChgDir[180]..BufWinEnter Autocommands for "*"..function ale#events#LintOnEnter[5]..ale#Queue[33]..<SNR>88_Lint[26]..ale#engine#RunLinters[24]..<SNR>94_GetLintFileValues[27]..<lambda>8[1]..<SNR>94_RunLinters[6]..
<SNR>94_RunLinter[6]..<SNR>94_RunIfExecutable[29]..<SNR>94_RunJob[26]..ale#command#Run:
line   10:
@JKirchartz
JKirchartz / jkirchartz_exe.mastodon.json
Created July 17, 2020 16:58
Cheap Bots Done Quick & Cheap Bots Toot Sweet source for JKirchartz_exe.
{"origin":["\\#avatar \\#popart #popart_avatar#",
"[phrase:#phrases#]#phrase.capitalize#\n\\#HolzerKreuger {svg #svg2#}"],
"disabled":["\\#avatar \\#popart #popart_avatar# #cc#",
"[phrase:#phrases#]#phrase.capitalize#\n\\#HolzerKreuger {svg #svg2#} #cc#",
".@YournextNick hit me",
"#song#"],
"song":[".@MidiDittyBOT \"#mididitty#\"",
"[tune:#mididitty#].@MidiDittyBOT \"#tune# #tune#\"",
"[verse:#mididitty#][chorus:#mididitty#].@MidiDittyBOT \"#verse# #chorus# #verse# #chorus#\"",
"[tune:#mididitty#].@MidiDittyBOT \"#tune# #mididitty# #tune# #mididitty# #tune#\""],
<div>Invest everything</br>
you have in steam</br>
powered weaving</br>
machines</div>
@JKirchartz
JKirchartz / fake_shell.sh
Created December 26, 2018 18:49
make your own fake shell in bash
#!/bin/bash
function parser {
shopt -s nocasematch
case "$*" in
exit) exit 0;;
echo*) shift; echo $*;;
*) figlet $* | lolcat;;
esac
}
@JKirchartz
JKirchartz / unstick-youtube.user.js
Created February 21, 2020 17:57
Unstick the header from youtube & scroll the movie_player into view
// ==UserScript==
// @name Unstick Youtube
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*.youtube.com/*
// @grant none
// ==/UserScript==
@JKirchartz
JKirchartz / stripes1.svg
Last active December 6, 2019 16:39
Generating Op-art inspired SVGs here: https://codepen.io/JKirchartz/pen/gObarKg .... saving a few favorites here:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@JKirchartz
JKirchartz / git-rename.sh
Created July 3, 2019 17:30
rename git branch
#! /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);
new_branch="$@"
git branch -m $old_branch $new_branch # Rename branch locally
@JKirchartz
JKirchartz / QA-framework.bash
Created February 26, 2019 16:30
A simple "google forms"-style question and answer framework for BASH.
#! /bin/bash
#
# QA-framework.bash
# Copyright (C) 2019 jkirchartz <me@jkirchartz.com>
#
# Distributed under terms of the NPL (Necessary Public License) license.
#
# A simple "google forms"-style way to survey people via bash
#
# usage: