Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
trading heroes for ghosts.

Supratim Sanyal tuklusan

💭
trading heroes for ghosts.
View GitHub Profile
@tuklusan
tuklusan / NU.MAC
Created Dec 3, 2021
NU.MAC Ethernet port handler source code file for system generation for UNIBUS processors (DEUNA and DELUA controllers) - DEC RT-11 PDP-11 Ethernet Network Device Driver; see https://supratim-sanyal.blogspot.com/2021/12/rt-11-on-pdp-1145-adventures-running.html
View NU.MAC
.MCALL .MODULE
.MODULE NU,VERSION=15,COMMENT=<DEUNA Port Handler>,AUDIT=NO
; COPYRIGHT 1989, 1990, 1991 BY
; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
; ALL RIGHTS RESERVED
;
;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
;ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
;INCLUSION OF THE ABOVE COPYRIGHT NOTICE. THIS SOFTWARE OR ANY OTHER
@tuklusan
tuklusan / TWONKY.MIC
Last active Nov 29, 2021
MONGEN responses for PDP-10 KS10 TOPS-10 7.04 NET node TWONKY hacked for 4 Lines of DUP11 DUP lines; see https://supratim-sanyal.blogspot.com/2021/11/hacking-tops-10-for-8-lines-of-dup11.html
View TWONKY.MIC
.RUN DSKA:MONGEN[1,4]
;Write MONGEN.MIC (YES,NO)
*Y
;MONGEN for 704 monitors
;
;MONGEN will generate any known TOPS-10 configuration. For information
;about which configurations are supported, please refer to the SPD.
;
;/HELP (PROMPT,SHORT,LONG)
*PROMPT
@tuklusan
tuklusan / TWONKY-8XDUP-HACK.LOG
Last active Nov 29, 2021
TOPS-10 PDP-10 KS10 hack to increase number of DUP11 lines to 4 on SimH Node TWONKY (DECNET 31.37 on dup0, ANF10 37 on dup1, ANF10 network uplink on dup2, unused dup3 currently)
View TWONKY-8XDUP-HACK.LOG
#####
# We bump up the number of DUP lines on TWONKY
# dup0 = DECNET
# dup1 - dup3 = ANF10
#
# We do 4 lines because SimH allows 4 lines
#
# NOTE: We can have 8 DUP lines on TWONKY but running it under
# SimH's support of max 4 lines causes numerous problems
# So stick to 4 DUP lines
View PDP-10_TOPS-10_Operating-System_Commands
Login
=====
login username password - no password needed on operator console
A "#" response means its asking for username again (something was wrong in last attempt)
Logout
======
kjob
Shutdown
@tuklusan
tuklusan / hecnet-nodes-list-for-cisco.sh
Created Oct 29, 2021
Load HECnet Node List DECnet Node Database into CISCO Router - CISCO IOS used for DECnet over GRE Tunneling: See https://supratim-sanyal.blogspot.com/2017/09/decnet-phase-iv-copy-node-database-from.html
View hecnet-nodes-list-for-cisco.sh
#!/bin/bash
#
# CISCO needs commands of the form
# DECNET HOST PUFF 1.22
#
OUTFILE="nodenames-cisco-ios"
TMPFILE="/tmp/hecnet-cisco-temp.tmp"
curl -sNm 60 http://mim.update.uu.se/hecnod | dos2unix | egrep "^[0-9]" | cut -f 1-2 -d " " | sed -re 's/^/ /' | sed -re 's/[(]/DECNET HOST /' | sed -re 's/[)]//' > ${TMPFILE}
@tuklusan
tuklusan / sbin-init.d-rclocal
Last active Oct 15, 2021
/sbin/init.d/rclocal - execute Linux-style rc.local on HP-UX 11.11 or other rc and init.d based Unix environments that don't support rc.local directly; see https://supratim-sanyal.blogspot.com/2021/10/linux-style-etcrclocal-for-hp-ux-1111.html
View sbin-init.d-rclocal
#!/sbin/sh
# *****
# /sbin/init.d/rclocal
# execute Linux-style rc.local on HP-UX 11.11 or other rc and init.d based
# Unix environments that don't support rc.local directly; see
# https://supratim-sanyal.blogspot.com/2021/10/linux-style-etcrclocal-for-hp-ux-1111.html
# *****
# Allowed exit values:
@tuklusan
tuklusan / clear-kernel-memory-cache.sh
Created Sep 7, 2021
SANYALnet Labs | Save State of VirtualBox Virtual Machines on APC UPS power loss shutdown by apcupsd Linux Daemon / clear-kernel-memory-cache.sh: see https://supratim-sanyal.blogspot.com/2021/09/save-state-of-virtualbox-virtual.html
View clear-kernel-memory-cache.sh
#!/bin/bash
#
# /root/clear-kernel-memory-cache.sh
# See see https://supratim-sanyal.blogspot.com/2021/09/save-state-of-virtualbox-virtual.html
#
sync;sync;sync
echo 3 > /proc/sys/vm/drop_caches
sync;sync;sync
@tuklusan
tuklusan / onbattery
Created Sep 7, 2021
SANYALnet Labs | Save State of VirtualBox Virtual Machines on APC UPS power loss shutdown by apcupsd Linux Daemon / onbattery event handler script: see https://supratim-sanyal.blogspot.com/2021/09/save-state-of-virtualbox-virtual.html
View onbattery
#!/bin/bash
#
# /etc/apcupsd/onbattery
#
# This shell script if placed in /etc/apcupsd
# will be called by /etc/apcupsd/apccontrol when the UPS
# goes on batteries.
# We send an email message to root to notify him.
#
@tuklusan
tuklusan / gist:fce4244d4c2f19e5a68b8c0e150d6492
Created Sep 7, 2021
SANYALnet Labs | Save State of VirtualBox Virtual Machines on APC UPS power loss shutdown by apcupsd Linux Daemon /etc/apcupsd : see https://supratim-sanyal.blogspot.com/2021/09/save-state-of-virtualbox-virtual.html
View gist:fce4244d4c2f19e5a68b8c0e150d6492
# ls -l
total 60
lrwxrwxrwx 1 root root 27 Aug 17 14:09 annoyme -> do-nothing-event-handler.sh
-rwxr-xr-x 1 root root 4007 Mar 22 2020 apccontrol
-rw-r--r-- 1 root root 13295 Aug 17 12:43 apcupsd.conf
-rw-r--r-- 1 root root 13238 Aug 16 20:22 apcupsd.conf.orig
lrwxrwxrwx 1 root root 27 Aug 17 14:11 battattach -> do-nothing-event-handler.sh
lrwxrwxrwx 1 root root 27 Aug 17 14:11 battdetach -> do-nothing-event-handler.sh
lrwxrwxrwx 1 root root 27 Aug 17 14:10 changeme -> do-nothing-event-handler.sh
lrwxrwxrwx 1 root root 27 Aug 17 14:05 commfailure -> do-nothing-event-handler.sh
@tuklusan
tuklusan / gist:4f2b26419ac7bc00000738312510a0c1
Created Sep 7, 2021
SANYALnet Labs | Save State of VirtualBox Virtual Machines on APC UPS power loss shutdown by apcupsd Linux Daemon / apcupsd apccontrol events: see https://supratim-sanyal.blogspot.com/2021/09/save-state-of-virtualbox-virtual.html
View gist:4f2b26419ac7bc00000738312510a0c1
2021-08-17 11:13:34 +0000 Power failure.
2021-08-17 11:13:40 +0000 Running on UPS batteries.
2021-08-17 11:13:43 +0000 Reached remaining time percentage limit on batteries.
2021-08-17 11:13:43 +0000 Initiating system shutdown!