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} \
@Dragost
Dragost / PDF Manual Downloader Script.md
Last active January 18, 2025 17:04
PDF Manual Downloader Script <manualpdf.es>

PDF Manual Downloader Script

This script is designed to download PDF manuals from wdhmedia websites. It can be run on any operating system that supports Python, maybe.

This is not the most correct or fastest way to download PDFs, but it works.

Tested with python 3.10 and Poetry.

@mohiwalla
mohiwalla / fw-672.json
Created January 18, 2025 16:37
List of font-awesome 6.7.2 free icons
[
"fa-classic fa-solid fa-0 fa-fw",
"fa-classic fa-solid fa-1 fa-fw",
"fa-classic fa-solid fa-2 fa-fw",
"fa-classic fa-solid fa-3 fa-fw",
"fa-classic fa-solid fa-4 fa-fw",
"fa-brands fa-42-group fa-fw",
"fa-classic fa-solid fa-5 fa-fw",
"fa-brands fa-500px fa-fw",
"fa-classic fa-solid fa-6 fa-fw",
@tomlankhorst
tomlankhorst / docker-swarm-gpu.md
Last active January 18, 2025 17:01
Instructions for Docker swarm with GPUs
@vdboor
vdboor / patch_migrations.py
Created August 19, 2016 09:03
Avoid the `verbose_name` and `help_text` in Django migrations for fields.
"""
Patch the creation of database migrations in Django
Import this early from `__init__.py``.
- Don't want verbose_name changes in the migrations file.
- Don't want help_text in the migrations file.
"""
from functools import wraps
from django.db.models import Field
@nico-lab
nico-lab / hevc_nvenc.txt
Last active January 18, 2025 16:53
ffmpeg -h encoder=hevc_nvenc
Encoder hevc_nvenc [NVIDIA NVENC hevc encoder]:
General capabilities: dr1 delay hardware
Threading capabilities: none
Supported hardware devices: cuda cuda d3d11va d3d11va
Supported pixel formats: yuv420p nv12 p010le yuv444p p016le yuv444p16le bgr0 bgra rgb0 rgba x2rgb10le x2bgr10le gbrp gbrp16le cuda d3d11
hevc_nvenc AVOptions:
-preset <int> E..V....... Set the encoding preset (from 0 to 18) (default p4)
default 0 E..V.......
slow 1 E..V....... hq 2 passes
medium 2 E..V....... hq 1 pass
@sadiqsalau
sadiqsalau / .cpanel.yml
Last active January 18, 2025 16:54
Laravel Cpanel Deploy
---
deployment:
tasks:
# If .deploy.conf doesn't exist, create it from .deploy.example.conf
- |
if [ ! -f .deploy.conf ]
then
cp .deploy.example.conf .deploy.conf
exit
else
@glenkusuma
glenkusuma / install-zsh-windows-git-bash.md
Last active January 18, 2025 16:52 — forked from fworks/install-zsh-windows-git-bash.md
Zsh / Oh-my-zsh on Windows Git Bash
@the-crypt-keeper
the-crypt-keeper / 3060vs3060.md
Created May 2, 2024 17:59
RTX 3060 x1 vs x16 results on 4-bit quantized Llama 8B Instruct models

Enviroment setup

Test Host is an HP z640 with Intel(R) Xeon(R) CPU E5-2690 v4 @ 2.60GHz

Device 0 is a GeForce RTX 3060 Lite Hash Rate (EVGA) connected via the cheapest USB x1 crypto mining riser I could find online.

Device 1 is a GeForce RTX 3060 (HP OEM) connected via an x16 PCIe 4.0 riser cable (although note that my host does not support past PCIe past 3.0)

tensorrt-llm 0.8.0

@fntlnz
fntlnz / self-signed-certificate-with-custom-ca.md
Last active January 18, 2025 16:49
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096