Skip to content

Instantly share code, notes, and snippets.

View wohali's full-sized avatar
💭
I may be slow to respond.

Joan Touzet wohali

💭
I may be slow to respond.
View GitHub Profile
@wohali
wohali / readme.md
Created July 10, 2024 07:16
Using C-Kermit with SimH to transfer files from a simulated PDP-11

Using C-Kermit with SimH to transfer files from a simulated PDP-11

This is a short guide on copying files to/from a simulated PDP-11 using C-Kermit. It's slow, but extremely robust.

Configuring SimH

Here's a minimal machine config for Kermit. It's possible to run in less memory but I didn't spend the time to work it out.

The most important parts of this config are the dli/dlo lines, which enable a second serial line for file transfer, and the cpu line setting 256KB of memory.

@hyperupcall
hyperupcall / settings.jsonc
Last active January 8, 2025 13:29
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@Birch-san
Birch-san / opencv-cuda.md
Last active April 29, 2025 02:25
Building OpenCV with CUDA acceleration

For CUDA 12, see Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10 for how to install Nvidia driver 530, gcc 12 and CUDA 12.1.1 libraries.
If you want CUDA 11.8, then you can use latest Nvidia driver from Production branch, 525, with gcc 11.

Activate your conda environment, if you haven't done so already.

CUDA 11:
Make sure gcc 11 is the default gcc for your OS, or select gcc 11 explicitly.
CUDA 12:
Make sure gcc 12 is the default gcc for your OS, or select gcc 12 explicitly.
Check CUDA_DIR below points to the CUDA installation you wish to use.

@wuhanstudio
wuhanstudio / ftdi_fixer.py
Last active June 30, 2022 19:21
Install Lattice Diamond on Ubuntu / PopOS
#!/usr/bin/python
# vim: set ts=4 sw=4 expandtab syntax=python:
"""
FTDI device permission fixer
Can be called from a udev rule to ensure connected FTDI devices have
world-writable permissions for use by user applications
J. Hipps <[email protected]>
@wohali
wohali / couchdb-downloads-2020.md
Last active March 28, 2021 18:57
CouchDB download statistics for April 2020 - April 2021

CouchDB downloads, Apr 1 2020 - Apr 1 2021

platform # of DLs (approx) # of DLs in 2019 (approx) comments
Docker 70.5m + 19m = 89.5m 60.4m + 6.7m = 67.1m See notes
Windows 72k 100k 75% 3.x, 25% 2.x. Extrapolated from 253d of data
deb (Debian / Ubuntu) 65k 65k 76% are 3.x, 24% are 2.x
rpm (CentOS / RedHat) 63k 40k 69% are 2.x, 31% are 3.x
source .tar.gz 11.6k 38k extrapolated from 10 days of data; primarily 3.1.1
Mac 18k 25k 67% 3.x, 32% 2.x. Extrapolated from 253d of data
@TheFlyingCorpse
TheFlyingCorpse / gist:c7486531ea74ef897220e0eef4edcc0f
Last active August 18, 2020 05:57
Avoid highlights in WeeChat in a specific channel

Install and add a filter to mute any highlights to the word "rune" in #r/leagueoflegends on quakenet.

Autoset is used to make it persistent.

/script install unhighlight.py
/script install buffer_autoset.py
/autosetbuffer add irc.quakenet.#r/leagueoflegends localvar_set_unhighlight_regex rune
@deathbearbrown
deathbearbrown / brief_format.md
Last active October 20, 2023 19:11
Brief format

Basics

Comments on tone and style:

  • Never apologize in a design brief
  • keep it succinct
  • Do not talk about design features that do not have a direct correlation with a problem

PRE DEFINE

Definition: A design report documents the solution to a unique problem.

@izabera
izabera / asciinema-to-scriptreplay
Last active March 31, 2025 18:37
convert between asciinema and scriptreplay
#!/bin/bash
exec {times}> times {typescript}> typescript < "${1-/dev/stdin}"
while read -r; do [[ $REPLY = ' "stdout": [' ]] && break; done # skip to this line
LANG=C
printf "Script started on %(%c)T\n" -1 >&"$typescript" # dummy
while read -r open; [[ $open = '[' ]]; do
read -r elapsed; read -r string; read -r close
eval printf %b%n "$string" characters >&"$typescript" # put count in $characters
printf "%s %s\n" "${elapsed%,}" "$characters" >&"$times"
done
@wohali
wohali / howto.md
Last active June 25, 2023 04:01
How to get the data off of a Micro PDP-11

I assume you have an RX50 dual-floppy on your machine, and that you're trying to get the data off of e.g. an ST506 MFM HDD that's in the machine.

  1. Get a PC or laptop setup with serial to the box. You want to connect to the Console port (the top left one), set the rotary switch to 9600 bps (setting 14) as 19200 is too unstable. You'll also need a null modem crossover to swap RX/TX and RTS/CTS. I recommend using Kermit on your machine to speak to the PDP, as you'll need it for file copies anyway. You can create the following script as e.g. pdp.ck and execute $ kermit pdp.ck to automatially connect to the machine with the correct parameters:

     set line /dev/ttyR0             ; replace with the correct device for you
                                     ; this is port 0 on a RocketCom 8-port serial card
     set speed 9600                  ; rotary switch setting 14 on the micro PDP-11
     set parity even                 ;
     set stop-bits 1                 ;
    

set session-log binar

@pascalpoitras
pascalpoitras / 1.md
Last active May 1, 2025 10:42
My WeeChat configuration

This configuration is not maintained anymore. You should think twice before using it, Breaking change and security issue will likely eventually happens as any abandonned project.