Skip to content

Instantly share code, notes, and snippets.

@pgrepds
pgrepds / gist:7c9a7e29a8b649369951e2002a85a3d0
Last active February 2, 2024 19:42
Matlab R2022a ArchLinux installer problem fix
I got problems installing Matlab R2022a on Arch. Running the installer throws the following error:
```
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to launch web window with error: Unable to launch the MATLABWindow application. The exit code was: 127
fish: Job 1, 'sudo ./install' terminated by signal SIGABRT (Abort)
```
I fixed it by running the following commands.
@apfzvd
apfzvd / discord-bot.sh
Last active March 15, 2024 17:42
how to send a message to discord channel using the webhook via shell script
#!/bin/bash
##
# Discord Webhook
# Change the 'your_discord_webhook_name' with your actual Discord Webhook
##
##
# add to linux cron:
# sudo crontab -e
@nathzi1505
nathzi1505 / opencv-4.2.0-cuda-10.1-Ubuntu-20.04.md
Last active February 9, 2024 01:22
Step-by-Step Guide to build OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04

How to install OpenCV 4.2.0 with CUDA 10.1 on Ubuntu 20.04 LTS (Focal Fossa)

Install updates and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Install required libraries:

@raulqf
raulqf / Install_OpenCV4_CUDA11_CUDNN8.md
Last active April 18, 2024 19:53
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 22.04

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

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@astamicu
astamicu / Remove videos from Youtube Watch Later playlist.md
Last active May 2, 2024 05:52
Script to remove all videos from Youtube Watch Later playlist

UPDATED 22.11.2022

It's been two years since the last update, so here's the updated working script as per the comments below.

Thanks to BryanHaley for this.

setInterval(function () {
    video = document.getElementsByTagName('ytd-playlist-video-renderer')[0];

 video.querySelector('#primary button[aria-label="Action menu"]').click();
@erikw
erikw / snp
Last active December 24, 2023 06:11
snp: Wrap shell command in BTRFS snapper pre-post snapshots and log outputs.
#!/usr/bin/env bash
# Runs a command wrapped in btrfs snapper pre-post snapshots.
# Usage: $ snp <commands>
# e.g.: $ snp pacman -Syyu
# Requirements: snapper (https://wiki.archlinux.org/title/snapper)
# The latest version of this script is hosted at https://gist.github.com/erikw/5229436
log_path="/var/local/log/snp"
date=$(date "+%Y-%m-%d-%H%M%S")
log_file="${log_path}/snp_${date}.log"
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 1, 2024 03:34
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname