вторник, 1 ноября 2011 г.

What I can visit in Barstow,CA?

Info from middle of 2011:


* Calico Ghost Town

36600 Ghost Town Road
Yermo, CA  92398
Working time: 9am-5pm


* Route 66 Mother Road Museum,

681 N. First Avenue
Barstow, CA. 92311
760-255-1890
Working time: 10am-4pm


* the Western America Rail Museum,

685 North First Street
Barstow, CA 92311
Working time: 11am-4pm


* Mojave River Valley Museum.

270 Virginia Way
Barstow, CA 92311
760-256-5452
Working time: 11am-4pm


* the Desert Discovery Center.

831 Barstow Road
Barstow, CA 92311
Working time: 11am-4pm

четверг, 30 апреля 2009 г.

Twitter in Linux

Simple but suitable example using BASH + ZENITY:


#!/bin/bash
LANG=uk_UA.UTF-8 # convert locale UA to unicode
POST=$(zenity --title "My Twitter bot" --entry --text "В Twitter:" --width 500)
#Getting data
len=`echo "$POST" | wc -c` # getting text length
if [ $len -gt 140 ]; then
zenity --error --text="String too long: $len chars" # if more than 140 chars
POST=$(zenity --title "My Twitter bot" --entry --entry-text "$POST" --text
"You have $len chars, should be less:" --width 500)
#return to edit
fi

TEXT="$POST" #You can add additional options to this text
curl --basic --user login:password --data status="$TEXT" 'http://twitter.com/statuses/update.xml'
-o /dev/null | zenity --progress --title "Sending to Twitter"
--text="$TEXT" --auto-kill --auto-close

#Sending
zenity --info --title "Done" --text "$TEXT - length: $len chars added to twitter"


example source: http://gontsa.livejournal.com/#post-gontsa-33965