Skip to content

Instantly share code, notes, and snippets.

@Low-power
Low-power / droptostop.c
Created April 22, 2020 09:17
LD_PRELOAD program used to prevent terminals from being write-protected by foreground process.
/* This file has no copyright assigned and is placed in the Public Domain.
* No warranty is given.
*/
#include <termios.h>
#include <dlfcn.h>
#include <stdlib.h>
#include <stdio.h>
#ifndef LIBC_PATH
#!/bin/sh
# Copyright 2015-2021 Rivoreo
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
@Low-power
Low-power / pm
Last active October 14, 2021 05:22
Command line wrapper for Solaris pm(7D).
#!/usr/bin/sh
# Copyright 2015-2021 Rivoreo
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
@Low-power
Low-power / fsp-boot-log
Created November 15, 2021 07:42
IBM 8202-E4C FSP (piao) serial console output
�AE�fspinit (May 11 2018 17:01:25) $Revision: 1.33 $ starting Initialization
fspinit (May 11 2018 17:01:25) $Revision: 1.33 $ initialization complete
TF timer sec: 7200
System memory is 190
common_configure_nvram_4_p7lx: Already configured for 128K Nvram (HV16 - Jupiter)
Creating /tmp/profile from minicom environment (/etc/profile -> /tmp/profile)
Can't open device 2frumnetlink:frumHandleNetlinkEvent: Ignoring MTD RO device /class/mtd/mtd16ro
/opt/fips/bin/nvram_init: nvram device size is 131072
/opt/fips/bin/nvram_init: magic number is good
/opt/fips/bin/nvram_init: found end tag at offset 49254
@Low-power
Low-power / ibm-80p5315-fsp-boot-log
Created November 17, 2021 14:24
IBM 9131-52A FSP (80P5315) firmware version SF240_403
---- FSPBOOT 0.8.31 build on Linux 2.6.5-7.252-bigsmp at Aug 11 2006 15:11:16 ----
Core CRC ok
Flash/NVRAM configuration
start maxsize manufid deviceid type
0. fc000000 00800000 00000000 00000000 NVRAM
1. fc800000 00800000 00000000 00000000 NVRAM
2. fd000000 01000000 00002000 00001888 FLASH_REAL
3. fe000000 01000000 00002000 00001888 FLASH_REAL
4. ff000000 01000000 00002000 00001888 FLASH_REAL
/* Copyright 2015-2021 Rivoreo
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
DIE1 CLUSTER1 L1/L2 Cache Mbist OK!
DIE1 CLUSTER2 L1/L2 Cache Mbist OK!
DIE1 CLUSTER3 L1/L2 Cache Mbist OK!
DIE2 CLUSTER0 L1/L2 Cache Mbist OK!
DIE2 CLUSTER1 L1/L2 Cache Mbist OK!
DIE2 CLUSTER2 L1/L2 Cache Mbist OK!
DIE2 CLUSTER3 L1/L2 Cache Mbist OK!
DIE1 CLUSTER0 L1/L2 Cache Mbist OK!
LLC Mbist start, please wait for a moment!
LLC Mbist OK!
@Low-power
Low-power / scripttoasciicast.c
Last active December 9, 2021 10:02
Convert terminal typescripts (by script(1) from util-linux) into asciicasts (for asciinema).
/* Copyright 2015-2021 Rivoreo
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@Low-power
Low-power / rivoreo+android+nosilent+Program.java
Created December 31, 2021 19:16
Prevent Android-based phone enters silent mode
/* Copyright 2015-2022 Rivoreo
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@Low-power
Low-power / fork-bomb.s
Created February 22, 2022 05:57
Fork bomb for AIX
.text
.global .__start
.__start:
bl _start
_start:
li r2, 5
crorc cr6, cr6, cr6
sc