This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::{ | |
fs::File, | |
io::{Error, ErrorKind, Write}, | |
os::{ | |
fd::{AsRawFd, FromRawFd, OwnedFd}, | |
unix::net::UnixStream, | |
}, | |
path::Path, | |
process::Command, | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: "Download a private GitHub release" | |
vars: | |
owner: "mikroskeem" | |
repo: "snakeoil" | |
tag: "v0.0.1" | |
asset_name: "snakeoil.x86_64-linux" | |
get_url_args: | |
dest: "/tmp/the-thing" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# See https://www.kernel.org/doc/Documentation/networking/netconsole.txt | |
# Use e.g. `insmod netconsole.ko netconsole=+@/,[email protected]/` on the VM | |
# $ vector --version | |
# vector 0.34.2 (aarch64-unknown-linux-musl d685a16 2024-01-02 14:59:54.890517436) | |
sources: | |
in: | |
#type: "syslog" # does not work with netconsole |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"imports": { | |
"$std/": "https://deno.land/[email protected]/", | |
"vault/": "https://raw.githubusercontent.com/restake/deno-hashicorp-vault/67b015694251a9f030bc419296c93e8900ebff84/", | |
"@noble/ed25519": "https://deno.land/x/[email protected]/mod.ts" | |
}, | |
"fmt": { | |
"indentWidth": 4, | |
"lineWidth": 140 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
svc="${1}" | |
pid="$(systemctl show --property MainPID --value "${svc}")" | |
user="$(systemctl show --property User --value "${svc}")" | |
uid="$(getent passwd "${user}" | cut -d: -f3)" | |
sudo nsenter -t "${pid}" -U -m -S "${uid}" /bin/bash -i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Publish documentation" | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
publish-documentation: | |
permissions: | |
id-token: "write" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- nix-shell -p luajit luajitPackages.ldbus luajitPackages.inspect | |
local ldbus = require("ldbus") | |
local inspect = require("inspect") | |
local conn = assert(ldbus.bus.get("system"), "System bus connection failed") | |
function do_method_call(conn, destination, path, iface, method_name, args, f) | |
local msg = assert(ldbus.message.new_method_call(destination, path, iface, method_name), "Failed to create message") | |
local iter = ldbus.message.iter.new() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang="ts"> | |
import LazyImage from "$lib/components/LazyImage.svelte"; | |
</script> | |
<style> | |
div.preview > :global(*) { | |
height: 320px; | |
width: 320px; | |
} | |
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"version":0,"class":"sysevent.fs.zfs.pool_create","pool":"tpool","pool_guid":11580135928063884441,"pool_state":0,"pool_context":6,"time":[1652401466,660179477],"eid":1} | |
{"version":0,"class":"sysevent.fs.zfs.history_event","pool":"tpool","pool_guid":11580135928063884441,"pool_state":0,"pool_context":6,"history_hostname":"noname","history_internal_str":"pool version 5000; software version zfs-macOS-2.1.0-0-ga3ba8b30c1; uts noname 21.4.0 Darwin Kernel Version 21.4.0: Fri Mar 18 00:47:26 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T8101 ","history_internal_name":"create","history_txg":4,"history_time":1652401466,"time":[1652401466,660226311],"eid":2} | |
{"version":0,"class":"sysevent.fs.zfs.history_event","pool":"tpool","pool_guid":11580135928063884441,"pool_state":0,"pool_context":6,"history_hostname":"noname","history_internal_str":"feature@async_destroy=enabled","history_internal_name":"set","history_txg":4,"history_time":1652401466,"time":[1652401466,660330144],"eid":3} | |
{"version":0,"class":"sysevent.fs.zfs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
: "${GH_TOKEN}" | |
repo="${1}" | |
version="${2}" | |
name="${3}" | |
asset_url="$(curl -s -H "Accept: application/vnd.github.v3+json" -u "token:${GH_TOKEN}" "https://api.github.com/repos/${repo}/releases/tags/${version}" \ |
NewerOlder