Skip to content

Instantly share code, notes, and snippets.

@masklinn
masklinn / cheatsheet.md
Last active April 27, 2024 11:21
launchctl/launchd cheat sheet

I've never had great understanding of launchctl but the deprecation of the old commands with launchctl 2 (10.10) has been terrible as all resources only cover the old commands, and documentation for Apple utilities is generally disgracefully bad, with launchctl not dissembling.

Mad props to https://babodee.wordpress.com/2016/04/09/launchctl-2-0-syntax/ which contains most details

domains

Internally, launchd has several domains, but launchctl 1 would only ask for service names,

@kennwhite
kennwhite / vpn_psk_bingo.md
Last active February 24, 2024 12:19
Most VPN Services are Terrible

Most VPN Services are Terrible

Short version: I strongly do not recommend using any of these providers. You are, of course, free to use whatever you like. My TL;DR advice: Roll your own and use Algo or Streisand. For messaging & voice, use Signal. For increased anonymity, use Tor for desktop (though recognize that doing so may actually put you at greater risk), and Onion Browser for mobile.

This mini-rant came on the heels of an interesting twitter discussion: https://twitter.com/kennwhite/status/591074055018582016

@derpston
derpston / gist:2069716
Created March 18, 2012 07:42
Unpacking and repacking initramfs images
# Unpack
gzip -cd /boot/initramfs.example | cpio -i
# Repack
find . | cpio --dereference -o -H newc | gzip > /boot/initramfs.example
@robinsmidsrod
robinsmidsrod / lio_start.sh
Last active February 22, 2021 12:49
Configuration for iscsi targets using LIO on Linux (generated via targetcli application)
mkdir /sys/kernel/config/target/iscsi
#### iSCSI Discovery authentication information
echo -n 0 > /sys/kernel/config/target/iscsi/discovery_auth/enforce_discovery_auth
#### Network portals for iSCSI Target Portal Group
mkdir -p /sys/kernel/config/target/iscsi/iqn.2011-02.lan.smidsrod:testvm.boot.ubuntu/tpgt_1/np/10.1.1.10:3260
#### iSCSI Target Ports
mkdir -p /sys/kernel/config/target/iscsi/iqn.2011-02.lan.smidsrod:testvm.boot.ubuntu/tpgt_1/lun/lun_0
ln -s /sys/kernel/config/target/iscsi/iqn.2011-02.lan.smidsrod:testvm.boot.ubuntu/tpgt_1/lun/lun_0/../../../../../../target/core/iblock_7/testvm.boot.ubuntu /sys/kernel/config/target/iscsi/iqn.2011-02.lan.smidsrod:testvm.boot.ubuntu/tpgt_1/lun/lun_0/0acc9b6c97
lio_node --aluasecmd iqn.2011-02.lan.smidsrod:testvm.boot.ubuntu 1 0
#### Attributes for iSCSI Target Portal Group