This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Tom Hale, 2016. MIT Licence. | |
| # Print out 256 colours, with each number printed in its corresponding colour | |
| # See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163 | |
| set -eu # Fail on errors or undeclared variables | |
| printable_colours=256 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| # Prevent script from being run as root | |
| if [[ "$(id -u)" == 0 ]]; then | |
| echo "ERROR: This script must NOT be run as root. Please run it as a normal user." | |
| exit 1 | |
| fi | |
| mkdir -p ~/tools && cd ~/tools | |
| if [ ! -d dpdk-stable ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| GrubConfigFile="/etc/default/grub.d/50-cloudimg-settings.cfg" | |
| VERBOSE=1 | |
| # Parse arguments | |
| for arg in "$@"; do | |
| case "$arg" in | |
| --verbose) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -e | |
| # Prevent script from being run as root | |
| if [[ "$(id -u)" == 0 ]]; then | |
| echo "ERROR: This script must NOT be run as root. Please run it as a normal user." | |
| exit 1 | |
| fi | |
| Distro=$(awk -F= '/^NAME/{print tolower($2)}' /etc/os-release) | |
| VersionID=$(awk -F= '/^VERSION_ID/{print $2}' /etc/os-release) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [core] | |
| editor = vim | |
| autocrlf = false | |
| #pager = delta --theme="DarkNeon" --file-style=box | |
| [diff] | |
| wsErrorHighlight = all | |
| [alias] | |
| tree = log --all --graph | |
| unstage = reset HEAD -- | |
| discard = checkout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # KEY BINDINGS (Prefix is 'C-a') | |
| # | |
| # - `prefix + r` - reload tmux config | |
| # - `prefix + v` - capture text to vim !!! | |
| # - `prefix + I` - Installs new plugins | |
| # - `prefix + U` - Updates plugin(s) | |
| # - `prefix + C-s` - save tmux window layout | |
| # - `prefix + C-r` - restore tmux window layout | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt install ncurses-dev make build-essential unzip -y | |
| wget https://github.com/vim/vim/archive/master.zip | |
| unzip master.zip | |
| cd vim-master | |
| cd src/ | |
| ./configure | |
| make | |
| sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # scp-speed-test.sh | |
| # Author: Alec Jacobson alecjacobsonATgmailDOTcom | |
| # | |
| # Test ssh connection speed by uploading and then downloading a 10MB test | |
| # file (optionally user-specified size) | |
| # | |
| # Usage: | |
| # ./scp-speed-test.sh user@hostname [test file size in MBs] | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Modify .bashrc to startup the ssh agent | |
| tmpFile=/tmp/__setup.tmp | |
| cat > $tmpFile << 'BASHRC' | |
| # JBY-SSH-AGENT | |
| if [ -z "$SSH_AUTH_SOCK" ]; then | |
| # Check for a currently running instance of the agent | |
| RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| git clone https://github.com/vim-airline/vim-airline ~/.vim/pack/plugins/start/vim-airline | |
| git clone https://github.com/vim-airline/vim-airline-themes ~/.vim/pack/plugins/start/vim-airline-themes | |
| git clone https://github.com/scrooloose/nerdtree.git ~/.vim/pack/plugins/start/nerdtree | |
| git clone https://github.com/ConradIrwin/vim-bracketed-paste.git ~/.vim/pack/plugins/start/vim-bracketed-paste | |
| git clone https://github.com/markonm/traces.vim.git ~/.vim/pack/plugins/start/traces.vim | |
| git clone https://github.com/tpope/vim-fugitive.git ~/.vim/pack/plugins/start/vim-fugitive |