Skip to content

Instantly share code, notes, and snippets.

View YenLegion's full-sized avatar

Bad Vibes YenLegion

View GitHub Profile
@gnzsnz
gnzsnz / ssh_config.md
Last active October 2, 2023 12:49
SSH client config
@4abhinavjain
4abhinavjain / reinstall_VPS_from_inside.txt
Last active July 13, 2024 15:34 — forked from ClashTheBunny/reinstall_VPS_from_inside.sh
DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64
# should works on any cloud-init enabled hypervisor (openstack.. )
# start from a normal ubuntu 20.04 install as minimal was not available for ARM64
# Since ARM64 machines has higher RAM, Shrinking is desired but not necessary. Instead we will increase tmpfs to 1700MB
# Getting root (if sudo -i doesn't work then set a root password beforehand using 'sudo passwd root'
sudo -i
# make sure we are on the highest kernel, so we can delete all the others ...
@zax4r0
zax4r0 / youtube-dl.md
Created October 30, 2021 17:19 — forked from harishkannarao/youtube-dl.md
youtube-dl

youtube-dl

youtube-dl is an opensource command line tool to download video or audio from online video streaming services.

Videos downloaded in mkv or webm extensions can be played by VLC Media player in all major devices and operating systems including iPhone, Android devices.

Tool website: https://youtube-dl.org/

This gist shows the example commands to use the tool and doesn't support or encourage piracy or violation of copyrights of the online streaming service or the author of the content

Installing youtube-dl:

@eizedev
eizedev / treestyletab.css
Created June 11, 2021 10:20
Firefox Tree Style Tab CSS - Collapsible
/* Hide border on tab bar, force its state to 'scroll', adjust margin-left for width of scrollbar.
#tabbar {
border: 0;
overflow-y: scroll !important;
margin-left: -18px !important;
}
*/
/* Hide .twisty and adjust margins so favicons have 7px on left. */
.tab .twisty {

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@Bapannarama
Bapannarama / add_pia_ovpn_profiles.sh
Created January 3, 2021 16:29
A small script to add OpenVPN profiles from PrivateInternetAccess to networkmanager
#!/bin/bash
echo -n "PIA username (pNNNNNNN): "
read pia_username
echo -n "PIA password: "
read -s pia_password
echo ""
echo -n "OpenVPN config files location (blank for current directory): "
@swuecho
swuecho / proxmox-import-disk-image.txt
Created August 12, 2020 00:56
Add import existing disk image into Proxmox
#
# The official PVE docs on how to prepare cloud-init templates:
# https://pve.proxmox.com/wiki/Cloud-Init_Support#_preparing_cloud_init_templates
#
# Additional guides and resources:
# https://dae.me/blog/2340/how-to-add-an-existing-virtual-disk-to-proxmox/
# https://pve.proxmox.com/pve-docs/qm.1.html
# use the Qemu/KVM Virtual Machine Manager to import the disk
qm importdisk 107 Univention-App-kopano-core-KVM.qcow2 local-lvm
@olets
olets / zsh-plugin-manager-plugin-installation-procedures.md
Last active May 18, 2024 21:40
zsh plugin manager cross-reference

Instructions for installing zsh plugins, for a variety of plugin managers

  • antibody: Add <owner>/<repo> to your plugins file. If you use static loading update the sh.

  • Antigen: Add antigen bundle <owner>/<repo> to your .zshrc.

  • Oh-My-Zsh:

    • Clone to OMZ's plugins' directory:
@tdcosta100
tdcosta100 / WSL2GUIXvnc-en.md
Last active July 27, 2024 16:30
A tutorial to use GUI in WSL2 replacing original XServer by Xvnc, allowing WSL to work like native Linux, including login screen

WSL2 with GUI using Xvnc

Note

If you want to use pure WSLg, you can try the new WSLg tutorial.

In this tutorial, we will setup GUI in WSL2, and access it using VNC. No additional software outside WSL (like VcXsrv) is required, except, of course, a VNC Viewer (RealVNC, TightVNC, TigerVNC, UVNC, etc, all of them might work flawlessly).

The key component we need to install is the desktop metapackage you want (GNOME, KDE, Xfce, Budgie, etc) and tigervnc-standalone-server.

For this setup, I will use Ubuntu (20.04, 22.04 and 24.04 are working), and install GNOME Desktop. Since the key components aren't bound to Ubuntu or GNOME, you can use your favorite distro and GUI. Check the Sample screenshots section for examples.