Skip to content

Instantly share code, notes, and snippets.

View ndom91's full-sized avatar

Nico Domino ndom91

View GitHub Profile
@ndom91
ndom91 / byobuCommands
Created April 6, 2018 04:51 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
@ndom91
ndom91 / Documentation.md
Created September 23, 2018 17:39 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@ndom91
ndom91 / gist:751514c408824113871897543b60e853
Created May 25, 2019 10:12 — forked from vasekch/gist:8e71a93a16881415e5afbd20c6331163
Ubuntu 16.04 Mikrotik L2TP VPN settings
Install l2tp support
sudo add-apt-repository ppa:nm-l2tp/network-manager-l2tp
sudo apt-get update
sudo apt-get install network-manager-l2tp
sudo apt-get install network-manager-l2tp-gnome
https://askubuntu.com/a/898086
@ndom91
ndom91 / NOTES.md
Last active May 31, 2019 21:09
Remap ESC -> CAPS (Distro Agnostic)

Replace Caps Lock with Esc

Use setxkbmap to remap the key (does not require a daemon and is independant of your desktop environment or window manager). Don't forget to add the command before the exec gnome-session (or similar) line in your ~/.xinitrc or ~/.xsession.

setxkbmap -option caps:escape

setxkbmap can be found in extra/xorg-setxkbmap.

@ndom91
ndom91 / haste.sh
Created June 2, 2019 20:18
Hastebin
haste () {
local output returnfile contents
if (( $# == 0 )) && [[ $(printf "%s" "$0" | wc -c) > 0 ]]
then
contents=$0
elif (( $# != 1 )) || [[ $1 =~ ^(-h|--help)$ ]]
then
echo "Usage: $0 FILE"
echo "Upload contents of plaintext document to hastebin."
echo "\nInvocation with no arguments takes input from stdin or pipe."
@ndom91
ndom91 / clean-up-boot-partition-ubuntu.md
Created June 21, 2019 09:29 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@ndom91
ndom91 / ignore_dsstore_globally.sh
Created August 16, 2019 07:27
Global .gitignore - .DS_Store
#!/bin/bash
echo ".DS_Store" >> ~/.gitignore_global
echo "._.DS_Store" >> ~/.gitignore_global
echo "**/.DS_Store" >> ~/.gitignore_global
echo "**/._.DS_Store" >> ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
@ndom91
ndom91 / docker-cleanup-resources.md
Created August 16, 2019 12:08 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

Keybase proof

I hereby claim:

  • I am ndom91 on github.
  • I am ndom91 (https://keybase.io/ndom91) on keybase.
  • I have a public key ASA3MSQKIrqQiITYVsGg53m4vA19Qqep5keWNPEd3WJbkAo

To claim this, I am signing this object: