[](https://mermaid.live/edit#pako:eNqFU0FuwjAQ_MrKZ_iAD0gpFIlbJKSectnaG1jJsVPbQaKIv9dpEhICtM4tM7OZnXEuQjlNQopAXw1ZRRvGg8eqsJAOqug8ZIAB1p4wEuzJn1hRB9foIyuu0UZ4owPbjvQMLJ2nV2iW7z7QsMbIzj7C--QBD536KWHLlsPx1fQNqaRPM4pemsFytZr6lU-Xsy69cSfy99Sd5cjJ7TfBLoctVmzOUDIZHf7UZcY41X5kbZoQye_yMBia8GDZeRvjkhBisk-H8-P4KSv3lLamrfPTIF6xN97VoDngpyF9sz_YGZmdn7uCJJxmZd3BnWLWmQSKSvd3ykQIjVIU-sDaM-N3Q27NyeSwrXjk36DfLjMJHUQmEJTI5p_J0xsjwVMKKI6SMbQ5zxCGaYPAJZD37d0axFPJzJzVbcTDA5MjFqIiXyHr9CdeWqwQ8U
# Instructions for fresh install | |
$ sh <(curl -L https://nixos.org/nix/install) --darwin-use-unencrypted-nix-store-volume --daemon | |
# reboot | |
$ source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh | |
$ echo 'export NIX_PATH=darwin-config=$HOME/.nixpkgs/darwin-configuration.nix:$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH' | tee -a ~/.zshrc | |
$ echo 'source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh' | tee -a ~/.zshrc | |
$ nix-channel --add https://nixos.org/channels/nixpkgs-unstable | |
$ nix-channel --add https://github.com/LnL7/nix-darwin/archive/master.tar.gz darwin | |
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager |
This script goes into /etc/kernel/postinst.d
. You have to make it executable by root, e.g. chown root:root /etc/kernel/postinst.d/00-signing ; chmod u+rx /etc/kernel/postinst.d/00-signing
. It assists you with automatically signing freshly installed kernel images using the machine owner key in a way similar to what dkms does. This is mainly useful if you want to use mainline kernels on Ubuntu on Secure Boot enabled systems. This needs shim-signed to be set up. If you have questions this one might help you: While I made this for Ubuntu 20.04, it should work on current Debian based distributions. YMMV.
(Note this is using github's v3 API. They have a new v4 version that uses graphql. Haven't tried that at the time of writing.)
Using github API is a bit weird at first, because uses the same lower-level git commands that are abstracted away to the normal user. However, this is actually a good thing to some degree, because it means you can do things like changing a single file without copying out an entire branch or repo to your disk.
I will be referencing git objects (blobs, trees, refs, etc.) in this short tutorial, but not covering them in gory detail. You can learn more about them here.
These scripts allow you to have a wireguard connection in your initrd. Make sure you have wireguard installed on your system and a busybox which supports ip
, nslookup
. If it does not work, change the copy_exec
line for busybox in the hook and replace it with a better one. It reads /etc/wireguard/initramdisk.conf and expects at least one comment specifying all ip addresses like so: # Address = 1.2.3.4/12
. Tested on Ubuntu 19.10.
Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam' | |
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes' | |
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no' |
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
Hi,
I'm looking for a PHP library to write an async script.
Basically, I need to be able to, in async:
- Do HTTP GET/POST requests
- Log to files
- Read from files
- Log to console