Skip to content

Instantly share code, notes, and snippets.

@pgrepds
pgrepds / gist:7c9a7e29a8b649369951e2002a85a3d0
Last active October 9, 2024 11:12
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 June 18, 2024 08:19
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
@p3jitnath
p3jitnath / opencv-4.2.0-cuda-10.1-Ubuntu-20.04.md
Last active May 15, 2024 10:11
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_CUDA12.6_CUDNN8.9.md
Last active November 17, 2024 07:41
How to install OpenCV 4.10 with CUDA 12 in Ubuntu 24.04

Install OpenCV 4.10 with CUDA 12.6 and CUDNN 8.9 in Ubuntu 24.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 November 17, 2024 05:02
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 September 11, 2024 21:03
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 November 17, 2024 01:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname