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
# | |
# Working through some examples from python 3 asyncio docs | |
# | |
# https://docs.python.org/3/library/asyncio.html#module-asyncio | |
# | |
import asyncio | |
import random | |
import time |
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 | |
touch ~/.hushlogin | |
( | |
cat <<'EOF' | |
set expandtab | |
set ts=4 | |
set background=dark | |
set nu | |
syntax on | |
EOF |
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
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; fi | |
BANG | |
reboot: Need to be root | |
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; fi | |
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; fi | |
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; fi | |
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; fi | |
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; fi | |
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; fi | |
[michael@c65docker ~]$ let "shot = $RANDOM % 6" ; if [ $shot == 0 ] ; then echo "BANG" && reboot ; 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
/* | |
A quick demo program to show Syslog facilities | |
Send "typical" log messages to facility local0. | |
Send "special" log messages to facility local3. | |
Sample syslog-ng config extract to go with this: | |
# This is not a complete syslog-ng config, just additions | |
# needed for a quick test. If your system has a different |