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
//purpleposeidon@gmail.com | |
//Mar 15 2011 | |
//Checks the battery level every so often, and writes a color code escape sequence to ~/.battery_color | |
//compile this program, have it run at startup: | |
// crontab -e | |
// @reboot /home/USER/bin/batcolor | |
//Or something | |
//Change PS1 to cat ~/.battery_color in .bashrc | |
//Here's mine: |
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> | |
int rgb(int r, int g, int b) { | |
return 16 + r*36 + g*6 + b; | |
} | |
int main() { | |
for (int r = 0; r < 6; r++) { | |
for (int g = 0; g < 6; g++) { | |
for (int b = 0; b < 6; b++) { | |
printf("\e[38;5;%dm", rgb(r,g,b)); |