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
Does not protect my liability if the chicken dance causes death. |
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 | |
endcolor="\033[1;31m" | |
innercolor="\033[1;33m" | |
nocolor="\033[0m" | |
charge_now=$(cat /sys/class/power_supply/BAT0/charge_now) | |
charge_full=$(cat /sys/class/power_supply/BAT0/charge_full) | |
percent=$(echo "scale=2; ( $charge_now / $charge_full ) * 100" | bc | sed 's/\(.*\).../\1/g') | |
bars=$(echo "($percent / 20) + 1" | bc) |
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
#include <stdio.h> | |
#include "card.h" | |
#include "deck.h" | |
#include "hand.h" | |
void print_rank(card_t hand[]) | |
{ | |
switch (rank_hand(hand)) { | |
case HIGHCARD: | |
printf("High Card"); |
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 | |
MPD_HOST=192.168.0.105 | |
MPC=/usr/bin/mpc | |
NOISY_SHIT='Cowboy Bebop/Cowboy Bebop OST 1 - Cowboy Bebop/01 - Tank!.mp3' | |
CHECK_URL="http://flying.sexsnak.es/alarmclockdisable" | |
CHECK_FILE="/root/.alarmclockdisable" | |
check_disabled() { |
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 | |
BODY="$1" | |
if [ -z "$1" ]; then | |
BODY="/proc/uptime" | |
fi | |
{ | |
echo -ne "HTTP/1.0 200 OK\r\nContent-Length: $(wc -c $BODY | egrep -o '^[0-9]+')\r\nContent-Type: $(file -b --mime-type $BODY)\r\n\r\n" | |
cat $BODY | |
} | nc -l 8080 -v |
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 | |
# Usage: t.sh [minutes] | |
# default is 5 minutes | |
minutes=5 | |
arg=$( echo "${1}" | grep -o '[0-9]*' | head -1 ) | |
if [ -n "${arg}" ]; 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
#!/bin/bash | |
mkdir olypics/ | |
curl http://192.168.0.10/get_imglist.cgi?DIR=/DCIM/100OLYMP | cut -d, -f2 | grep 'JPG$' | while read file; do | |
echo "Downloading ${file}..." | |
curl -so olypics/${file} "http://192.168.0.10/DCIM/100OLYMP/${file}" | |
done |