Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 28, 2024 10:23
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@Birch-san
Birch-san / CUDA-12-1-1-pytorch.md
Last active April 28, 2024 10:22
Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Installing CUDA 12.1.1 + PyTorch nightly + Python 3.10 on Ubuntu 22.10

Should you keep your NVIDIA driver?

CUDA 12.1.1 toolkit is gonna offer to install Nvidia driver 530 for us. It's from New Feature branch. It's likely to be newer than the default Nvidia driver you would've installed via apt-get (apt would prefer to give you 525, i.e. Production Branch).

If you're confident that you already have a new enough Nvidia driver for CUDA 12.1.1, and you'd like to keep your driver: feel free to skip this "uninstall driver" step.

But if you're not sure, or you know your driver is too old: let's uninstall it. CUDA will install a new driver for us later.

@alanzeino
alanzeino / lldb-debugging.md
Last active April 28, 2024 10:21
LLDB debugging with examples

LLDB Debugging Cheat Sheet

Commands

LLDB Commands

LLDB comes with a great set of commands for powerful debugging.

help

Your starting point for anything. Type help to get a list of all commands, plus any user installed ones. Type 'help for more information on a command. Type help to get help for a specific option in a command too.

@tech189
tech189 / convert_stg_to_sidebery.md
Last active April 28, 2024 10:24
Convert Simple Tab Groups backup to Sidebery snapshot

How to use

  1. Go to your Simple Tab Groups settings and save a backup file (Settings>Backup your Simple Tab Groups>Create backup)
  2. Disable/remove the addon
  3. Install Sidebery
  4. Go to Sidebery's settings and save a snapshot (Settings>Snapshots viewer>Create snapshot)
  5. Save the Python file below
  6. Edit lines 4 and 5 with the full paths to your Simple Tab Groups backup and Sidebery snapshot
  7. Run it with python3 convert_stg_to_sidebery.py - output saved to wherever you ran the Python file
  8. Import the generated sidebery-output.json in Sidebery (Settings>Snapshots viewer>Import snapshot)
  9. Once loaded, click on the imported snapshot in the list and then click Open window on the right
@h3ssan
h3ssan / JetBrains trial reset.md
Last active April 28, 2024 10:19
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@tirumaraiselvan
tirumaraiselvan / setupadmissionwebhook.md
Last active April 28, 2024 10:16
Setup admission webhooks in Kubernetes
@lonetwin
lonetwin / pip_meta_path_finder.py
Created May 16, 2016 13:15
Auto-install missing python modules
import sys
import pip
from importlib import import_module
from importlib.abc import MetaPathFinder
class PipMetaPathFinder(MetaPathFinder):
"""A importlib.abc.MetaPathFinder to auto-install missing modules using pip
"""
def find_spec(fullname, path, target=None):
@reedacartwright
reedacartwright / portable_endian.h
Created April 30, 2016 01:24 — forked from panzi/portable_endian.h
This provides the endian conversion functions form endian.h on Windows, Linux, *BSD, and Mac OS X. You still need to use -std=gnu99 instead of -std=c99 for gcc. The functions might actually be macros. Functions: htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, htobe64, htole64, be64toh, le64toh. License: I hereby put "port…
// "License": Public Domain
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like.
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it
// an example on how to get the endian conversion functions on different platforms.
#ifndef PORTABLE_ENDIAN_H__
#define PORTABLE_ENDIAN_H__
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__)