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 | |
if [ $# = 0 ] | |
then | |
self=`basename $0` | |
echo "Execute a command on multiple servers." | |
echo | |
echo "1. Basic Usage" | |
echo | |
echo " $self server1 [server2 ...] command" |
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 | |
export DISPLAY=:0 | |
raspi2png --pngname /run/user/1000/snapshot.png | |
feh --fullscreen --hide-pointer /run/user/1000/snapshot.png & | |
sleep 1 | |
pkill -9 pwom & |
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 | |
pwomxplayer -A udp://239.0.1.23:1234?buffer_size=1200000B > /dev/null 2>&1 & | |
sleep 10 | |
pkill feh > /dev/null 2>&1 & |
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
[centervizwall] | |
width=190 | |
height=66 | |
x=0 | |
y=0 | |
# Corresponding tile definitions | |
[vizwall-00] | |
wall=centervizwall | |
width=37 |
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
# Manually, Force update a service (making sure its running on node named as "vox") | |
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632249, 'Type': 'service', 'timeNano': 1536632249122423813} | |
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest', 'updatestate.new': 'updating'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632249, 'Type': 'service', 'timeNano': 1536632249127300410} | |
{'Actor': {'Attributes': {'name': 'uosvc-mohitsharma44-excalibur_ubuntu_latest', 'updatestate.new': 'completed', 'updatestate.old': 'updating'}, 'ID': 'kba52nqpsj4l50svf8sbezzir'}, 'Action': 'update', 'scope': 'swarm', 'time': 1536632260, 'Type': 'service', 'timeNano': 1536632260078772980} | |
# Rebooting the worker node "vox" | |
{'Actor': {'Attributes': {'state.old': 'ready', 'name': 'vox', 'state.new': 'down'}, 'ID': 'dp10x59efw44pn0mkflzcqy7s'}, 'Ac |
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 | |
echo "Its getting hot in here, need some cooling!" | |
ssh kubemaster "sudo echo '26' > /sys/class/gpio/export" | |
ssh kubemaster "sudo echo 'out' > /sys/class/gpio/gpio26/direction" | |
ssh kubemaster "sudo echo '0' > /sys/class/gpio/gpio26/value" | |
echo "Fans Turned On!" | |
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 | |
if [ $# = 0 ] | |
then | |
self=`basename $0` | |
echo "Execute a command on multiple servers." | |
echo | |
echo "1. Basic Usage" | |
echo | |
echo " $self server1 [server2 ...] command" |
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
# Use this instead of -a when backing up to NFS drive since the NFS server | |
# doesn't always have same UID or GID as the system that the drive is mounted on. | |
# This will preserve time but not ownership | |
rsync -rlptDP --ignore-existing source/ dest/ |
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
( zcat $( ls -tr /var/log/apt/history.log*.gz ) ; cat /var/log/apt/history.log ) | egrep '^(Start-Date:|Commandline:)' | grep -v aptdaemon | egrep '^Commandline:' | grep -o 'install.*' | cut -f2- -d' ' > installed_packages.txt |
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 | |
# | |
# Ansible role test shim. | |
# | |
# Usage: [OPTIONS] ./tests/test.sh | |
# - distro: a supported Docker distro version (default = "centos7") | |
# - playbook: a playbook in the tests directory (default = "test.yml") | |
# - cleanup: whether to remove the Docker container (default = true) | |
# - container_id: the --name to set for the container (default = timestamp) | |
# - test_idempotence: whether to test playbook's idempotence (default = true) |