Skip to content

Instantly share code, notes, and snippets.

@baudneo
baudneo / tracking-numbers-from-aliexpress.js
Created February 18, 2025 04:29 — forked from Mewp/tracking-numbers-from-aliexpress.js
Extract tracking numbers from aliexpress' orders list
// Paste this into dev console at order page
window.abajarr = [];
var elems = Array.prototype.slice.call(document.querySelectorAll('.order-info .first-row .info-body'))
function abaj(data) {
abajarr.push(data.tracking[0].mailNo);
if(abajarr.length == elems.length)
console.log(abajarr.join(" "));
}
elems.forEach((e) => {
let script = document.createElement("script");
@baudneo
baudneo / shinobi_openalpr_cuda_easy.sh
Created July 15, 2024 01:47
Build OpenALPR with CUDA
# Install prerequisites
# this includes all the ones missing from OpenALPR's guide.
sudo apt install libtesseract-dev git cmake build-essential libleptonica-dev -y
sudo apt install liblog4cplus-dev libcurl3-dev -y
sudo apt install libleptonica-dev -y
sudo apt install libcurl4-openssl-dev -y
sudo apt install liblog4cplus-dev -y
sudo apt install beanstalkd -y
sudo apt install openjdk-8-jdk -y
@baudneo
baudneo / dimg-over-ssh.md
Created July 13, 2024 16:30 — forked from pouyanh/dimg-over-ssh.md
Docker image transfer over SSH

Sometimes you want to transfer docker images between two linux hosts over SSH. Supposing images are gonna be transferred to 2nd host, There are two options to do that:

  1. Push image to the 2nd host
  2. Pull image from the 1st host

Push to the 2nd host

Here are the Steps:

Save Image {> Compress} > SSH to 2nd Host ({> Decompress} > Load Image)

@baudneo
baudneo / 98-steelseries.rules
Created June 1, 2024 03:18 — forked from ToadKing/98-steelseries.rules
steelseries udev rules+script
ACTION=="add", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1038" RUN+="/etc/udev/rules.d/steelseries-perms.py '%E{DEVNAME}'"
@baudneo
baudneo / pw-setvol.sh
Created May 14, 2024 06:03 — forked from venam/pw-setvol.sh
Set PipeWire volume natively on the default sink
#! /bin/sh
# the metadata only contains the name of the default sink
default_sink_name=$(pw-metadata 0 'default.audio.sink' | grep 'value' | sed "s/.* value:'//;s/' type:.*$//;" | jq .name)
default_sink_id=$(pw-dump Node Device | jq '.[].info.props|select(."node.name" == '" $default_sink_name "') | ."object.id"')
current_volume=$(pw-cli enum-params "$default_sink_id" 'Props' | grep -A 2 'Spa:Pod:Object:Param:Props:channelVolumes' | awk '/Float / {gsub(/.*Float\s/," "); print $1^(1/3) }')
change="${1:-0.1}" # defaults to increment of 0.1
new_volume=$(echo "$current_volume $change" | awk '{printf "%f", $1 + $2}')
# we need to reconvert to cubic root
#new_volume_cube=$(echo "$new_volume" | awk '{ print $1^3 }')
@baudneo
baudneo / bash-to-zsh-hist.py
Created February 17, 2024 19:35 — forked from muendelezaji/bash-to-zsh-hist.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@baudneo
baudneo / OpenCV_Build-Guide.md
Created February 3, 2024 16:22 — forked from minhhieutruong0705/OpenCV_Build-Guide.md
Guide to build OpenCV from Source with GPU support (CUDA and cuDNN)

Guide to build OpenCV from source with GPU support (CUDA and cuDNN)

Feb 22nd, 2022

System specification

  • Operating system: Ubuntu 20.04 x84_64 (64-bit)
  • Architecture: amd64
  • GPU: NVIDIA GeForce RTX 3090
  • Python 3.8

Install dependencies and recommeneded packages

@baudneo
baudneo / del_cluster.sh
Created January 28, 2024 22:37 — forked from btamayo/del_cluster.sh
delete proxmox cluster
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
#/bin/sh
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
killall pmxcfs
@baudneo
baudneo / .textgen.env
Created December 27, 2023 08:35 — forked from sammcj/.textgen.env
Willow Speech + Local LLM + HomeAssistant
# https://github.com/oobabooga/text-generation-webui/blob/main/README.md
# https://github.com/oobabooga/text-generation-webui/blob/main/docs/Spell-book.md
# by default the Dockerfile specifies these versions: 3.5;5.0;6.0;6.1;7.0;7.5;8.0;8.6+PTX
# https://developer.nvidia.com/cuda-gpus you can find the version for your card here
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
# TORCH_CUDA_ARCH_LIST=6.0,6.1,6.2,7.0,7.5,8.0,8.6+PTX
# RTX3090 = sm_86 and compute_86 (PTX)
#8.6+PTX
# Tesla P100 = sm_60, sm_61, sm_62 and compute_60, compute_61, compute_62
@baudneo
baudneo / Install_OpenCV4_CUDA11_CUDNN8.md
Created October 20, 2023 02:36 — forked from raulqf/Install_OpenCV4_CUDA12.6_CUDNN8.9.md
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 20.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 20.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries: