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/perl -wl | |
use strict; | |
use File::Glob ':glob'; | |
my $confdir = shift || "/etc/lighttpd/conf-enabled/"; | |
my $enabled = "users/*.conf"; | |
chdir($confdir); | |
my @files = bsd_glob($enabled); |
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 <standard-x11> | |
# Wireless firmware | |
firmware-linux | |
firmware-linux-nonfree | |
firmware-ralink | |
firmware-realtek | |
zd1211-firmware | |
firmware-atheros | |
firmware-intelwimax |
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
# Call me with your ssh options (and probably DISPLAY=YOUR_REMOTE_DISPLAY) | |
# This is actually NOT the way, but the dbus-monitor approach + ssh might come handy. | |
ssh $@ dbus-monitor --session|while read line; do echo $line | command grep ": " &>/dev/null && notify-send "Irssi" "$(echo $line|sed s/\"//g|sed s/string//g)"; 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
# This checks if we're connecting via ssh, gets dbus-daemon --session address and exports it. | |
[[ -n $SSH_CLIENT ]] && export $(cat /proc/$(command pgrep -u "$USER" -f -- "dbus-daemon --session" )/environ| tr '\0' '\n' | command grep "DBUS_SESSION_BUS_ADDRESS=") |
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
# Recommended by recordmydesktop manpage | |
recordmydesktop --windowid $(xwininfo | awk '/Window id:/ {print $4}') |
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
read -p "Press enter to select window" | |
tmp=$(mktemp); | |
recordmydesktop --windowid $(xwininfo | awk '/Window id:/ {print $4}') -o $tmp && { | |
read -p "Enter video category: " category | |
read -p "Enter video title: " title | |
read -p "Enter video summary" summary | |
google youtube post --title "$title" --summary "$summary" --category "Tech" $tmp | |
} |
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
# My dir structure is like this: | |
# Series name/ | |
# Season X/ | |
# Chapter | |
# So, this script get a random series and plays the lastest chapter | |
# This way, flexget gets all the tv series from me, and this command plays randomly the lastest chapter. | |
# Soon I'll add something like a read flag, or I'll check out the last file access, if last file access < 7 days, a new chapter is probably there! | |
a=(*); mplayer "$(find ${a[ $[ ( $RANDOM % ${#a[@]} ) + 1 ] - 1 ]}/*|tail -n1)" |
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
# This makes shell-fm download everything in ~/Music/<artist>-<title>.mp3 | |
# Then plays it with mplayer and software volume mixer, thus making volumne 10 times louder than usual max. | |
extern=tee ~/Music/%a-%t.mp3 | mplayer -really-quiet -softvol -softvol-max 1000 -volume 1000 -noconsolecontrols -demuxer lavf -lavfdopts format=mp3 - | |
np-cmd = lyricsdownloader --artist "%a" --songname "%t" 2> /dev/null > /tmp/lyrics.txt | |
# Then I execute a tail -f /tmp/lyrics.txt on another tmux split |
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
($ document).ready -> | |
(($ document) .find '.showoff') .live 'mouseover', () -> | |
h = (($ this).css 'height').replace 'px', '' | |
($ document) .data 'next_position', ($ this).position().top + h + 20 | |
($ document) .data 'launch_position', ($ this).position().top + (h / 2) | |
($ document).live 'scroll', (event) -> | |
if ((Number) ($ document).scrollTop() > ((Number) (($ document) .data 'launch_position')) | |
window.scrollTo(0, ($ document).data 'next_position') |
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
deluged & { flexget && sleep 1m && subdownloader -cli -l en; } & |