Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am myroslav on github.
  • I am myroslav (https://keybase.io/myroslav) on keybase.
  • I have a public key ASAqtSmxyCfspSYf9PFVIS5ppRxeFKFIt2QNs0sf9NNFyQo

To claim this, I am signing this object:

@myroslav
myroslav / gist:6a8141538a263f647939
Last active August 29, 2015 14:07
Weather ratox oracle
#!/usr/bin/sh
tail -n0 -f text_out | while read line; do
address=${line:17:${#line}} # strip off date time
echo "Predicting weather at $address. Wait a moment and pick up the call!.." > text_in
curl -s --get --data-urlencode "query=$address" \
http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml | \
perl -ne '/<title>([^<]+)/&&printf "%s: ",$1;/<fcttext>([^<]+)/&&print $1,"\n"' | \
perl -MHTML::Entities -pe 'binmode(STDOUT, ":encoding(utf8)"); decode_entities($_);' | \
perl -MHTML::Entities -pe 'binmode(STDOUT, ":encoding(utf8)"); decode_entities($_);' | \
@myroslav
myroslav / gist:4be24340b14449bd7622
Created October 7, 2014 15:25
Echo ratox script
tail -n0 -f text_out >> text_in
@myroslav
myroslav / remotemic.sh
Last active August 29, 2015 14:07
"Remote Microphone" ratox script
while true; do while grep -q 0 call_pending; do inotifywait -t 60 -e modify call_pending; done; (cat call_out > /dev/null &); arecord -r 48000 -c 1 -f S16_LE >>call_in; done