Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# --slave /usr/bin/$1 $1 /usr/bin/$1-\${version} \\
function register_clang_version {
local version=$1
local priority=$2
update-alternatives \
--install /usr/bin/llvm-config llvm-config /usr/bin/llvm-config-${version} ${priority} \
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 23, 2024 14:51
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@JiankunW
JiankunW / mi.sh
Last active April 23, 2024 14:51
[M]on[I]toring GPU usages of a Slurm cluster with multiple nodes
#!/bin/bash
if [[ "$1" == "-a" ]]
then
echo "Avaiable (MIXED or IDEL) nodes:"
sinfo -N --noheader | grep -e mix -e idle | while read line
do
arr=($line)
srun -p ${arr[2]} -w ${arr[0]} gpustat -p --color 2>/dev/null </dev/null
done
@paolocarrasco
paolocarrasco / README.md
Last active April 23, 2024 14:50
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@ih2502mk
ih2502mk / list.md
Last active April 23, 2024 14:48
Quantopian Lectures Saved
@Snarp
Snarp / google-docs-copy.js
Last active April 23, 2024 14:48
Script to allow copying from a protected Google Doc
/*
<https://stackoverflow.com/questions/40296831/is-it-possible-to-force-a-copy-of-a-protected-google-doc>
NOTE - 2021-05-24
-----------------
The script below isn't the fastest way to copy-and-paste from a protected
Google Doc. Before trying it, I'd suggest following MikoFrosty's advice from
the comments:
@AndreasKueck
AndreasKueck / rimedoj_por_trovi_surlokajn_eoparolantojn.md
Last active April 23, 2024 14:54
Rimedoj por trovi surlokajn Esperanto-parolantojn
N-ro Rimedo Bezonata uzantokonto che ... Kunhavigo de viva pozicio ... Rimarkoj
1 Apo Snapchat Snapchat eblas Uzanto povas kunhavigi sian pozicion (au vivan pozicion)
  • au al siaj amikoj
  • au al siaj amikoj kun elekteblaj esceptoj
  • au al elekteblaj uzantoj el la aro de siaj amikoj.
Jen ekzempla montro.

Ech sen kunhavigo de pozicio oni tamen povas facile montri lokojn, kie Esperanto estas parolata:
Tie oni foje kreu malmultsekundan videajhon kun mallonga Esperanto-teksto kaj ghin afishu en la "Snap Map" (momentfota mapo, Snapmapo).
2 Apo Telegram; vidu ankau retpaghon [telegramo.org](https
@OrionReed
OrionReed / dom3d.js
Last active April 23, 2024 14:46
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@gauravssnl
gauravssnl / fix-magisk-stock-backup-does-not-exist.md
Created March 25, 2023 20:14 — forked from zander21510/fix-magisk-stock-backup-does-not-exist.md
Added additional instructions and corrected/explained filename issues.

How To Fix "Stock Backup Does Not Exist" message in Magisk when using "Restore Images" to flash OTA

DISCLAIMER: I didn't come up with these steps, nor do I provide any support for these steps. I just wanted to add some additional information that helped me. Not responsible if you brick your phone/cause thermonuclear war/etc. Use at your own risk/PLEASE google/research if you are unsure of what you're doing.

STEP 1:

Connect your phone to your computer via ADB. If you don't know how to do this, please search before following these steps

STEP 2:

put stock boot.img into /sdcard/boot.img. MAKE SURE the name of the file is "boot.img", otherwise you will need to alter the following commands to use the name of the file. MAKE SURE your stock boot.img IS A VALID BOOT FILE, if it is not, Magisk will still restore the image, but the OTA will not work and your phone will not work upon reboot.

@SegerEnd
SegerEnd / google_search_maps_addon.js
Last active April 23, 2024 14:45 — forked from Daan-Grashoff/google_search_maps_addon.js
Bring back the google maps button when searching on google
// ==UserScript==
// @name Google maps addon
// @namespace http://tampermonkey.net/
// @version 2024-02-13
// @description Bring google maps button back
// @author You
// @match https://www.google.com/*
// @icon https://www.google.com/
// @grant none
// ==/UserScript==