Skip to content

Instantly share code, notes, and snippets.

||oursteps.com.au^$client=roy
||ozbargain.com.au^$client=roy
||ycombinator.com^$client=roy
||hckrnews.com^$client=roy
||zerohedge.com^$client=roy
||v2ex.com^$client=roy
||weibo.cn^$client=roy
2023-05-29T11:59:28.322 D t0 logfile.cc:532 loading file... /home/roy/tmp/sosreport-svdpf0000002e2-2023-05-29-fzgqlks/var/log/sssd/sssd_sudo.log:0
2023-05-29T11:59:28.324 D t0 logfile.cc:587 setting text format to 0
2023-05-29T11:59:28.324 D t0 logfile.cc:250 (papertrail_log) does not match file name: /home/roy/tmp/sosreport-svdpf0000002e2-2023-05-29-fzgqlks/var/log/sssd/sssd_sudo.log
2023-05-29T11:59:28.324 D t0 logfile.cc:259 (pcap_log) does not match file format: unknown
2023-05-29T11:59:28.326 D t0 logfile.cc:463 scanning file... /home/roy/tmp/sosreport-svdpf0000002e2-2023-05-29-fzgqlks/var/log/sssd/sssd_sudo.log.1
2023-05-29T11:59:28.326 D t0 logfile.cc:532 loading file... /home/roy/tmp/sosreport-svdpf0000002e2-2023-05-29-fzgqlks/var/log/sssd/sssd_sudo.log.1:0
2023-05-29T11:59:28.328 D t0 logfile.cc:587 setting text format to 0
2023-05-29T11:59:28.328 D t0 logfile.cc:250 (papertrail_log) does not match file name: /home/roy/tmp/sosreport-svdpf0000002e2-2023-05-29-fzgqlks/var/log/sssd/sssd_sudo.log.1
2023
#!/usr/bin/python3
# https://python.langchain.com/docs/use_cases/question_answering/
# pip install chromadb langchain openai tiktoken
# pip install unstructured markdown # for markdown loader
# pip install sqlite-vss
import dotenv
dotenv.load_dotenv()
#!/bin/bash
# https://github.com/k3s-io/k3s/issues/1719
# https://github.com/flannel-io/flannel/issues/1243
# FIXED in kubernetes 1.26
# For NATed nodes, --node-external-ip and wireguard-native backend is required for k3s to work
VERSION="v1.24.6+k3s1"
SERVER_EXT=XXXX # external IP, public IP
#!/bin/bash
if [ $# -eq 0 ]; then
dirs="nova neutron libvirt openvswitch"
else
dirs=$*
fi
AWKSCRIPT='
BEGIN {

The following works for pve 8 with 6.5 kernel.

The driver is still experimental, use with your own discretion.

  • prepare env
git clone https://github.com/strongtz/i915-sriov-dkms
apt install dkms build-essential proxmox--headers-6.5 
// ==UserScript==
// @name LightningReadability
// @namespace http://tampermonkey.net/
// @description SalesForce lightning readability
// @author roylez
// @include https://*.lightning.force.com/lightning/*/Case*
// @license MIT
// @grant GM_addStyle
// jQuery is already loaded
// @updateURL https://gist.github.com/roylez/851f61838d6b79d3501e9bfe37c9f063/raw/LightningReadability.user.js
-- Interface functions
--
-- gmatch(str, regex): search for patterns globally, to replace string.gmatch. PCRE style regex.
--
-- add_action_handler(regex, func): add action hanlders. PCRE style regex.
-- add_message_handler(regex, func, synopsis, description): add message handlers. PCRE style regex.
-- print_case(number): print a case's detail to chat
-- say(str): print string to chat
-- set(str, value): set a persistent variable
-- set(str, value, ttl): set a variable with an expiration in seconds
#!/usr/bin/gawk -f
#
# Usage: ./rabbit-tell.awk <rabbitmqctl_report>
#
# Common RabbitMQ issues that this script can be used to identify
#
# - Partitioned cluster
#
# - High binary/queue memory usage. There are mainly two causes of this:
#
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.