Skip to content

Instantly share code, notes, and snippets.

@emilcarr
emilcarr / IleadsV.png
Last active December 19, 2024 23:18
Semester 1 Exam Formula Sheets
IleadsV.png
@emilcarr
emilcarr / gist:80ede3959b28c2b568d1c521b0159647
Created November 12, 2024 17:47
Install MATLAB addons as root
# For some reason giving group permission to read/write MATLAB install dir isn't enough
# Do this to get the command then run as rot (sudo)
ps -eo cmd | grep AddOnInstaller | head -n 1
@emilcarr
emilcarr / scanning.md
Last active April 5, 2024 13:51
List of useful scanning tools
@emilcarr
emilcarr / FFMPEG.md
Last active May 28, 2021 13:05
ffmpeg commands cheatsheet

FFMPEG cheatsheet

Convert video for twitter

Twitter only works with videos with AAC audio, YUV 4:2:0 pixel format and an aspect ratio between 1:3 and 3:1, according to their developer docs

ffmpeg -i input_video.mp4 -c:a aac -c:v libx264 -filter:v "format=yuv420p" output_video.mp4

Audio over a static image

#!/bin/bash
# /etc/cron.d/mysql_watch_online
# Test the database connection and restart on failure
mysql -e '\q'
if [ $? != 0 ]; then
echo `systemctl status mysql` | mail -s "MySQL Databse experience issues | `hostname`" [email protected]
systemctl restart mysql
fi
SUBSYSTEM=="i2c-dev", ACTION=="add",\
ATTR{name}=="NVIDIA i2c adapter*",\
TAG+="ddcci",\
TAG+="systemd",\
ENV{SYSTEMD_WANTS}+="ddcci@$kernel.service"
@emilcarr
emilcarr / GNOME.md
Last active September 11, 2024 21:43
Minimal GNOME Shell Setup and environment

Minimal GNOME Shell Setup

GNOME is nice, but it comes with a lot of packages by default. You may wish to install a more lightweight version.

screenshot of this setup

Packages

@emilcarr
emilcarr / sxhkdrc
Created March 17, 2021 22:06
sxhkd config to take a screenshot and copy it to the x clipboard
Print
scrot -s ~/Pictures/%d-%m-%y_%h-%m-%T_$wx$h_scrot.png -e 'xclip -selection clipboard -target image/png -i $f'
@emilcarr
emilcarr / $urxvt-nvim.md
Last active June 5, 2024 20:59
urxvt and vim setup for productivity

urxvt and nvim Setup for Productivity

Install nvim, urxvt and zsh:

Arch:

# pacman -S neovim rxvt-unicode zsh wl-clipboard

Debian:

@emilcarr
emilcarr / INDEX.md
Last active May 28, 2021 13:06
Index of all my gists and other bookmarks