$ free -h
total used free shared buff/cache available
Mem: 31G 3.8G 7.1G 1.2G 20G 25G
Swap: 979M 0B 979M
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 | |
# Finds and kills the Pulse Secure VPN background service and UI. | |
if [[ $EUID -ne 0 ]]; then | |
echo -e "\e[1;41mThis script must be run as root.\e[0m" | |
exit 1 | |
fi | |
IDS=$(ps -ax | grep -i 'pulse[ui|svc]' | tr -s ' ' | sed 's/^ *//g' | cut -d ' ' -f 1) |
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
# Remap prefix from 'C-b' to 'C-a'. | |
unbind C-b | |
set-option -g prefix C-a | |
bind-key C-a send-prefix | |
# Reload config file. | |
bind-key r source-file ~/.tmux.conf\; display ' Reloaded tmux config.' | |
# Split panes using | and -. | |
bind-key | split-window -h -c '#{pane_current_path}' |
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 | |
# If they're not installed, install with: | |
# sudo apt-get install default-jre | |
# sudo apt-get install default-jdk | |
echo -e "\e[1mJava Runtime Environment:\e[0m" | |
java --version | |
echo -e "\n\e[1mJava Development Kit:\e[0m" |
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
# Just adding the time to the start of the prompt, so I can tell when a command was run (roughly). | |
# Colours: https://misc.flogisoft.com/bash/tip_colors_and_formatting | |
export PS1="\e[2m\A\e[0m $PS1" | |
# Ansible (2.8 development branch) - comment out to get the regular Ansible version (2.7.8?). | |
source /home/username/repositories/ansible/hacking/env-setup |
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
#=============================================================================== | |
# Fonts, sizes and spaces | |
# (Tweak this if you choose other fonts, or want bigger text) | |
#------------------------------------------------------------------------------- | |
# | |
# The 'standard' fonts. | |
# Omit to use the builtin fonts, or specify a font family. | |
monofont Liberation Mono | |
monosize 16 |
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
# Requires: sudo apt install expect | |
$ unbuffer ansible-playbook debug.yml | tee logs/$(date "+%F_%T.%3N").log | |
# Will produce a filename like: logs/2018-12-21_17:49:57.771.log |
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 sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" >> /etc/apt/sources.list.d/pgdg.list' | |
sudo wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install postgresql-10 |