Skip to content

Instantly share code, notes, and snippets.

View artlung's full-sized avatar
💭
🤖

Joe Crawford artlung

💭
🤖
View GitHub Profile
@artlung
artlung / artlung.basic
Last active April 28, 2023 02:19
A program to display ARTLUNG logo on a TI-99/4a
1 REM ARTLUNG START
2 REM TI-EXTENDED BASIC TI-99/4A
3 CALL CLEAR
9 REM
10 CALL CHAR(33, "0F1F7F7F7E7C7CFC")
11 CALL VCHAR(1, 1, 33)
12 CALL CHAR(34, "FCFFFFFFFFFFFFFF")
13 CALL VCHAR(2, 1, 34)
14 CALL CHAR(35, "7F7F7F7E7EFCFCFC")
15 CALL VCHAR(3, 1, 35)
@artlung
artlung / artlung_results.txt
Last active January 9, 2022 20:12
I wanted to see if I could find earworms in my last.fm data which I've used more or less reliably for many years. Yes, I found some. Little Fluffy Clouds I'm pretty sure is an error - I made a playlist with just that and it ran over a weekend on a work computer. But the rest look pretty legit to me. Sequential plays of the same song over and over.
Found earworm on 2020-05-12: An Angry Thunderstorm by White Noise Meditation: played 238 times.
Found earworm on 2018-10-18: Little Fluffy Clouds (7" Edit) by The Orb: played 245 times.
Found earworm on 2018-10-18: Little Fluffy Clouds (7" Edit) by The Orb: played 25 times.
Found earworm on 2015-04-15: Johannesburg by Gil Scott-Heron: played 16 times.
Found earworm on 2015-04-15: Ring Capacity (Green Lantern Song) by Kirby Krackle: played 39 times.
Found earworm on 2015-04-15: Senses Working Overtime by XTC: played 23 times.
Found earworm on 2015-04-15: Ch-Check It Out by Beastie Boys: played 22 times.
Found earworm on 2015-04-15: She's An Angel (live) by They Might Be Giants: played 32 times.
Found earworm on 2015-04-15: Kansas by The Wolfgang Press: played 24 times.
Found earworm on 2015-04-15: A Real Hero (feat. Electric Youth) by College: played 29 times.
@artlung
artlung / inc.tracker.php
Created December 22, 2021 05:56
In 2010 when I was applying for jobs I added a little tracker chunk of php to any page I sent to recruiters so I could get a notification if they actually clicked through. It worked pretty well. Primitive and intrusive but also pretty funny.
<?php
define('TRACK', false);
function isSpider($HTTP_USER_AGENT) {
$spiders = array(
'Baiduspider',
'msnbot',
'youdao',
'YandexBot',
@artlung
artlung / make-git-lfs-commands.php
Created December 15, 2021 20:32
Git LFS command generator for my blog
<?php
$i = 2001;
$types = ['jpg', 'png', 'gif'];
$years = range(2001, 2021);
foreach ($years as $year) {
foreach ($types as $type) {
echo "git lfs track blog/wp-content/uploads/{$year}/**/*.{$type};\n";
}

Keybase proof

I hereby claim:

  • I am artlung on github.
  • I am artlung (https://keybase.io/artlung) on keybase.
  • I have a public key ASBIdwaUOPWU_0J_rgMNDyNL1k6NuJdrZBcG2fgEjJeRawo

To claim this, I am signing this object:

@artlung
artlung / keybase.md
Created December 7, 2021 18:42
keybase.md

Keybase proof

I hereby claim:

I am artlung on github. I am artlung (https://keybase.io/artlung) on keybase. I have a public key ASBIdwaUOPWU_0J_rgMNDyNL1k6NuJdrZBcG2fgEjJeRawo

To claim this, I am signing this object:

@artlung
artlung / words-legacy-template.php
Last active November 19, 2021 03:29
Words Legacy Template (for WordPress)
<?php /* Template Name: Words Legacy Template */ ?>
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns#" <?php language_attributes(); ?>>
<head>
<title><?php echo wp_title('', false, 'left'); ?> : Joe Crawford (ArtLung.com)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="<?php bloginfo('atom_url'); ?>" />
<?php wp_head(); ?>
@artlung
artlung / ~filo-stanford-940520-bin-index.pl
Created April 11, 2021 19:30
~filo/stanford/940520/bin/index.html
#! /usr/local/bin/perl
require 'ctime.pl';
require 'newgetopt.pl';
#require '/usr/local/lib/perl5/ctime.pl';
#require '/usr/local/lib/perl5/newgetopt.pl';
#require '/usr/local/lib/perl5/sys/socket.ph';
#
# ----> parse_hotlist <----
# takes a file (default /chronos/c1/jerry/.hotlist
@artlung
artlung / fixpermissions.sh
Created August 30, 2020 20:00
Set Permissions to 600 for all WordPress wp-config.php files
# where /usr/home/username/public_html contains all your wordpress installs
# to run for the current directory and lower:
# find . -name wp-config.php | xargs chmod 600
find /usr/home/username/public_html -name wp-config.php | xargs chmod 600
@artlung
artlung / highlight-dow-jones-changes-2020.js
Last active June 26, 2020 07:13
Use this on the Wikipedia page for "List of largest daily changes in the Dow Jones Industrial Average"
var tds = document.querySelectorAll('td');
// Use in the console for https://en.wikipedia.org/wiki/List_of_largest_daily_changes_in_the_Dow_Jones_Industrial_Average
for (var i = 0; i<tds.length; i++) {
var td = tds[i];
if (td.innerText.indexOf('2020-0') === -1) {
td.style.opacity = 0.3;
td.style.backgroundColor = td.style.backgroundColor.toString().replace(')', ',0.3)');
}
}