Skip to content

Instantly share code, notes, and snippets.

View spod's full-sized avatar

Michael C spod

  • Vancouver, Canada
View GitHub Profile
#
# 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
@spod
spod / usual.sh
Created July 17, 2015 22:51
usual.sh
#!/bin/bash
touch ~/.hushlogin
(
cat <<'EOF'
set expandtab
set ts=4
set background=dark
set nu
syntax on
EOF
[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
@spod
spod / test.c
Created November 2, 2012 06:03
syslog blah
/*
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