Chit chat

————-

Check out Google books before getting an ebook. you might be able to read it on Google.

Found the digital tuner card in the closet. Time to rebuild the MythTv server.

Taxpayers inf Fort Bend county Texas are beginning to complain about taxpayer funds being use to Apple Ipads.

Made a cable to hook up the lcd.

SUNP0006

Linux Instructables: http://www.instructables.com/id/Linux-themed-instructables/

Real metak paperclips make good cables ends for plugging into a breadboard.

SUNP0005

———————————————————————

Page scraper that needs to be fixed:

http://www.phpkode.com/scripts/item/score-scraper/

———————————————————————

Emergency Usb condom.

Screenshot from 2013-09-22 23:58:26.png
Screenshot from 2013-09-22 23:26:08.png
Connecting your phone or other computing device to an unknown usb port could get your device hacked. Protect yourself with a usb condomso data lines do not get connected to a nefarious host while charging. getting an usb extender bable from the dollar store is the easiest way to statr making one.

———————————————————————

Set up a legacy mswindows wifi card in linux..(Make sure your card was installed properly while the machine was off.)

Download and extract the mswindows drivers for the card

Screenshot from 2013-09-16 19:37:36

Unzip the files to a local directory

$ unzip aw*

Fw1130.bin FwRad17.bin radio17.bin TNET1130.INF
FwRad16.bin radio16.bin tnet1130.cat tnet1130.sys

Install the interfacing software.

$ sudo apt-get install ndiswrapper-common ndiswrapper-utils-1.9 install ndiswrapper-dkms

To see if your card is tetected.

$ lspci

00:0b.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface

$ sudo modprobe  ndiswrapper

wlan1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DORMANT qlen 1000

Install wifi card driver (driver will usually be a .INF file

$ sudo ndiswrapper -i TNET1130.INF

$ ndiswrapper -l

tnet1130 : driver installed
device (104C:9066) present

Set ip ip for the card

$ ip addr

link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff

Check the current config of your card.

$ iwconfig

wlan1 IEEE 802.11g ESSID:off/any
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Bit Rate:54 Mb/s Tx-Power:10 dBm Sensitivity=0/3
RTS thr:off Fragment thr:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

From here you should be able to configure your card.

———————————————————————

Couple of simple clocks. Great for gining an old pc something to do for grins. Actually I was running these two programs from the nslu2 arm based unit running de4bian linux.

To install:

$ sudo apt-get install sysvbanner figlet

If your system sdoest not have figlet you can get it from the web.

$ wget ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz
$ tar zxvf  figlet-2.2.5.tar.gz
$ cd figlet-2.2.5/
$ make
$ sudo make install

:Usage:

watch -tn 1 date +%T \|figlet -c

or

watch -t -n 1 “date +%T | xargs banner”

Screenshot from 2013-09-16 22:54:24 Screenshot from 2013-09-16 22:55:07

———————————————————————

Weather report.

My stepfather was into meteorology. In fact he was a weatherman in the military, He got us into it. So I like to looke at a minimal weather report. Batch files make it easier for servers to display data as needed. Have an nslu2 running linux with very low resources. So a batch file is perfect for grabbing data off the web. You can also use it for mobile devices.  That also means you can insert the data grabbed into a database for later research,

Actually I have been doing weather scraping for a while, This is probably almost the tenth script I have written.  From the command line it might look like this:

~$ ./gwp2.sh 22546
The weather for 22546 on Sep 19:
   Updated: 7:05 AM EDT on September 19, 2013
   Observed at Mantico Hill, Beaverdam, Virginia
   Temperature         47.8°F / 8.8°C
   Humidity            98%
   Dew Point           47°F / 8°C
   Windchill           48°F / 9°C
   Wind Gust           0.0 mph / 0.0 km/h
   Pressure            30.19 in / 1022 hPa (Rising)
   Conditions          Mostly Cloudy
   Visibility          10.0 miles / 16.1 kilometers
   UV                  0.0 out of 16
   Clouds              Mostly Cloudy (BKN) : 5500 ft / 1676 m
   Yesterday's Maximum 74°F / 23°C
   Yesterday's Minimum 49°F / 9°C
   Sunrise             6:55 AM EDT
   Sunset              7:11 PM EDT
   Moon Rise           7:09 PM EDT
   Moon Set            7:01 AM EDT
   Moon Phase          Moon Phase
                       Full Moon
   Raw METAR           METAR KEZF 191055Z AUTO 00000KT 10SM BKN055 10/10 A3019 RMK AO2 T00950095

~$

The script to grab the data is fairly straight forward.  You pull the whole page off the web and then extract data as needed.

 zip=$1
 tmon=$(date +"%b")
 tday=$(date +"%d")
 echo "The weather for $zip on $tmon $tday:"
 lynx -width 1000 -dump "http://m.wund.com/cgi-bin/findweather/getForecast?brand=mobile&query=$zip" > weather
 cat weather | grep "Updated"
 cat weather | grep "Observed"
 cat weather | grep "Temperature"
 cat weather | grep "Humidity"
 cat weather | grep " Dew Point"
 cat weather | grep "Wind" | head -1
 cat weather | grep "Wind Gust" | head -1
 cat weather | grep "Pressure"
 cat weather | grep "Conditions" | head -1
 cat weather | grep "Visibility"
 cat weather | grep "UV"
 cat weather | grep "Clouds"
 cat weather | grep "Yesterday's Maximum"
 cat weather | grep " Yesterday's Minimum"
 cat weather | grep "Sunrise"
 cat weather | grep "Sunset"
 cat weather | grep "Moon Rise"
 cat weather | grep "Moon Set"
 cat weather | grep -A1 "Moon Phase"
 cat weather | grep "Raw METAR"
 

Hope this lille program helps someone.

Server version:

zip=$1
tmon=$(date +”%b”)
tday=$(date +”%d”)
echo “The weather for $zip on $tmon $tday:”
lynx -width 1000 -dump “http://m.wund.com/cgi-bin/findweather/getForecast?brand=mobile&query=$zip&#8221; > /tmp/weather
cat /tmp/weather | grep “Updated”
cat /tmp/weather | grep “Observed”
cat /tmp/weather | grep “Temperature”
cat /tmp/weather | grep “Humidity”
cat /tmp/weather | grep ” Dew Point”
cat /tmp/weather | grep “Wind” | head -1
cat /tmp/weather | grep “Wind Gust” | head -1
cat /tmp/weather | grep “Pressure”
cat /tmp/weather | grep “Conditions” | head -1
cat /tmp/weather | grep “Visibility”
cat /tmp/weather | grep “UV”
cat /tmp/weather | grep “Clouds”
cat /tmp/weather | grep “Yesterday’s Maximum”
cat /tmp/weather | grep “Yesterday’s Minimum”
cat /tmp/weather | grep “Sunrise”
cat /tmp/weather | grep “Sunset”
cat /tmp/weather | grep “Moon Rise”
cat /tmp/weather | grep “Moon Set”
cat /tmp/weather | grep -A1 “Moon Phase”
cat /tmp/weather | grep “Raw METAR”

———————————————————————

Script to grab the weekly horoscope.

# Get the weekly horoscope
echo “——————————————–”
# character width
cw=60
hsign=$1
if [ $# -lt “1” ];
then hsign=”Virgo”
fi
hsign=”`echo $hsign|tr ‘[a-z]’ ‘[A-Z]’`”
cat ~/signs/$hsign
echo -n “Today’s date: ”
date +%D
echo “Weekly horoscope for:”
lynx -width 1000 -dump “http://www.creators.com/lifestylefeatures/horoscopes/holiday-mathis-weekly.html&#8221; | grep $hsign | fold -sw $cw
echo “——————————————–”

———————————————————————

Real geeks can cook. Decided to make a pizza rather than order one in. You can get yeast that does not need any rising time.

Screenshot from 2013-09-09 20:21:08

But the I realized I was out of sauce so we made the red sauce.

Screenshot from 2013-09-09 17:37:01

But then I remembered  there was no cheese either. milk to the rescue.

Screenshot from 2013-09-09 19:22:13

Everything you needed for pizza. But what to do with the milk whey left over from the cheese making. no problem we just made polenta. We made of pot of it for what the stores sell a small tube.

SUNP0099

If course we used the extra red sauce and cheese for the topping on the polenta. We also added green peas for color. Hmmm good.

Good day.

Advertisements