This file contains 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 | |
# Author: Paul Rafferty <[email protected]> | |
# Purpose: Finds, downloads and installs the latest upstream kernel for Ubuntu | |
# Note: If your host requires proprietary modules (eg: virtualbox, nvidia, fglrx, bcmwl etc) then | |
# you require the extra modules package which is not available here. You can try to uninstall | |
# these modules first before installing the upstream kernel. Otherwise, don't proceed - your | |
# new kernel probably won't boot. | |
# GIMME RIGHT NOW: curl -Ls https://goo.gl/VwBSVD | bash |
This file contains 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 | |
# Name: multisshrun | |
# Purpose: Runs a script on remote hosts over ssh, in defined batch sizes | |
help() { | |
cat <<EOF | |
$(basename ${0}) accepts a host list via stdin and expects a script name as an argument | |
It runs the script on all host in batches, controlled by -j or --jobs (default=4) |
This file contains 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
# PREP: | |
mkdir -p /tmp/telegraf_debug/{prometheus,statsd,telegraf} | |
# RUN TELEGRAF AGENT | |
cat <<EOF > /tmp/telegraf_debug/telegraf/telegraf.conf | |
[agent] | |
interval = "10s" | |
flush_interval = "10s" | |
debug = true | |
logfile = "/tmp/telegraf_debug/telegraf/telegraf.log" |
This file contains 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
# Bash completion script for k3d, because I couldn't find one. Do what you want with it. | |
# If you're using zsh, this script should work as long as you have these lines in .zshrc: | |
# | |
# autoload bashcompinit | |
# bashcompinit | |
# source /path/to/your/bash_completion_file | |
# | |
# functions to grab k3d clusters info [would be nice if k3d list had a simple mode for grabbing names] |
This file contains 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
# Run the FROM image interactively with the current directory mounted to /build_dir | |
# Eg, for python:3.8-alpine... | |
docker run -it -v /path/to/build_dir:/build_dir --entrypoint=/bin/sh python:3.8-alpine | |
# Once inside the container interactively, set up some functions that enable the shell to 'run' the Dockerfile | |
FROM() { | |
echo FROM $* | |
} | |
ENV() { |
This file contains 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 | |
# About: This script turns AppImages into regular old .deb files which install the app to /opt/${APP_NAME} and handle icons and .desktop file | |
fatal() { | |
echo $@ | |
exit 1 | |
} | |
[[ -x $(which fakeroot) ]] || fatal "Missing fakeroot. Run 'sudo apt-get install fakeroot'" |