Skip to content

Instantly share code, notes, and snippets.

View diffficult's full-sized avatar
💽
the big switcharoo

reese diffficult

💽
the big switcharoo
View GitHub Profile
@siduck
siduck / migrate.sh
Last active September 11, 2024 11:18
Migrate from v2.0 to v2.5 ( Unix Only )
#!/bin/bash
# Run the script from home dir
cd ~
nvim_config="$HOME/.config/nvim"
nvim_data="$HOME/.local/share/nvim"
cp -r "$nvim_config" nvim_bak # backup nvim dir
cp -r "$nvim_config/lua/custom" .
@sgarciav
sgarciav / pass.md
Last active September 12, 2024 20:04
Initialize your password store

About

Summarizing the instructions of the pass tool (as seen on its website).

Getting Started

Installation

Execute: $ sudo apt install pass

ffmpeg -rtsp_transport tcp \
-i rtsp://smartiptv:PASSWORD@192.168.2.3:6911/Streaming/Channels/101 \
-i rtsp://smartiptv:PASSWORD@192.168.2.3:6911/Streaming/Channels/201 \
-i rtsp://smartiptv:PASSWORD@192.168.2.3:6911/Streaming/Channels/301 \
-i rtsp://smartiptv:PASSWORD@192.168.2.3:6911/Streaming/Channels/401 \
-filter_complex "
nullsrc=size=1920x1080 [base];
[0:v] setpts=PTS-STARTPTS, scale=960x540 [upperleft];
[1:v] setpts=PTS-STARTPTS, scale=960x540 [upperright];
[2:v] setpts=PTS-STARTPTS, scale=960x540 [lowerleft];
@bst27
bst27 / gitea-backup.sh
Created August 18, 2020 07:15
A Gitea backup script for Docker: It creates a .zip backup of Gitea running inside Docker and moves the backup file to the current working directory.
#!/bin/bash
# This script creates a .zip backup of gitea running inside docker and copies the backup file to the current working directory
echo "Creating gitea backup inside docker containter ..."
docker exec -u git -it -w /tmp $(docker ps -qf "name=gitea_server_1") bash -c '/app/gitea/gitea dump -c /data/gitea/conf/app.ini --file /tmp/gitea-dump.zip'
echo "Copying backup file from the container to the host machine ..."
docker cp $(docker ps -qf "name=gitea_server_1"):/tmp/gitea-dump.zip /tmp
@sinbad
sinbad / backup_gitea.sh
Created August 9, 2020 14:58
My Gitea Backup & Restore Scripts
#!/bin/bash
# `gitea dump` doesn't currently back up LFS data as well, only git repos
# It primarily backs up the SQL DB, and also the config / logs
# We'll backup like this:
# * "gitea dump" to backup the DB and config etc
# * tar / bzip all the repos since they will be skipped
# * Not rotated because git data is immutable (normally) so has all data
# * rsync LFS data directly from /volume/docker/gitea/git/lfs
# * No need for rotation since all files are immutable
@Lili1228
Lili1228 / convert.sh
Last active September 1, 2023 17:54
Convert Manjaro to Arch
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
#
# Tested on freshly installed Manjaro 22.0.5 Gnome.
pamac build trizen
cat >/tmp/convert.sh <<EOF
pacman -Qq | grep pamac | xargs pacman -Rs --noconfirm manjaro-application-utility
pacman -Rdd manjaro-release bashrc-manjaro manjaro-keyring python-manjaro-sdk
pacman -U https://www.archlinux.org/packages/core/x86_64/{lsb-release,pacman{,-mirrorlist}}/download/
mv /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active September 19, 2024 03:25
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@pamolloy
pamolloy / README.md
Last active January 23, 2024 07:28
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@pablokbs
pablokbs / docker-raspberry.md
Last active April 21, 2024 04:31
Docker en raspberry