Skip to content

Instantly share code, notes, and snippets.

View fearful-symmetry's full-sized avatar

Alex K. fearful-symmetry

  • Seattle
View GitHub Profile
@fearful-symmetry
fearful-symmetry / kern_procargs2_test.go
Created July 25, 2022 20:21
Test Procargs2 behavior
package main
/*
#include <stdlib.h>
#include <sys/sysctl.h>
#include <sys/mount.h>
#include <mach/mach_init.h>
#include <mach/mach_host.h>
#include <mach/host_info.h>
#include <libproc.h>
@fearful-symmetry
fearful-symmetry / node_stats_parser.py
Created February 4, 2021 18:07
_node/stats summary tool
#!/usr/local/bin/python3
import json
def fetch_nodes(stats_file: str):
"""
return node data from _node/stats
"""
raw_fd = open(stats_file)
@fearful-symmetry
fearful-symmetry / aix_notes.md
Created July 14, 2020 14:52
AIX Getting Started

Gettting Started

  • AIX uses RPM and yum.
  • default shell is ksh.
  • Before you start, run df -m to make sure you have enough disk space to do development. Ask for someone who knows IBM's cloud UI to fix it, lest you be forced to wrangle with AIX's volume manager.
  • vim, git and golang available via yum.
  • Dev Toolbox: https://www.ibm.com/support/pages/node/883796. Installing this might help a few things. There's a yum.sh script at the top of the page.
  • Once you install the Dev Toolbox, yum will have an AIX_toolbox repo that contains standard GNU coreutils. The ones you get are not standard. For example, ls --color=auto doesn't work out of the box.
  • Run yum install coreutils once you have the AIX_toolbox repo. Add export PATH=/usr/linux/bin:opt/freeware/bin:$PATH to your .bashrc to get standard gnu coreutils.
@fearful-symmetry
fearful-symmetry / Cargo.toml
Created March 10, 2020 14:01
Using Rust and LD_PRELOAD to sniff open() calls
[package]
name = "test-ffi"
version = "0.1.0"
edition = "2018"
[lib]
crate-type = ["cdylib"] # Creates dynamic lib
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Keybase proof

I hereby claim:

To claim this, I am signing this object: