Skip to content

Instantly share code, notes, and snippets.

@karawitan
karawitan / gist:3d89515ea39a9c97c7f558b8a6637ab2
Created February 22, 2024 23:38
stern multipod log viewer
stern -n rook-ceph mgr*
stern -n rook-ceph --max-log-requests 100 .
stern -n rook-ceph rook-ceph-osd-prepare*
stern '.*' --condition ready=false
@karawitan
karawitan / gist:e79cf006dd31e30d2c0602a3d5da37b7
Created February 22, 2024 23:37
using raspberry pi with an onboard dac
mpv --no-video --audio-device=/dev/dsp
pacmd list-sinks | grep -B 1 'name: <tunnel'
pacmd set-default-sink 2
alsa-info output
http://alsa-project.org/db/?f=ec63c66f3a1fb8683407c92d5f9ecf20f251c4d8
@karawitan
karawitan / gist:dc952bef32488dfb3c98fca3717b6376
Created February 22, 2024 23:36
journalctl common commands
journalctl -u <unit>
journalctl -u <unit> -f --no-hostname
# view the system journal logs for the current boot session
journalctl -b
journalctl -u ufw.service -f
journalctl --vacuum-time=2d
journalctl --vacuum-time=600s
@karawitan
karawitan / gist:92591c61e75a55389f5a2326c94b5106
Created February 22, 2024 23:33
kubectl delete finilizers
# when deletion of Kubernetes resource is getting stuck, solve it the bad way
kubectl patch configmap/mymap \
--type json \
--patch='[ { "op": "remove", "path": "/metadata/finalizers" } ]'
#
kubectl patch ns/longhorn-system -p '{"metadata":{"finalizers":[]}}' --type=merge
ipfs resolve /ipns/ipld.io
ipfs repo ls
ipfs refs local | wc -l
ipfs pin add /ipns/torrent-paradise.ml
ipfs bitswap wantlist
@karawitan
karawitan / gist:1eb3af5cf106e05ddd7d08ee7280690a
Created February 22, 2024 23:26
strace usefull commands
strace --trace=file,network,process -f -o /tmp/log
# disable suspend.target
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
# check suspend daemon status
sudo systemctl status sleep.target suspend.target hibernate.target hybrid-sleep.target
@karawitan
karawitan / gist:fc0b6f883cbe5f71b81e221392bcf2ff
Last active February 22, 2024 23:39
Common adb shell commands
adb root
adb sideload
adb shell ps
adb shell top
adb shell getprop
adb shell setprop
@karawitan
karawitan / make_ipxe_uefi_usb.md
Created April 27, 2021 07:45 — forked from AdrianKoshka/make_ipxe_uefi_usb.md
Making a UEFI bootable iPXE USB drive

Making a UEFI bootable iPXE USB drive

Build the UEFI executable for iPXE

# First we'll clone iPXE
$ git clone git://git.ipxe.org/ipxe.git
# Go into the src directory of the cloned git repo
$ cd ipxe/src
# Compile the UEFI iPXE executable
@karawitan
karawitan / ProtonMail Vs. LavaBit Vs. Tutanota
Created April 28, 2020 14:07 — forked from CHEF-KOCH/ProtonMail Vs. LavaBit Vs. Tutanota
Which eMail provider? ProtonMail Vs. LavaBit Vs. Tutanota
Email Provider Criteria
Email is a notoriously insecure protocol which is generally recommended
against for critical communications, particularly if exposed meta-data
is part of your threat model.
In any of all mentioned provider cases, the provider offers end-to-end encrypted only between users of the same solution. Only PGP is a universal way of sending encrypted emails to anyone, but unfortunately not enough people know how to use this. Zero knowledge encryption means key must be stored on the user’s device otherwise it’s not protected against state-sponsored criminals. Of course, this doesn’t mean they couldn’t give the government plain text messages — just that it would require them to actively attack the user in order steal the required password, up to now they haven’t done it, and most probable will not do so in the foreseeable future. It also means the provider is unable to recover (decrypt) data if password is lost. Tutanota explains that if they were requested to hand over inboxes (keeping in mi