Skip to content

Instantly share code, notes, and snippets.

@krisek
krisek / alert.rules.yml
Last active May 7, 2024 23:53
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@Vogtinator
Vogtinator / README.md
Last active May 7, 2024 23:48
Run Win11 on ARM in QEMU

When following this guide on a host not capable of native arm64 KVM, replace -M virt -cpu host -accel kvm with -M virt,virtualization=on -cpu max.

The reason for virtualization=on is that the Windows bootloader does an smc #0 PSCI call, but without EL2, QEMU's TCG does not handle those because PSCI is in HVC mode and such that instruction is treated as undefined. With KVM enabled, smc #0 is handled properly.

Workaround in QEMU for using TCG without virtualization=on:

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index b871350856..de11ff51d1 100644
--- a/hw/arm/virt.c
@EXtremeExploit
EXtremeExploit / osuGuide.md
Last active May 7, 2024 23:46
Installation guide to installing osu! on Arch Linux

osu! Arch Linux guide install

Installing wine

  • Install wine from the official repositories, wine 7.12 is stable enough to run osu!
$ sudo pacman -S wine

Installing wine dependecies

@kashifulhaque
kashifulhaque / NvChad.md
Last active May 7, 2024 23:44
Neovim stuff with NvChad

Neovim keybinds

  • Capital letters do the opposite of small letters in command (Press shift to trigger capital letters)
  • _ (underscore) to move the cursor at the beginning of line (doesn't switch to insert mode)
    • 0 (zero) moves the cursor to the zeroth position of the line (doesn't switch to insert mode)
  • $ (dollar) to move the cursor at the end of line (doesn't switch to insert mode)
  • d$ will delete from wherever your cursor is till the end of the line
  • f<character> to move cursor to the first occurrence of <character>
    • f( to move cursor to first occurence of (
  • t<character> to move cursor to upto but not on the first occurrence of <character>
  • t( to move cursor to first occurence of (
@arafathusayn
arafathusayn / hidetidio.js
Last active May 7, 2024 23:42
Hide TidioChat Branding (for new theme)
function hideTdo() {
var timer = null;
var target = document.querySelector('#tidio-chat iframe');
if(!target) {
if(timer !== null) {
clearTimeout(timer);
}
timer = setTimeout(hideTdo, 500);
return;
} else {
@lopspower
lopspower / README.md
Last active May 7, 2024 23:40
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 7, 2024 23:37
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

Red [
Title: "Example of definitional scoping"
Date: 20-Mar-2017
Author: https://github.com/9214
File: %(s)puny-mortals.red
]
meditate: function ['on thing] [
print "ॐ"
@BrutalSimplicity
BrutalSimplicity / Dockerfile
Created September 1, 2022 20:20
Dockerfile with asdf + docker install bits
FROM debian:latest
# Install basic dev packages
RUN apt-get clean && apt-get update && apt-get -y install --no-install-recommends \
apt-utils \
openssh-client \
git \
gnupg2 \
dirmngr \
iproute2 \
@morgant
morgant / acme-client.conf
Created October 14, 2023 16:29
OpenBSD httpd & relayd reverse proxy configuration
authority letsencrypt {
api url "https://acme-v02.api.letsencrypt.org/directory"
account key "/etc/acme/letsencrypt-privkey.pem"
}
# example.net
domain example.net {
alternative names { www.example.net }
domain key "/etc/ssl/private/example.net.key"
domain certificate "/etc/ssl/example.net.crt"