Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# 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
@Low-power
Low-power / regloop.c
Created March 24, 2022 13:33
Loop mounting device nodes as regular files.
/* 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
@Low-power
Low-power / no-lookup-for-numeric-name.c
Last active May 11, 2022 16:24
Workaround getaddrinfo(3) from the dumb AIX C library performing DNS requests on numeric IP addresses
/* 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 / 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:
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!
/* 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 / 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
@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 / arc_summary.sh
Last active April 26, 2022 14:20
Portable arc_summary reimplementation
#!/bin/sh
# 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