Skip to content

Instantly share code, notes, and snippets.

@thesamesam
thesamesam / xz-backdoor.md
Last active November 4, 2024 18:32
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.

Background

On March 29th, 2024, a backdoor was discovered in xz-utils, a suite of software that

@costerwi
costerwi / Abaqus MPI.md
Last active June 11, 2024 09:19
Overview of running Abaqus MPI on Linux

Abaqus MPI on Linux

MPI Versions Delivered with Abaqus

Abaqus version IBM Platform MPI (PMPI) Intel MPI (IMPI)
2018 to 2020 HF2 9.1.4.3 (S, E) 2017.2.174
2020 HF3 (FP2024) 9.1.4.3 2017.2.174 (S, E)
2020 HF4 (FP2030) 9.1.4.3 (S, E) 2017.2.174
2020 >=HF5 (FP2038) 9.1.4.3 (S) 2019 Update 7 (E)

下載「未開放下載的 Microsoft Stream 影片」的方法

大多數公司上傳至 Microsoft Stream 的影片會因隱私權政策緣故,除了管理員外禁止下載以防止外流。若僅個人使用或純粹備存用途,可參考下述流程以進行影片備份。

  1. 先使用「管理者權限」開啟 PowerShell,安裝 Chocolatey 後,再透過 Chocolatey 快速安裝必要相依套件。

Chocolatey 官網:https://community.chocolatey.org/

  • 安裝 Chocolatey
@m-radzikowski
m-radzikowski / script-template.sh
Last active November 15, 2024 11:25
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@2KAbhishek
2KAbhishek / Shell_Keybindings.md
Last active November 12, 2024 14:43
Keyboard shortcuts for bash/zsh

Shell Keybindings

Navigation 🚀

Keybinding Action
Alt + f/b Move cursor to previous/next word
Ctrl + a/e Move cursor to beginning/end of command
Ctrl + xx Toggle between the start of line and current cursor position
@ashevchuk
ashevchuk / rac_ipmi_jviewer.sh
Last active May 7, 2024 00:17
Aster MegaRAC IPMI q&d fix for broken iKVM jviewer.jnlp
#!/bin/sh
if [ "$#" -ne 3 ]; then
echo "Usage: $0 [ip address] [user name] [password]"
exit 1
fi
IP=$1
IPMI_USER=$2
IPMI_PASS=$3
@githubfoam
githubfoam / Mellanox OFED cheat sheet
Last active November 7, 2024 23:24
Mellanox OFED cheat sheet
--------------------------------------------------------------------------
# ofed_info -s
--------------------------------------------------------------------------
Find Mellanox Adapter Type and Firmware/Driver version
ConnectX-4 card
# lspci | grep Mellanox
0a:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
# lspci -vv -s 0a:00.0 | grep "Part number" -A 3
# lspci | grep Mellanox | awk '{print $1}' | xargs -i -r mstvpd {}
@mazurkin
mazurkin / linux_monitors.md
Last active November 5, 2020 15:47
Linux monitoring tools

System

  • atop
  • vmstat
  • dstat - Combines vmstat, iostat, ifstat, netstat information and more
  • speedometer - ASCII graphs

Network

  • iftop - Amazing network bandwidth utility to analyse what is really happening on your eth
@tan9
tan9 / ezlearning.user.js
Last active August 22, 2024 06:07
CHT e-Learning Assistant
// ==UserScript==
// @name CHT e-Learning Assistant
// @source https://gist.github.com/tan9/41686eab8e704bb18885a24339010d65
// @version 0.8.12
// @description Learn without pain (and ideally, with plenty of gain...)
// @author tan9, danny, Ray941216
// @downloadURL https://gist.github.com/tan9/41686eab8e704bb18885a24339010d65/raw/ezlearning.user.js
// @updateURL https://gist.github.com/tan9/41686eab8e704bb18885a24339010d65/raw/ezlearning.user.js
// @require https://www.gstatic.com/firebasejs/4.9.0/firebase.js
// @require https://code.jquery.com/jquery-1.12.4.min.js
@posener
posener / go-shebang-story.md
Last active October 18, 2024 01:42
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.