e.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.hypervisor</key>
<true/>
</dict>
┌───┬──┐ , _ _ | |
│ ╷╭╯╷ │ /| | | | | | | |
│ └╮ │ |___| _ | | | | __ | |
│ ╰─┼╯ │ | |\ |/ |/ |/ / \_ | |
└───┴──┘ | |/ |__/ |__/ |__/ \__/ |
e.xml
:<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.hypervisor</key>
<true/>
</dict>
#!/usr/sbin/dtrace -s | |
/* | |
* newproc.d - snoop new processes as they are executed. DTrace OneLiner. | |
* | |
* This is a DTrace OneLiner from the DTraceToolkit. | |
* | |
* 15-May-2005 Brendan Gregg Created this. | |
*/ | |
/* |
``` | |
package_repository_manager.clear_caches() | |
``` |
prepend in /etc/pam.d/sudo
:
(needs to get repeated after OS updates)
auth sufficient pam_tid.so
inspired by.
https://github.com/nullpo-head/WSL-Hello-sudo.
(Windows Hello Face Recognition for sudo auth in WSL)
``` | |
sleep() { | |
if [[ $@ == "infinity" ]]; then | |
while true | |
do | |
/bin/sleep 1 | |
done | |
else | |
/bin/sleep "$@" | |
fi |
``` | |
// Create a large heap allocation of 10 GiB | |
// to prevent garbage collection gets | |
// triggered before the amount of heap | |
// allocation is reached | |
ballast := make([]byte, 10<<30) | |
``` |
``` | |
pushd $HOME/.ssh | |
cp -p id_rsa id_rsa.pem | |
ssh-keygen -p -N "" -m pem -f id_rsa.pem #replaces file | |
popd | |
``` |
commands from my meetup session Jan 2021
uptime #load avg
dmesg -T | tail #kernel msgs
vmstat -Sm 1 #mem in MB
vmstat -Sm 1 -d 1 #disk in MB
mpstat -P ALL 1 #cpus
pidstat -t 1 #procs with threads
iostat -xy 1 #disk queue length, etc
FROM archlinux | |
RUN pacman -Sy --noconfirm git go base-devel docker | |
# makepkg needs to run under an unprived user and sudo out | |
RUN useradd -m -G wheel -s /bin/sh worker | |
RUN echo "ALL ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers.d/tempbuild | |
USER worker | |
RUN cd $HOME && git clone https://aur.archlinux.org/docker-pushrm.git | |
RUN cd $HOME/docker-pushrm && makepkg -si --noconfirm | |
USER root | |
RUN rm /etc/sudoers.d/tempbuild |