View launch_wait.sh
#!/bin/bash
HOST="$1"
PORT="$2"
RUNNING=1
while [[ $RUNNING -ne 0 ]]; do
echo "Waiting for $HOST:$PORT..."
sleep 3
nc -z "$HOST" "$PORT"
View find_port.bash
#!/bin/bash
if [[ -z $2 ]]; then
echo "$0 SUBNET PORT"
exit -1
fi
CLASSC="$1"
PORT="$2"
View setup.py
import os
def all_files(newroot, oldroot):
fdtuples = []
for root, dirs, files in os.walk(oldroot):
fds = []
for fd in files:
if not fd[0] is '.':
fds.append(os.path.join(root, fd))
View sysctl.conf
kernel.panic = 5
View test_logging.py
import logging
RED='\033[0;31m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
NC='\033[0m'
logger = logging.getLogger('myapp')
logfile = logging.FileHandler('warnings.log')
View fx_spotlight - Alarm 0
self.fadeIn += fadeStep;
if(fadeIn < fadeMax) {
alarm[0] = fadeSpeed;
}
View syndicate_data.py
#!/usr/bin/python
import MySQLdb
import csv
from boto.s3.connection import S3Connection
from boto.s3.key import Key
query = "\
select id, name, gross_amt \
from cafeteria \
View NES30 Keyboard Map - Player 1
DPAD Up -> c
DPAD Down -> d
DPAD Left -> e
DPAD Right -> f
L Analog Left -> Left Arrow
L Analog Right -> Right Arrow
L Analog Up -> Up Arrow
L Analog Down -> Down Arrow
View convert_mp4.bash
#!/bin/bash
DEST_DIR="/home/iPod"
FULL_PATH="$1"
ALBUM=$(basename "$FULL_PATH")
NEW_PATH="$DEST_DIR/$ALBUM"
echo "Transcoding into $NEW_PATH"
mkdir "$NEW_PATH"
View send_io.sh
#!/bin/sh
curl -H 'X-AIO-Key: feedfacedaedbeef' -H 'Content-Type: application/json' -X POST https://io.adafruit.com/api/feeds/myfeedname/data.json -d'{"value": 17}'