Skip to content

Instantly share code, notes, and snippets.

View ziggythehamster's full-sized avatar

Keith Gable ziggythehamster

View GitHub Profile
@ziggythehamster
ziggythehamster / README.md
Created June 11, 2024 05:53
TERA8M proof of concept

I am building this functionality into WD76UTIL but wanted to at least get my proof of concept test in a gist in case it is helpful to one of the other half dozen people with a Teradrive.

BTW, the mod for the Teradrive is to connect A10 on the SIMM sockets (pin 19) to RA10 (pin 126) on the WD76C10. On my model 3 unit, RA10 is accessible through a via.

You cannot connect A11 on the SIMM sockets and you cannot use >4MByte SIMMs, because the chipset doesn't support it.

You must install the SIMMs in pairs.

@ziggythehamster
ziggythehamster / AirPrint-HP_LaserJet_2100.service
Created April 18, 2022 23:56
LaserJet 2100 on CUPS with AirPrint
<?xml version="1.0" ?>
<!DOCTYPE service-group SYSTEM 'avahi-service.dtd'>
<service-group>
<name replace-wildcards="yes">HP LaserJet 2100</name>
<service>
<type>_ipp._tcp</type>
<subtype>_universal._sub._ipp._tcp</subtype>
<port>631</port>
<txt-record>txtvers=1</txt-record>
<txt-record>qtotal=1</txt-record>
@ziggythehamster
ziggythehamster / collect_docker_container_inventory.sh
Created April 25, 2017 21:47
Amazon SSM Docker Inventory Collectors
#!/bin/sh
#
# This script will make an API call to Docker and use JQ to output a document that SSM can
# pick up as custom inventory.
# TODO: mounts
curl --unix-socket /var/run/docker.sock -H "Content-Type: application/json" "http:/v1.24/containers/json" | jq '{ SchemaVersion: "1.0", TypeName: "Custom:DockerContainers", Content: [.[] | { Id: .Id, Name: .Names[0] | ltrimstr("/"), State: .State, Status: .Status, Created: .Created | todateiso8601, BoundPorts: .Ports | [ .[] | select(.PublicPort != null) | [.IP, (.PublicPort | tostring), (.PrivatePort | tostring)] | join(":") ] | join(", "), NetworkMode: .HostConfig.NetworkMode, ECSTaskARN: .Labels["com.amazonaws.ecs.task-arn"], ECSTaskFamily: .Labels["com.amazonaws.ecs.task-definition-family"], ECSTaskVersion: .Labels["com.amazonaws.ecs.task-definition-version"] }] }'
@ziggythehamster
ziggythehamster / change_laserjet_density.sh
Last active December 22, 2016 21:12
Send PJL command to a LaserJet to configure the density
# see http://g2100config.cvs.sourceforge.net/viewvc/g2100config/g2100config/console/2100config.c?view=markup for a list
# of commands that you might want to run. \ez prints a single page self test page.
ruby -e 'print "\e%-12345X@PJL\r\n@PJL DEFAULT DENSITY=5\r\n\e%-12345X\r\n\ez\r\n"' | nc 192.168.0.10 9100
provider "aws" {}
@ziggythehamster
ziggythehamster / sidekiq_monitor.rb
Last active July 1, 2016 03:25
sidekiq_monitor.rb
# box drawing characters
DUL = "\u2554" # double, upper left
DUR = "\u2557" # double, upper right
DHO = "\u2550" # double, horizontal
DVR = "\u2551" # double, vertical
DLL = "\u255A" # double, lower left
DLR = "\u255D" # double, lower right
SHO = "\u2500" # single, horizontal
en:
activemodel:
errors:
models:
"reservations/accepter":
attributes:
user:
requires_email_or_phone: 'your string'
@ziggythehamster
ziggythehamster / console.txt
Created August 6, 2015 22:34
Widescreen in Quake3-based games
seta r_customwidth "1680"
seta r_customheight "1050"
seta r_mode "-1"
vid_restart
@ziggythehamster
ziggythehamster / bashlike.ps1
Created August 6, 2015 22:27
Bashlike PowerShell Prompt
function prompt {
$realLASTEXITCODE = $LASTEXITCODE
# Reset color, which can be messed up by Enable-GitColors
$Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal( [Security.Principal.WindowsIdentity]::GetCurrent() )
& {
if ($currentPrincipal.IsInRole( [Security.Principal.WindowsBuiltInRole]::Administrator ))
{
@ziggythehamster
ziggythehamster / stacktrace.txt
Created January 22, 2013 16:48
RhoMobile Stack Trace
03-30 11:37:53.937: I/DEBUG(4025): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
03-30 11:37:53.937: I/DEBUG(4025): Build fingerprint: 'generic/ET1N1/ET1N1:2.3.4/01-271301-2272-0100-00-D1-090312/2272-090312:user/release-keys'
03-30 11:37:53.937: I/DEBUG(4025): pid: 4124, tid: 4142 >>> BUNDLE_ID_REDACTED <<<
03-30 11:37:53.937: I/DEBUG(4025): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 00000000
03-30 11:37:53.937: I/DEBUG(4025): r0 0798ae38 r1 00000000 r2 01490bc8 r3 00000000
03-30 11:37:53.937: I/DEBUG(4025): r4 00000001 r5 00000002 r6 008cff80 r7 0798ae38
03-30 11:37:53.937: I/DEBUG(4025): r8 0799e9b0 r9 00000000 10 00fdc020 fp 00000000
03-30 11:37:53.937: I/DEBUG(4025): ip 00000000 sp 46b17e80 lr 8133a558 pc 8133c19c cpsr 80000110
03-30 11:37:53.937: I/DEBUG(4025): d0 0000000100000018 d1 ffff760000031900
03-30 11:37:53.937: I/DEBUG(4025): d2 fffff9000000e800 d3 fffff88e0000e800