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 | |
# Meeting note bash functions - include in your .bashrc file. | |
# Commands: | |
# note - Lists all past notes and their IDs. | |
# note help - This. | |
# note cd- Change your working directory to the notes storage folder | |
# note uncd - Change your working directory to the last working directory (useful for getting out of the notes storage folder) | |
# note new - Create a new note document. Will request user info then open it. |
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
# Bash Fidget Spinner | |
# Could also be included in a bashrc file | |
fidget() { | |
start_time="0.02"; | |
spin_efficiency="0.99"; | |
end_time="3"; | |
time="$start_time"; | |
printf "\e[92mPress any key to give another spin...\n\n"; |
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
// Added by Ben Yanke | |
// from https://gist.github.com/benyanke/862e446e5a816551928d8acc2d98b752 | |
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// SETUP | |
// urlToUse = in this environment variable, place the name of another environment variable which contains the key. | |
// This allows easy dev/prod switching. |
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
// SpiceWorks ticket autofill | |
// Autofills the ticket based on get variables in the URL of the ticket. | |
// This file is at: https://gist.github.com/benyanke/994ce01b938fd2d1eb9ec1a0ecb79b35 | |
// | |
// Also usable on sites at either of the following URLs. | |
// Original gist: | |
// https://gist.githubusercontent.com/benyanke/994ce01b938fd2d1eb9ec1a0ecb79b35/ | |
// | |
// Raw gist content: | |
// https://gist.githubusercontent.com/benyanke/994ce01b938fd2d1eb9ec1a0ecb79b35/raw/spiceworksTicketAutofill.js |
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
<script> | |
// ScrollTrack.js allows a function to be run once and only once if it's seen. | |
// Ben Yanke <[email protected]> | |
// SelectorToWatch - a standard jquery element selector | |
// functionToRun - a function to be run when the selector is on screen | |
function scrollWatch(selectorToWatch, functionToRun) { | |
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
#cloud-config | |
##################################### | |
# Nginx App Server Bootstrap script | |
# | |
# Includes network mount storage config | |
# Designed to be used in a cluster | |
# | |
# Created by Ben Yanke | |
# |
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
# Example SSH configuration file for bastion host SSH passthrough | |
# These lines would go in a file such as ~/.ssh/config | |
# No keys are exposed to `middleman` or `home`, they only proxy the encrypted traffic. | |
######################### | |
# Basic example | |
######################### | |
Host middleman |
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 | |
# Run this in cron to keep services running if they crash or are killed | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
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
# Description: Boxstarter Script | |
# Author: Jess Frazelle <[email protected]> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
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 | |
sudo docker stop "portainer"; | |
sudo docker rm "portainer"; | |
sudo docker run -d \ | |
--publish 9000:9000 \ | |
--label "hiddden" \ | |
--volume /var/run/docker.sock:/var/run/docker.sock \ | |
--volume /opt/portainer/data:/data \ |