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
Byobu is a suite of enhancements to tmux, as a command line
tool providing live system status, dynamic window management,
and some convenient keybindings:
F1 * Used by X11 *
Shift-F1 Display this help
F2 Create a new window
Shift-F2 Create a horizontal split
Ctrl-F2 Create a vertical split
Ctrl-Shift-F2 Create a new session
@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 / boxstarter_newtelco.ps1
Last active February 24, 2020 04:59
Newtelco Windows Setup Script [boxstarter, choco, PS3.0+]
###################################################
#
# Newtelco Windows PC Setup Script
# Author: ndomino@newtelco.de
# Date: 05.04.19
#
###################################################
# Install Boxstarter (run in a PowerShell (Administrator) shell)
Set-ExecutionPolicy RemoteSigned
@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