https://github.com/pulls?user=matrix-hacks replace matrix-hacks with your own
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
// you need `op` tool for this, download it here https://support.1password.com/command-line/ | |
// create items.json like so: | |
// op list items | jq > items.json | |
// then run this script | |
// this script outputs uuids of dupes as keyed by item title, create, and modified date, | |
// feed it into the delete command like so: | |
// node process.js | xargs -I{} op delete item {} | |
const items = require('./items.json'); |
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
#!/bin/bash | |
PROXMOX_SERVER="pve:8006" | |
USERNAME="root@pam" | |
PASSWORD="<your pve password>" | |
NODE="pve" | |
INTERNAL_BRIDGE="vmbr1" | |
NIC="ens18" # nic name inside the vm to be templatized | |
MAC_ADDRESS="$(ip addr show $NIC | grep -m 1 -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}' | tr 'a-f' 'A-F' | head -n1)" | |
# Step 1: Login and get ticket and CSRF token |
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
apt install wireguard-tools | |
cd /etc/wireguard | |
# https://www.wireguard.com/quickstart/ | |
umask 077 | |
wg genkey | tee privatekey | wg pubkey > publickey | |
# https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/ | |
echo "net.ipv4.ip_forward = 1 | |
net.ipv6.conf.all.forwarding = 1" > /etc/sysctl.d/wg.conf |
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
# Reveal dashboards and panels that have alerts but no notification channels | |
# Works on Grafana v8 Alerts (v9 changes alerts a lot) | |
# This script is useful for when you accidentally change alert notification channel | |
import requests | |
from config import base_url, api_key | |
headers = {'Authorization': f'Bearer {api_key}'} | |
def get_dashboards(): | |
url = f'{base_url}/api/search' | |
response = requests.get(url, headers=headers) |
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
document.querySelectorAll('[data-href]').forEach((a)=>{ a.href = a.dataset.href; a.onclick=(e)=>{e.preventDefault(); e.stopPropagation(); window.open(a.href, 'blank')}} ) |
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
#define _LP64 1 | |
#define __AARCH64EL__ 1 | |
#define __AARCH64_CMODEL_SMALL__ 1 | |
#define __AARCH64_SIMD__ 1 | |
#define __APPLE_CC__ 6000 | |
#define __APPLE__ 1 | |
#define __ARM64_ARCH_8__ 1 | |
#define __ARM_64BIT_STATE 1 | |
#define __ARM_ACLE 200 | |
#define __ARM_ALIGN_MAX_STACK_PWR 4 |
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
B=' o \ o / _ o __| \ / |__ o _ \ o / o ' | |
C='/|\ | /\ ___\o \o | o/ o/__ /\ | /|\' | |
D='/ \ / \ | \ /) | ( \ /o\ / ) | (\ / | / \ / \' | |
E='55555555556666668888888777777555557777777766666666666677777775555' | |
P=0 | |
function dance() { | |
if [ $P -ge ${#B} ]; then | |
P=0 | |
fi | |
N=${E:$P:1} |
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
import { test, expect } from '../helper/test.mjs'; | |
import { signInProcess} from '../helper/sign_in_helper.mjs' | |
test('test', async ({ page, bpd, playwright }) => { | |
await Promise.all([ | |
(async ()=>{ | |
const browser2 = await playwright.chromium.launch(); | |
const context2 = await browser2.newContext(); | |
const page2 = await context2.newPage(); | |
const pc2 = await bpd.createCompanyWithUsersContacts(); |
NewerOlder