Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active May 13, 2025 14:21
xz-utils backdoor situation (CVE-2024-3094)

FAQ on the xz-utils backdoor (CVE-2024-3094)

This is a living document. Everything in this document is made in good faith of being accurate, but like I just said; we don't yet know everything about what's going on.

Update: I've disabled comments as of 2025-01-26 to avoid everyone having notifications for something a year on if someone wants to suggest a correction. Folks are free to email to suggest corrections still, of course.

Background

@guitarrapc
guitarrapc / curl_retry.sh
Created April 13, 2023 08:20
curl retry. docker gpg server is unstable these days.... 2023
# connect-timeout: 1s = connect timeout. if network connect is stopped frequentry, 1s will be strong option.
# max-time: 10s = must finish within this time
# retry: 5 = retry count
# retry-delay: 0 = no exponential backoff
# retry max time: 60 = retry no longer than
curl --connect-timeout 1 --max-time 10 --retry 5 --retry-delay 0 --retry-max-time 60 -fsSL https://download.docker.com/linux/ubuntu/gpg
@gpeal
gpeal / s1-metrics-collector.sh
Created March 9, 2023 22:41
SentinelOne metrics collector
sentinelctl metrics enable ; sentinelctl metrics dump > /tmp/metrics.json ; count=0 ; while :; do clear; sentinelctl metrics dump > /tmp/metrics-tmp.log ; if grep -q "no metrics available" /tmp/metrics-tmp.log; then echo "Metrics Disabled" ; exit ; fi ; if [ $count = 0 ]; then echo "Starting Metrics Collection" ; count=$((count + 10)) ; else echo "Metrics have been collected for $count seconds" ; count=$((count + 10)) ; fi ; sleep 3 ; diff -u /tmp/metrics.json /tmp/metrics-tmp.log > /tmp/metrics-new.patch ; patch /tmp/metrics.json /tmp/metrics-new.patch ; sleep 3 ; echo "Collecting Metrics & writing to /tmp/metrics.json" ; sleep 4 ; done
@bossjones
bossjones / nvidia_MLNX_OFED_install.md
Created March 3, 2023 23:05
nvidia cuda install with gds enabled
pi@boss-deeplearn:~/.local/src$ mv ~/MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64.tgz .
pi@boss-deeplearn:~/.local/src$ tar zxvf MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64.tgz
./MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64/
./MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64/DEBS/
./MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64/DEBS/mlnx-ofed-basic-user-only_5.8-2.0.3.0_all.deb
./MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64/DEBS/mlnx-ofed-kernel-only_5.8-2.0.3.0_all.deb
./MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64/DEBS/mlnx-ofed-hpc_5.8-2.0.3.0_all.deb
./MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64/DEBS/mlnx-ofed-dpdk-upstream-libs-user-only_5.8-2.0.3.0_all.deb
./MLNX_OFED_LINUX-5.8-2.0.3.0-ubuntu22.04-x86_64/DEBS/mlnx-ofed-xlio_5.8-2.0.3.0_all.deb
@abo-abo
abo-abo / flycheck-ruff.el
Created February 20, 2023 21:01
Emacs ruff flycheck config
(require 'flycheck)
;; From https://github.com/flycheck/flycheck/issues/1974#issuecomment-1343495202
(flycheck-define-checker python-ruff
"A Python syntax and style checker using the ruff utility.
To override the path to the ruff executable, set
`flycheck-python-ruff-executable'.
See URL `http://pypi.python.org/pypi/ruff'."
:command ("ruff"
"--format=text"
/usr/bin/launchctl unload "/Applications/Falcon.app/Contents/Library/SystemExtensions/com.crowdstrike.falcon.Agent.systemextension",
/usr/bin/launchctl unload "/Library/LaunchAgents/com.crowdstrike.falcon.UserAgent.plist",
/usr/bin/killall -9 "/Applications/Falcon.app/Contents/Library/LaunchServices/Falcon Notifications.app/Contents/MacOS/Falcon Notifications",
/sbin/kextunload -b "/Applications/Falcon.app/Contents/Extensions/Agent.kext"
/bin/rm -r "/Applications/Falcon.app"
/bin/rm "/Library/LaunchAgents/com.crowdstrike.falcon.UserAgent.plist"
/usr/local/bin/jamf recon
@jianyun8023
jianyun8023 / weread.user.js
Last active February 24, 2025 06:48
weread download,直接生成epub。仅用于技术研究。目前已失效
// ==UserScript==
// @name 微信读书下载(已失效)
// @namespace http://tampermonkey.net/
// @version 0.5.2
// @description 下载微信读书的书籍资源
// @author tang
// @match https://weread.qq.com/web/reader/*
// @grant unsafeWindow
// @grant GM_setValue
// @grant GM_getValue
@tomdaley92
tomdaley92 / README.md
Last active May 12, 2025 22:14
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

@johnwatsondev
johnwatsondev / README.md
Created May 7, 2021 09:58 — forked from maboloshi/README.md
[Mac下配置Aria2] #macOS #aria2

Mac下配置Aria2

安装和设置 Aria2

# 使用 Homebrew 安装 aria2
brew install aria2

# 创建配置文件aria2.conf和空对话文件aria2.session
mkdir ~/.aria2 && cd ~/.aria2
touch aria2.conf