Skip to content

Instantly share code, notes, and snippets.

@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 / update-last.c
Created May 8, 2022 07:28
Append an accounting record for last(1) (wtmpx)
/* 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:
/* 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:
/* 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 / 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
@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 / 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 / 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:
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!