Home

Almost xmas!

Leave a comment

Chit chat

========

Upgraded two machines to ubuntu 14,04. Desktop video capture and other issues. ugh,

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

Cartoons:

 

 

————————————————–

Legacy way to combine text and a graphic.

<table>
<tr>
<td><img src=”prof.png” alt=””></td>
<td>06/01/2008 The Info pages are done <br> 06/09/2008 Locally on-line as of 03/05/2008 <br> 06/08/2009 Some web pages updated <br> 06/30/2010 Redoing student services web pages. <br> 09/15/2014 Menus are restructured
</td>
</tr>
</table

———————————–

Good job for an old computer to get videos from youtube. Data flle consists of lines like this (without spaces):

https ://www.youtube.com/watch?v = 3kJXbXhEPrk
https ://www.youtube.com/watch?v = yxAhrUAvjo0
http ://www.youtube.com/watch?v = 9DTjssGms8I
https ://www.youtube.com/watch?v = ACsy6xSIBm8

The code:

———————————–

One of the questions I get is that what software may I use to replace the programs that I used on my old system. Personally, I have been off of proprietary software such as Microsoft systems for more than seven years and have not looked back.  Well here is a table that might help.  By the way, this list is by no means exhaustive.

By the way:  Thanx to Troy R. Schulz who compiled this list.

MSWindows Application

Open Source Application

Adobe Acrobat Reader
KPDF

People want to be able to view PDF files quickly and easily. We usually recommend KPDF, but if someone uses Google Apps for Business they can view PDF’s right in their Chrome Browser.


Adobe Illustrator, CorelDRAW!
Inkscape

Some of our customers (including myself) do vector graphic design. Some are sign shops. Honestly, most use Corel Graphics Suite, but many are begging Corel to make a Linux version, or at the very least a Wine port for it. Some have elected to use Inkscape.

Adobe Photoshop, Corel PhotoPaint
Gimp, Cinepaint, MyPaint

Again, some of our graphic design customers and photographers need to be able to edit photos. Some actually paint pictures for advertising.


Microsoft Publisher, Adobe Pagemaker
Scribus

Folks in offices that have gotten used to MS Publisher (most) or Pagemaker (not too many) tend to like Scribus. The only beef they usually have is you can’t import your Publisher files into it. But, I always point out that you can’t import Publisher files into ANYTHING except Publisher. They should be using a real page layout program.


Adobe Lightroom
Darktable

This is a really big one for a couple photographer customers we have. One of them who is just getting started has no problem using Darktable and really likes it.


AIM, ICQ, YahooChat, MSN Messenger, mIRC, Trillian, GoogleTalk, MySpace Chat, Facebook Chat, Skype
Pidgeon, Empathy, ChatZilla

There are a large variety of chat programs on the market. Most are specifically geared toward that chat service who provides the chat program. However, there are some programs, like Trillian, which will let you chat with people on multiple chat services all through one program/interface. The closest equivalent I’ve found, that is the most user friendly, is Pidgeon.


Windows Media Player, iTunes, RealPlayer, WinAmp (music players)
Banshee, Rhythmbox, Audacious, Amarok

WMP and iTunes are just a pain. iTunes is horribly slow. Real Player is not reliable at all. WinAmp is fantastic. Of the Linux equivalents, most of our people like Rhythmbox the best so far. Many people who work in offices like to listen to music on their computers instead of having a radio or CD player on their desk while they work.


iViewMedia Pro, Adobe Lightroom, Picasa
digiKam, fSpot, Shotwell, Darktable, Picasa

We are specifically talking about photo management and organization. We’ve had business and home users that all want something to do this easily. So far, most people have liked digiKam and Picasa the best.


Microsoft – Word, Excel, PowerPoint, Access, Math
LibreOffice Suite, OpenOffice Suite

These should be obvious. We put LibreOffice not only on the Linux machines we sell, but on all the new Windows machines too.


MS Frontpage, Adobe Dreamweaver, MS Expressionweb, Sharepoint
Bluefish, KompoZer, Nvu

Not too many people use Frontpage anymore since it’s discontinued but there are a couple that still fiddle with the last version that was out. For those that used to use Dreamweaver, most like Nvu the best overall. It’s available for Win, Mac, and Lin.


Internet Explorer, Firefox, Google Chrome, Safari
Firefox, Opera, Chromium, Google Chrome for Linux

IE just plain sux bricks. Safari is slow. We put Chrome on ALL our Windows machines. We put Firefox and Google Chrome on our Linux machines. We usually use Google Chrome instead of Chromium because the brand is already familiar to our customer base and because we are Google Apps for Business resellers.


MS Outlook, Windows Mail, Windows LiveMail, Eudora
Evolution, Thunderbird

For those in a business environment, Evolution is a comfortable transition if they have been used to Outlook since it looks so much alike. However, that being said, most of our customers have loved Thunderbird. Plus, if they are Google Apps customers there are a variety of plug-ins to add Google Apps Synchronization support for mail, calendar, and contacts.There are several plug-ins we always put in a Thunderbird install (ESC to close, Minimize to Tray, Google Calendar, Google Task Sync, Google Contacts sync, and more).


MS Paint
TuxPaint, MyPaint

Believe it or not, this tends to be a hot spot with some customers, both business and home users. They don’t want to lose MS Paint! Oh my goodness, that would be the end of the world! Puh-lease. Spare me. While Tux Paint is suited more for small children you’d be surprised how many adults like it. However, a more professional program with more features and the one I prefer is MyPaint.


Nero Burning Rom, Roxio Creator, ImgBurn
Brasero

If you’ve ever used ImgBurn on Windows I think it totally beats everything else available. It’s so simple to use, it’s very fast, and it just plain works! However, Brasero on Linux is the same. It’s really the best alternative.


NewzCrawler RSS Feed Reader
Akgregator, Feedly App for Chrome

Honestly, I used to use Google Reader and was very VERY put out when they closed down the project! So were many many other people. One company stepped up and worked with Google to take over handling Google’s old customer’s feeds. That would be Feedly. They have apps for almost all major devices and platforms….except Linux. However, you can use feedly in your web browser and it works great! We usually install the Feedly app in Chrome.


Notepad, TextPad, Notepad++
gEdit, Kate

Almost everyone uses Windows Notepad for one thing or another. For those businesses that are trying to troubleshoot website page issues they want a text editor that shows line numbers so they can more easily debug their page designs. We usually recommend gEdit


Partition Magic, Acronis, many many others….
gParted

Being a computer support shop, we have to partition discs all the time. There really just isn’t anything better than gParted! It seems to be the easiest and most user friendly, and they even have a LiveCD you can run the application off of while you are building or rebuilding your system.


Quicken, Microsoft Money
GNUcash, KMyMoney

Honestly, most businesses still use Quickbooks. There really just isn’t an equivalent out there that I have found that does what they do the way they do it. There’s a reason they are an industry standard. However, for those customers that need something for their home or some small business finances, most have opted to use GNUcash. Some have like KMyMoney though.


Variety of torrent readers….
Ktorrent, Transmission

There are so many torrent readers out there that people use to download or share files and video presentations. Most of the customers on Windows usually use BitTorrent. I have found that most people like Ktorrent the best, though.


CinePlayer, WinDVD
VLC, Totem

We have home and business users that tend to watch a lot of DVD’s on their computers. Some of our customers are financial planners who record some of their seminars and want to present them or share them with their customers. They burn their presentations to DVD’s. Some actually want movies at their desk while they work. There simply is no better multimedia player than VLC. It plays just about every media format on the planet and just plain works. To make the transition more comfortable we always install the Windows Media Player 12 skin on it after installation. This way it looks a lot like the old Media Player they were used to before.


Cakewalk
Audacity

Some of our customer are into music production. Or, they are editing audio from seminars they have done for their MP3 streams to their customers. Both kinds of customers love Audacity both on Windows and Linux platforms.


Windows Movie Maker, Adobe Premier
Cinelerra, Kino, OpenShot, VideoLan Movie Creator
Those of our customers that are actually producing their video presentations or home movies usually ask for an alternative to Windows Movie Maker. So far, they seem to like Cinelarra or OpenShot the best.

wsFTP, WinFTP
FileZilla

There are a ton of FTP programs out there. While there are several open source equivalents, most people whether on Windows or Linux like FileZilla the best.


Variety of music ripping programs….
Sound Juicer

We’ve got some customers that want to rip music to MP3’s to install on the drives of the systems that manage their hold music on their phone systems. Or, they like to listen to the music while they work but don’t like having to swap CD’s all the time.


Variety of programs for tethering a dSLR camera to a computer for remote shooting….
Entangle

Another thing our photographer customer want is a way to tether their dSLR camera to a laptop so they can do tethered shooting and see their images on the screen after. I am also a photographer and have searched for the same thing. While there better, more seamless solutions, those usually involve spending a bunch of money on special hardware interface devices and special software and wireless modules, etc. You can plug your camera into your Linux laptop with a USB cable and use Entangle. It took me a long time to find this program, but it works great, at least with the Canon camera I and a couple of our customers use.


Variety of scanning software….
Xsane

Many times you buy a scanner or MFC device it comes with the manufacturer’s scanning software. Much of it is bloated and very slow. Other times, please will just use a TWAIN driver of some sort and scan directly into the program they wish to edit the image in (for example Corel PhotoPaint or Gimp). Xsane is, in my opinion, the best stand alone scanning software available.


Windows Remote Desktop (MSTSC)
KRDC, Vinagre Remote Desktop Viewer

Many many of our business customers need to be able to remote connect to a desktop computer or Windows server back at the office. While a couple use VNC, most use Microsoft Terminal Services. The best RDC program I’ve found on Linux so far is KRDC. It seems to be the most compatible, reliable, and fastest.


HP Universal Print Driver
HP Universal Print Driver for Linux

Instead of downloading a specific driver for a specific model of HP printer, HP has been offering a “Universal Print Driver” which is supposed to allow your computer to connect to and use MOST of their printers using this single driver. It seems to work pretty darn well. HP also happens to be a really big Linux supporter so they offer this and many other drivers for Linux on their site. While you can download the latest version “for your particular distro” I have had better luck installing the latest version directly from their site.


Windows Vista/7 Post It Note Widget
Tomboy Notes

I can’t believe the number of customers who actually use those desktop widgets – especially the post it notes. If they have to get a new computer they complain they don’t want to lose their notes. The closest equivalent I can find is Tomboy Notes and it’s full featured and works great!


Adobe Encore, DVDfab
Handbrake, Make MKV for Linux

Many of our financial planning customers who like to record their seminars to share with others, want to convert their video to a format that can be viewed on their iPads. Many of our home users want to save their ripped movies to their iPads. Handbrake really is the best solution for this.


Windows Backup
Back In Time, Deja Dup, Simple Backup

Customer both large and small, business and home, always ask what they can use for backup. Honestly I’ve had people use all three of the above listed apps and they all like them for one reason or another. Of course this also depends upon whether you want to initiate a simple backup yourself or to automate a backup on a schedule.


VMware
VirtualBox

This has been sort of a sticky issue depending upon the customer’s needs. For a lot of our business customers, when they buy a Windows server from us, I install VMware ESXi as the primary operating system and then install their Windows server(s) into it as virtual machines. This allows for easy expansion later on in case they need additional servers, they just virtualize it.They can remote manage their virtual machines using vSphere Client. There is even a vSphere Client app for iPad that works great too! However, some of our smaller customers just want to add another server (maybe SQL, Untangle, etc..) to their existing server. Or they want to virtualize another machine for some other special purpose. We always recommend VirtualBox in these cases. You can setup a customized Linux system to run VirtualBox in a manner similar to ESXi, but it just isn’t as polished or easy to use. Keep in mind, VMware is Linux based anyway. ;-) Another thing you can do with either VMware or VirtualBox is to create virtual workstations on your virtualization server. You can then install Linux-based think client software on an old machine you have lying around or boot to a special think client flash drive and you now have a remote virtual desktop machine that runs right off your server.


Fraps
Desktop Recorder

Many homes users, like gamers, use Fraps to record their gaming sessions to post and share on YouTube. However, we’ve had businesses that record desktop sessions when they are making how-to tutorials for their customers on how to do things on their computers.


Windows 8 Metro and/or Apple OS X Dock
Compiz, Cairo Dock

There are those that think that Windows 8 has a more polished look to it (but they still detest it and how it works), and there are those that love the beautiful, shiny, polished look to OS X and the dock interface. While Ubuntu has a sort of dock, it’s just not quite the same as the 3D dock on a Mac.
Believe it or not, I’ve gotten more feedback on this from some of our business customers than from the home users. So, I can install Compiz on their systems and turn on several effects, like desktop cube and wobbly windows, or annotating on the screen with fire, etc…. This really blows them away since they like to show off to their colleagues. “Hey! I bet your computer can’t do THIS!”, that sort of thing. It’s quite funny. I also may add Cairo dock for those users that like the Mac interface. I can make it look and work exactly like the Mac dock, or I can change the look of it in a variety of way. The dock can be flat, 3D, shiny, plain, bouncing icons, zooming icons, and so on and soforth.
I’d have to say, using Compiz and Cairo on my personal laptop has been the number one selling point that has gotten many customers to switch to Linux. They can see things they simple cannot do in a Windows or Mac computer and are just blown away. Many times it doesn’t even matter if we give them the default installation of Ubuntu or Linux Mint without the effects. They are still just excited at that point to be using something new.

————————————————–

Coffee pot dinner.

cpdosg

————————————————–

 

Good day.

Warning: Major warning of bug in the Linux bash program.

Leave a comment

Per ArsTechnica:

Security vulnerability in the GNU Bourne Again Shell (Bash), the command-line shell used in many Linux and Unix operating systems, could leave systems running those operating systems open to exploitation by specially crafted attacks. “This issue is especially dangerous as there are many possible ways Bash can be called by an application,” a Red Hat security advisory warned.

The bug, discovered by Stephane Schazelas, is related to how Bash processes environmental variables passed by the operating system or by a program calling a Bash-based script. If Bash has been configured as the default system shell, it can be used by network–based attackers against servers and other Unix and Linux devices via Web requests, secure shell, telnet sessions, or other programs that use Bash to execute scripts.

Because of its wide distribution, the vulnerability could be as wide-ranging as the Heartbleed bug, though it may not be nearly as dangerous. The vulnerability affects versions 1.14 through 4.3 of GNU Bash. Patches have been issued by many of the major Linux distribution vendors for affected versions, including:

Red Hat Enterprise Linux (versions 4 through 7) and the Fedora distribution
CentOS (versions 5 through 7)
Ubuntu 10.04 LTS, 12.04 LTS, and 14.04 LTS
Debian

A test on Mac OS X 10.9.4 (“Mavericks”) by Ars showed that it also has a vulnerable version of Bash. Apple has not yet patched Bash, though it just issued an update to “command line tools.”

While Bash is often thought of just as a local shell, it is also frequently used by Apache servers to execute CGI scripts for dynamic content (through mod_cgi and mod_cgid). A crafted web request targeting a vulnerable CGI application could launch code on the server. Similar attacks are possible via OpenSSH, which could allow even restricted secure shell sessions to bypass controls and execute code on the server. And a malicious DHCP server set up on a network or running as part of an “evil” wireless access point could execute code on some Linux systems using the Dynamic Host Configuration Protocol client (dhclient) when they connect.

There are other services that run on Linux and Unix systems, such as the CUPS printing system, that are similarly dependent on Bash that could be vulnerable.

There is an easy test to determine if a Linux or Unix system is vulnerable. To check your system, from a command line, type:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

If the system is vulnerable, the output will be:

vulnerable
this is a test

An unaffected (or patched) system will output:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”
bash: warning: x: ignoring function definition attempt
bash: error importing function definition for `x’
this is a test

The fix is an update to a patched version of the Bash shell. To be safe, administrators should do a blanket update of their versions of Bash in any case.

————————————————————————————————-

My ubuntu 14.04 system before the update:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

vulnerable

this is a test

After the update:

$ env x='() { :;}; echo vulnerable’ bash -c “echo this is a test”

bash: warning: x: ignoring function definition attempt

bash: error importing function definition for `x’

this is a test

Come on, special day.

Leave a comment

Chit chat

=======

Highly disappointed to see people take my work especially pictures and use them for their own blog, without any payback.

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

Cartoons:

 

But where do you connect the wires?

 

 

 

—————————————–

Make up a to do list of your days activities. If that is easy for you then, you might be a programmer.

Path to programming.

    • Know a subject that gives you reason to program
    • Learn logic
    • Learn the syntax of a possible language that looks interesting
    • Apply practical examples till you feel comfortable.
    • Learn to debug.
    • Work as a maintenance programmer.
    • Develop a plan for the program you want to write

and describe in detail  what is to be done (see below),

  • Code in manageble segments via modules.
  • Test and redo the program as needed.

Pseudo coding makes life easier.

Dump web page as ascii (text) to disk file.
Read disk file one line at a time in, but ignore all lines till you get what is needed.
Now continue reading one line at a time, but ignore certain lines
With the line you read in output what is needed, while editing out unwanted characters.
Stop output when you get to a point nothing else is needed.
Finnish reading file one line at a time.
End.

—————————————–

Giving out the super secret code for doing the Kitt light show on the X86. Do not have a guitar anymore, but that was me playing the guitar.

http://www.youtube.com/watch?v=BlCHGiG_CQM

Think this is the secret code in freebasic for lighting the leds.

 dim duration as double

dim tim as double
tim = TIMER
duration = .3
out 888, 0

for y = 1 to 20
‘rem up
for x = 0 to 6
out 888, 2^x
r= inp(888)
out 888, (2^(x+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next x

‘rem down
for b = 1 to 7
z = 7 – b
out 888, 2^z
r= inp(888)
out 888, (2^(z+1) +r)
tim = TIMER
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next b
next y
‘rem end of sequence
out 888,0

rnd.bas

randomize  88888888
dim duration as double
dim tim as double
tim = TIMER
duration = .1
out 888, 0
for y = 1 to 100
out 888, 2^(abs((rnd(1)*8)))
tim = Timer
DO
LOOP UNTIL (TIMER – tim + 86400) – (INT((TIMER – tim + 86400) / 86400) * 86400) > duration
out 888, 0
next y

Circuit

 —————————————————————-

Decided to take my score scraping script and apply it to other media. Per se maybe we just want the headlines of CNN.com. Used essentially the same set of instructions on a local news site with results. You will want to use the same rough logic or pseudocode:

Dump web page as ascii (text) to disk file.

Read disk file one line at a time in, but ignore all lines till you get what is needed.

Now continue reading one line at a time, but ignore certain lines

With the line you read in output what is needed, while editing out unwanted characters.

Stop output when you get to a point nothing else is needed.

Finnish reading file one line at a time.

End.

You might get results like this ignoring equals signs.

=========

THE LATEST

* Source: Joan Rivers’ doc took selfie

* Freak accident kills hero bus

driver

* IOS 8 is live: How to get it

* Five iOS 8 features you’ll love

* NEW Billionaire tells Apple: Innovate

* Obama stands firm: No ground troops

* Kerry heckled during testimony

* NEW Stocks hit record; thank Yellen

* NEW Panthers star takes leave

* Vikings: Peterson must stay away

* NEW Virus coming to a state near you

* Dowd inspires edible-pot campaign

* Wrongly convicted man gets a statue

* China blacks out CNN’s report

* He mistakenly calls 911, then …

* Surprise! Mendes, Gosling have baby

OPINION

===============

Then we can we can add it to our report.sh homemade newspaper. For details see:

http://computoman.blogspot.com/2013/12/create-your-own-newspages.html

#——————————————————–

# cnn

echo “<h3>CNN Headines</h3>” >> report.html

echo “<pre>” >> report.html

# creates cnn.txt

./cnn.sh > cnn.txt

echo “<pre>” >> report.html

cat cnn.txt >> report.html

echo “</pre>” >> report.html


####################################

# Cnn Headline  Grabber

#

#===============================

# Assignments

# --------------------------------

datafile="rawcnn.txt"

let "flag = 0"

# end assignments

#=================================

#

# Get data file

#---------------------------------

elinks -dump "www.cnn.com"  > $datafile

#=================================

#

# Extract and display data

#---------------------------------

while read line

do fdata[$a]=$line

    echo $line | grep -q "THE LATEST"

    if  [ $? -eq 0 ]; then

        # header

        clear

        let "flag = 1"

    fi

    if [ $flag -eq 1 ]; then

        echo $line | grep -q "Weather"

            if [ $? -eq 0 ]; then

            let "flag = 0"

        else

            echo $line | grep -q "IMG"          

            if [ $? -eq 0 ]; then

                let "response = donothing"

            else

                echo $line | sed 's/\[.*\]//'

            fi

        fi

    fi

let "a += 1"

done < $datafile

# footer

echo ---------------------------------------------

echo

#===================================

# End.

####################################

See you in September.

Leave a comment

Chit chat
———

Author reserves the right to add or remove content from any post at any time without prior notice or approval.

Had to fix the printer and some other stiff .

gMTP finally seems to be working well.

For the latest cartoons see http://itcartoons.blogspot.com/

———————————–

Use at your own risk.

Parallel and serial I2C

Download

Note : no warranty, no liability, project is provided ‘as is’ but I hope you will enjoy it !

Other:

Why ?

Access to I2C components from a very low cost interface, in pure python, over serial, parallel (maybe more in the future) interfaces, with a minimum hardware. This implementation is intended to be fast but simple and minimalist.

Features (0.3)

  • handle SDA and SCL pins
  • handle your own hardware interface simply adding your puthon driver in drivers directory,
  • auto-detect available interfaces (COM1, COM2, LPT1, etc…)
  • LM75/DS75 I2C sensors,
  • analyse SCL/SDA signals with pyScope :pyScope

Future features

  • add more I2C components,
  • add your own driver if you send it to me,

Example

>>> import I2C
>>> import I2C.sensors

>>> i2c = I2C.BusI2C('COM2')
>>> i2c.bus.setSpeed(2000)  # you can set i2c speed adapted to your hardware
>>> sonde = I2C.sensors.LM75('Room 1', i2c)
>>> print "T =  %02.03f C" % sonde.getTemperature()

Example minimal serial port I2C interface

This interface is really low speed and minimalist, it’s based on specific optos. You can find better also better solutions : http://www.standardics.nxp.com/support/documents/i2c/pdf/optoisolation.pdf

$ wget wget http://www.standardics.nxp.com/support/documents/i2c/pdf/optoisolation.pdf

Example minimal parallel port I2C interface

It-s possible to select SDA input signal, python driver can be easily adapted to you choice.

Python packages required

  • pySerial if you plan to use I2C over serial port
  • pyParallel if you plan to use I2C over parallel port

$ sudo apt-cache search pyparallel
python-parallel – pyparallel – module encapsulating access for the parallel port

$ sudo apt-cache search pyserial
python-serial – pyserial – module encapsulating access for the serial port
python3-serial – pyserial – module encapsulating access for the serial port

Win32 platform

pyParallel need you install and start giveio.sys driver

Linuxes

pyParallel on linux is based on ppdev module, make sure ppdev module is loaded and not lp. add change device access rights to make non root users or add users in right group (lp group on most systems). Use a non production computer for this as the parallel port may not print normally after making these adjustments. On most systems, ppdev is not the default parallel port handler, you must make sure module ppdev is loaded :

sudo modprobe ppde
sudo rmmod lp
sudo chmod go+rw /dev/parport0

Install from tarball

tar -xvzf pyI2C-0.3.tar.gz
cd pyI2C
python setup.py install

———————————–

The newsmedia said they were worthless seem to be still working ok for me. Using the Arduino with an old black and white TV and additional software. You need to add a couple of pieces of inexpensive electronics though. If you have an old TV like this one with composite in, it will also work with the Raspberry Pi also (You will need and rf modulator other wise.)

Even this probably thirty year old TV with the right output from an old computer.  Like to play ninvaders on it as well as using it as a terminal. Command line is not dead,

Bluray has never really caught on, but we can still use dvd players.  Dvd players with composite input can also be used as monitors. Here we are running Reactos.

From:  http://www.instructables.com/id/McGuyver-monitor/

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

Was bored tonight so I did a college football page scrape and the original version is only good for the current week. Still needs a bit of work such as better formatting, but you get the idea.

NCAA Scoreboard

Saturday, September 13, 2014

Rice vs Texas A&M

3rd 5:44

1 2 3 4
Rice 0 7 0 7
0-1
7
Texas A&M 7 14 7 28
2-0

Arizona State vs Colorado

Halftime

1 2 3 4
16
Arizona State 14 10 24
….
….
….

——————–
I usually save data to file for editing
./gcfs.sh > filename

gcfs.sh

####################################
# Score  Grabber
#
#===============================
# Assignments
# --------------------------------
datafile="tcf"
let "flag = 0"
# end assignments
#=================================
#
# Get data file
#---------------------------------
elinks -dump "www.ncaa.com/scoreboard/football/fbs"  > $datafile
#=================================
#
# Extract and display data
#---------------------------------
while read line
do fdata[$a]=$line
    echo $line | grep -q "NCAA Scoreboard"
    if  [ $? -eq 0 ]; then
        # header
        clear
        let "flag = 1"
    fi
    if [ $flag -eq 1 ]; then
        echo $line | grep -q "Featured Sections"
            if [ $? -eq 0 ]; then
            let "flag = 0"
        else
            echo $line | grep -q "GameCenter"          
            if [ $? -eq 0 ]; then
                let "response = donothing"
            else
                echo $line | sed 's/\[.*\]//'
            fi
        fi
    fi
let "a += 1"
done < $datafile
# footer
echo ---------------------------------------------
echo
#===================================
# End.
####################################

——————————-
Update: This new version will show past data and scheduled match ups for future weeks.

 ####################################
# Score  Grabber
#
#===============================
# Assignments
# --------------------------------
datafile="tcf"
let "flag = 0"
let "year = 2014"
let "week = 4"

if [ "$week" -lt "10" ]; then
    let "a = 0"
fi
# end assignments
#=================================
#
# Get data file
#---------------------------------
elinks -dump "www.ncaa.com/scoreboard/football/fbs/$year/$a$week/"  > $datafile

#=================================
#
# Extract and display data
#---------------------------------
while read line
do fdata[$a]=$line
    echo $line | grep -q "NCAA Scoreboard"
    if  [ $? -eq 0 ]; then
        # header
        clear
        let "flag = 1"
    fi
    if [ $flag -eq 1 ]; then
        echo $line | grep -q "Featured Sections"
            if [ $? -eq 0 ]; then
            let "flag = 0"
        else
            echo $line | grep -q "GameCenter"        
            if [ $? -eq 0 ]; then
                let "response = donothing"
            else
                echo $line | sed 's/\[.*\]//'
            fi
        fi
    fi
let "a += 1"
done < $datafile
# footer
echo ---------------------------------------------
echo
#===================================
# End.
####################################

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

Select a task to install.

One of the most often complaints I hear is why do we not have linux distributions for all kinds of servers and etc. In a way, you already do. At least for Debian and it’s related distros, you have a command called tasksel. Tasksel will allow you to have a basic or minimal install and then you can install a set of packages for a specific task. You can run it menu driven or specialize its options by using the command line.

Tasksel is not automatically installed, so you will need to install it.

$ sudo apt-get install tasksel

You can easily select install the lamp (Linix, Apache2, Mysql, and PHP) to set up a minimal web server. While doing that you can tell the system not to install the gui desktop to make a lean and trim system. You can also install several options at once, but you need to  be careful.

To see what packages a system has, you can use the command: (varies from distribution to distribution). It will even tell you what is installed.

$ sudo tasksel –list-tasks

i server    Basic Ubuntu server
i openssh-server    OpenSSH server
u dns-server    DNS server
u lamp-server    LAMP server
i mail-server    Mail server
u openstack    Openstack
u postgresql-server    PostgreSQL database
i print-server    Print server
….
….
….
etc etc

You can also see what programs are included in a specific package

$ sudo tasksel –task-packages server
update-notifier-common
python-zope.interface
python-chardet
python-lazr.restfulclient
python-serial
w3m
python-pam
vim-runtime
curl
python-wadllib
libpcsclite1
python-simplejson
vim
….
….
….
etc etc

You can still install and remove individual packages the old fashion way. I will not dwell on all the options, but you can always

$ man tasksel

for more details.

———–

Additional information:Keep a list of installed packages:
$ dpkg –get-selections > installed-software.log
read $ dpkg (dash)(dash)get-selections > installed-software.logTo use for another system:
$ dpkg –set-selections < installed-software.log
read $ dpkg (dash)(dash)set-selections < installed-software.log
$ apt-get dselect-upgrade

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

Bsd short for Berkeley Software Distribution was originally a closed source operating system software, but various flavors have become open source software. Bsd has been around since 1977, so it is very mature and dependable.  One version known as FreeBSD allegedly became the basis for the Apple operating system for the newer Macintosh computers.  BSD an offshoot of Unix can be very gui oriented not just text based like it’s ancestors. Shown below is open BSD. OpenBSD even comes with a web server pre-installed unless you choose not to install it.

Of course, if you are a hardcore nix person, you can still use BSD without all the gui.  In the picture below is NetBSD running in the text mode with a familiar game of Tetris running on it.What is unusual about this system is that it was installed from the internet using floppy disks as the boot media.  Try that with your proprietary systems. The perfect system for people without a lot of resources.

Like Openbsd and Freebsd, they both will run on about anything with a cpu. In fact, I still think we have the cdrom that will run on the Sega Dreamcast.

Like Linux, BSD has a tremendous amount of software available from various repositories. Linux and BSD are not exactly alike, but you can move from one to the other without much trouble. You can always use the “man” command. Want a change, then give BSD a try.

Netbsd supported platforms:

Tiers

Tier I: Focus — support is part of NetBSD’s strategy (top)

Focus ports are the architectures that NetBSD targets as part of its strategy. The platforms consist of modern server, embedded and desktop architectures. The guidelines are as follows:

  • Machine independent (MI) changes should benefit these ports.
  • MI changes must be tested on at least one of these ports.
  • It is the developer’s responsibility to implement machine dependent (MD) support necessary for changes, fix build problems and aid in debugging with any platform-specific problems.
  • Even within a port, common sense should be used (cf. the i386 port which still supports 486).
  • Regressions in the automated NetBSD test suite (/usr/tests) are not allowed.

Currently there are 8 ports with Tier I status. They are:

Port CPU Machines Latest Release
amd64 x86_64 64-bit x86-family machines with AMD and Intel CPUs 6.1.4
evbarm arm ARM evaluation boards 6.1.4
evbmips mips MIPS-based evaluation boards 6.1.4
evbppc powerpc PowerPC-based evaluation boards 6.1.4
hpcarm arm StrongARM based Windows CE PDA machines 6.1.4
i386 i386 32-bit x86-family generic machines (“PC clones”) 6.1.4
sparc64 sparc Sun UltraSPARC (64-bit) 6.1.4
xen i386, x86_64 Xen Virtual Machine Monitor 6.1.4

Tier II: Organic — evolving at its own pace (top)

Organic ports are highly valued by the NetBSD project, but their development is not as tightly mandated as that of the focus ports. Generally speaking, the hardware platforms of organic ports have lost their industrial relevance, or there is not enough community activity for the port to make it to the first tier. The guidelines are as follows:

  • Generally speaking, the port boots and works, but keeping it working is the responsibility of the user community. This includes, but is not limited to, kernel changes and toolchain upgrades.
  • Developers committing MI changes are still encouraged to keep ports up-to-date when it can be easily done.
  • MI architecture decisions may penalize organic ports if there is a benefit for focus ports.
  • If the port is not working at release time, a release is done without the port and the port is moved down to the life support tier.

Currently there are 50 ports with Tier II status. They are:

Port CPU Machines Latest Release
acorn26 arm Acorn Archimedes, A-series and R-series systems 6.1.4
acorn32 arm Acorn RiscPC/A7000/NC and compatibles 6.1.4
algor mips Algorithmics MIPS evaluation boards 6.1.4
alpha alpha Digital Alpha (64-bit) 6.1.4
amiga m68k Commodore Amiga, MacroSystem DraCo 6.1.4
amigappc powerpc PowerPC-based Amiga boards 6.1.4
arc mips Machines following the Advanced RISC Computing spec 6.1.4
atari m68k Atari TT030, Falcon, Hades 6.1.4
bebox powerpc Be Inc’s BeBox 6.1.4
cats arm Chalice Technology’s Strong Arm evaluation board 6.1.4
cesfic m68k CES’s FIC8234 VME processor board 6.1.4
cobalt mips Cobalt Networks’ Microservers 6.1.4
dreamcast sh3 Sega Dreamcast game console 6.1.4
emips mips Machines based on “Extensible MIPS” 6.1.4
epoc32 arm 32bit PSION EPOC PDA none
evbsh3 sh3 Evaluation boards with Renesas (Hitachi) Super-H SH3 and SH4 CPUs 6.1.4
ews4800mips mips NEC’s MIPS based EWS4800 workstations 6.1.4
hp300 m68k Hewlett-Packard 9000/300 and 400 series 6.1.4
hp700 hppa Hewlett-Packard 9000/700 series 6.1.4
hpcmips mips MIPS based Windows CE PDA machines 6.1.4
hpcsh sh3 Renesas (Hitachi) SH3 and SH4 based Windows CE PDA machines 6.1.4
ia64 itanium Itanium family of processors none
ibmnws powerpc IBM Network Station Series 1000 6.1.4
iyonix arm Iyonix ARM pc 6.1.4
landisk sh3 SH4 based NAS appliances by I-O DATA 6.1.4
luna68k m68k OMRON Tateisi Electronics’ LUNA series 6.1.4
mac68k m68k Apple Macintosh 6.1.4
macppc powerpc Apple Power Macintosh and clones 6.1.4
mipsco mips Mips family of workstations and servers 6.1.4
mmeye sh3 Brains’ mmEye Multi Media Server 6.1.4
mvme68k m68k Motorola MVME 68k SBCs 6.1.4
mvmeppc powerpc Motorola MVME PowerPC SBCs 6.1.4
netwinder arm StrongARM based NetWinder machines 6.1.4
news68k m68k Sony’s m68k based “NET WORK STATION” series 6.1.4
newsmips mips Sony’s MIPS based “NET WORK STATION” series 6.1.4
next68k m68k NeXT 68k ‘black’ hardware 6.1.4
ofppc powerpc Generic OpenFirmware compliant PowerPC machines 6.1.4
pmax mips Digital MIPS-based DECstations and DECsystems 6.1.4
prep powerpc PReP (PowerPC Reference Platform) and CHRP machines 6.1.4
rs6000 powerpc MCA-based IBM RS/6000 workstations 6.1.4
sandpoint powerpc Motorola Sandpoint reference platform 6.1.4
sbmips mips Broadcom SiByte evaluation boards 6.1.4
sgimips mips Silicon Graphics’ MIPS-based workstations 6.1.4
shark arm Digital DNARD (“shark”) 6.1.4
sparc sparc Sun SPARC (32-bit) 6.1.4
sun2 m68k Sun 2 6.1.4
sun3 m68k Sun 3 and 3x 6.1.4
vax vax Digital VAX 6.1.4
x68k m68k Sharp X680x0 series 6.1.4
zaurus arm Sharp C7x0/C860/C1000/C3x00 series PDA 6.1.4

———————————–

 

———————————–
————————————
————————————
————————————

Let’s make pasta

pastalady

Good day.

Catching up.

Leave a comment

Chit chat

———–

Have not madetime to post for a while.

———–

Cartoons

———-

New Mapple life size iphone.

It will even dance with you! (and etc.)

Net neutrality?

Mapple presents:

Mapple presents the new NSA watch also known as the iWatchu,

It’s raining, it’s pouring, the old cloud is snoring.

Another patent battle.

Rumor that Diet Smith as well as others are going to Texas to file patent suit against Apple.

Right to bear arms.

Heaven

 

Texas computer room.

Cows is a Cluster of workstations
Several servers working together is sometimes know as a server farm.

The joy of multiplex.

Tech support!

Computerized black eye.

 

Raid.

Superhero wanted.

———————————————————-

 

Notice

Author reserves the right to add or remove content from any post at any time without prior notice or approval.

You do not have to use wifi sometimes.

Ethernet over power is a great way either to connect an extra computer to the network without running cable or trying to set up wireless. Plug in and go.  I especially like them, for use when I need to do something in the garage such as look up technical information so I do not have to go in the house dirty..

Server racks


Going back home.

Started out with Slackware in the 1990’s on an i386. Looks like I will be going back. Still have Slackware 14 on a Pentium I. The ultimate return on investment. Slackware 14 running on a pentium 1.

You can still get Slackware from http://www.slackware.com/

Available for download.

PC as a router.

 Openwrt is a very well known firmware for commercial routers. What a lot of people may not know is that it is available for the personal computer environment. In fact, you can find more about it here: http://www.instructables.com/id/Openwrt-on-a-pc/

But now there is an offshoot of Openwrt called Gargoyle (http://www.gargoyle-router.com/). Like Openwrt, they both can run in a virtual machine! So you could run several routers all on one system. That is something so far you can not do on a commercial plastic router. Hopefully, I will be doing an install set up soon. If you can do the openwrt install, then the gargoyle install should be easy.

If you go to their download page, you can easily choose the right firmware to download for an X86 system. Linux users will want to have the software dd available to transfer the image to a drive. You do get a gui interface to interact with remotely like most routing software, That way you are not locked into the command line.

Gargoyle is only about 17 megabytes, so choice of media storage such as a compact flash drive very accessible.  Never tested this software, but it begs to be tested!

———————————————————-

 

Two simple calculators

 Might me nice to have at your fingertips.Part of the code is at: http://www.javascriptkit.com/script/cut42.shtml

Usb to isa.

———————————————————-

Home made fritos.

SUNP0058

Good day.

What’s up doc?

Leave a comment

Chit chat

———–

Not so much stuff in this posting.

Updated the Arch linux box for the “vim” rearrangement.

Disappoints me that people think they have to have a particular linux distro, but now with systemd that changes.

Added several apps to the test web server.

Found a web based arduino ide, but it only works in the local browser and not on a server.

Played with the arduino a little bit, found some differences between the real Arduino and the Osepp board.

———————————————-

Couple of cartoons:

———————————————-

If you set up your serial port for communications (some systems may require a usb adapter), You will never worry about not having a monitor for emergencies. (connecting in this case to an nslu2 running linux.)

Notes from an earlier article to set up serial communication, Your system may vary.
Now to get the Pda working with the unit. The Palm pda will not work as is as a dumb terminal, so I had to install a program on to it from another computer called ptelnet.prc using a usb to serial interface. The Palm has an interface cable that will plug directly into the 9 pin serial port on the back of the computer.

$  pilot-xfer -p /dev/ttyUSB0 -i ptelnet.prc

That should be easy. First to test the port. Strange the serial port on what is commonly known as com2:. (com1: =ttyS0)

$ sudo /sbin/getty -h -L /dev/ttyS1 9600 vt100 &
$ sudo chmod 666 /dev/ttyS1

A prompt did not show up on the Palm pda. Now what is the problem? Time to log out and restart the computer to go into the bios. Went into the bios and noticed there were two serial ports, but you could only have one port working at a time. The motherboard was set for the second port which was IR only. Changed the motherboard to use port 1 and disabled IR. Saved the settings and rebooted. Used the temp command again to test the serial port.

$ sudo /sbin/getty -h -L /dev/ttyS0 9600 vt100 &
$ sudo chmod 666 /dev/ttyS0

The login prompt came right up on the Palm pda. Logged in and all was well. Beginning to feel like Sherlock Holmes solving issues.  Sshed back into Robotpet. Now I had to make the port available all the time.

$ sudo vim /etc/inittab

Needed to uncomment on line to make that so. (i.e. remove the pound sign)

Changed:
# T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
to
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100

 

———————————————-

Saw this article (http://www.raphnet.net/electronique/adlib/adlib_en.php) about connecting and old eight (isa) bit sound card to the parallel port. Then I thought after looking at the connections that maybe the Arduino, RPi, Beagleboard, or the like  could also be used.  Just a matter of developing the software. Try this at your own risk. Then I thought there are lots of other old legacy eight bit cards that might be used (i.e serial, parallel, floppy, or etc).

 

Adlib information:
http://www.o-bizz.de/qbtuts/mallard/sbfaq.htm

http://www.shipbrook.net/jeff/sb.html

———————————————-

Just like there are many verbal languages for speaking i.e. English, Spanish, Italian or etc.,  computers have their own languages also. Most people understand a verbal language  without having to do any translation. For computers that can be different. So if you want to use a language on a computer, some translation will need to be done to convert the commands (aka source code) to the ones and zeroes a computer understands. This is called compiling. There are a zillion languages that can be used, but one of the most common is “C” pronounced “see”. “C” was made famous by Dennis Ritchie and Brian Kernighan also know and K&R.

Even if you are not a programmer, you will get the urge to create your own program. This usually happens when you seem some code on a web page or in a magazine that you just have to try. So then every once in a while you may actually need to create a simple program either for testing a system or just to create a quick utility. Most systems support GCC (a c compiler) although you may have to install some programs. i.e. “sudo apt-get install  build-essential”. Now let us create the world famous “HelloWorld” program for your system.

1. Create  or copy your source code into and editor such as vim, nano, joe, or etc. Be sure to save the file (aka source code) and then exit.   (source code is in the examples)

$ nano hw.c

Note:

 and 

are not entered into the editor.

2. The you need to convert the source code to an executable program.

# $ gcc sourcecode.c -o executablename
$ gcc hw.c -o hw

3. Run or execute your program. (if no errors are detected otherwise changes will need to be made and then recompiled),

$ ./hw
Hello World!

Or if you want sort of a gui:

$ ./hw | zenity –text-info

Pat your self on the back as you have created your first program! That is all there is to it for simple programs you create. More advanced programs will require a bit more work. More about that later.

Collected C source code from: http://www.geekboots.com/c/intro. Here are some basic examples that you will eventually use.

Basic file tools:
Simple output
Read a file
Write to a file

System tools:
Access the system
Remove a file
Copy a file

Basic i/o
———————————————-
Simple output

$ ./hw
Hello World!

#include<stdio.h>
int main()
{
/* Display text on the screen */
printf("Hello World!\n");
return 0;
}

Read a file

$ ./readfile
Get text as character from file
This is data to read.

Read file up to first blank space or line break
This


#include<stdio.h>
int main()
{
/* Declare File pointer */
FILE *fp;
char text, text1[10];
/* Open file 'myfile.txt' in read mode */
fp = fopen("myfile.txt", "r");
/* Read character on file using 'fgetc' function */
printf("Get text as character from file\n");
while( (text = fgetc(fp) ) != EOF )
printf("%c", text);
printf("\n");
/* Go to the beginning of the file */
fseek(fp,0L,0);
/* Read text on file using 'fscanf' function */
printf("Read file up to first blank space or line break\n");
fscanf(fp, "%s", text1);
printf("%s\n", text1);
/* Close file */
fclose(fp);
return 0;
}

Write to a file:

$ ./writfile
File created and written successfully!
eddie@oelt02:~/csource$ cat myfile.txt
Hello!
Hello World!

 #include<stdio.h>
int main()
{
/* Declare File pointer */
FILE *fp;
char text[10] = "Hello!";
int i = 0;
/* Create/Open file 'myfile.txt' in write mode */
fp = fopen("myfile.txt","w");
/* Write character on file using 'fputc' function */
while(text[i] != '\0')
{
fputc(text[i], fp);
i++;
}
/* Write text on file using 'fprintf' function */
fprintf(fp,"\nHello World!");
/* Checking error on file */
if (ferror(fp))
printf("Error occur...Try Again!\n");
else
printf("File created and written successfully!\n");
/* Close file */
fclose(fp);
return 0;
}

System tools:
—————————————————————-
Access the system:

$ ./sysaccess
Tue Sep  2 21:20:18 CDT 2014
cpvile.c  delfile.c  readfile.c  sysaccess.c

#include<stdlib.h>
int main()
{
/* System function use to run system commands */
/* Print date on the terminal */
system("date");
/* List directory content on the terminal */
system("ls");
return 0;
}

Remove a file:

$ ./delfile
File Deleted Successfully!
eddie@oelt02:~$ ./delfile
Unable to delete the file!
Error: No such file or directory

#include<stdlib.h>
int main()
{
/* System function use to run system commands */
/* Print date on the terminal */
system("date");
/* List directory content on the terminal */
system("ls");
return 0;
}

Copy a file:

$ ./cpfile
File copied successfully!


#include<stdio.h>
#include<stdlib.h>
int main()
{
/* Declare File pointer */
FILE *source, *destination;
char ch;
/* Open file 'myfile.txt' in read mode */
source = fopen("myfile.txt", "r");
/* Checking for file is properly open or not */
if(source == NULL)
{
printf("Error occur on file opening\n");
exit(EXIT_FAILURE);
}
/* Create/Open file 'newfile.txt' in write mode */
destination = fopen("newfile.txt", "w");
/* Checking for file is properly open or not */
if(destination == NULL)
{
fclose(source);
printf("Error occur on file opening\n");
exit(EXIT_FAILURE);
}
/* Copying text from one file to another */
while( ( ch = fgetc(source) ) != EOF)
fputc(ch, destination);
/* Checking error on file */
if (ferror(destination))
printf("Error occur...Try Again!\n");
else
printf("File copied successfully!\n");
/* Close file */
fclose(source);
fclose(destination);
return 0;
}

———————————————————-

Data files:

myfile.txt, newfile.txt:

This is data to read

———————————————-

Question was asked recently what open software tools do we use or have used for tech support. Once, I thought about it the answer was, what do I not use. One of the first tools I ever used was Knoppix. Microsoft Windows did not have a free tool (there was a commercial one from sys internals) to boot to an operating system to rescue failed hard drives. Of course you could pull the drive and hook it to another machine, but that could be very iffy.

To back up files, I would boot with knoppix live cd (long before ubuntu) and make sure the drive was readable despite not being bootable. Then I would use the linux ntfs utilities and samba to log into the mswindows server and back up the user files to the home drive from linux. Of course you had to have admin rights to do that both on linux and MSWindows.  That made a lot of people happy that they did not lose all their data. Lastly,  the data was restored after a hard drive replacement and a new MSWindows was installed on the new drive. Then it was easy just to drag and drop files to the new system all under MSWindows.

Back then all we had was Samba3 and no gui utilities. Today things are a bit different.

apt-get install samba4 to get the latest version of Samba.
apt-get install cifs-utils to get necessary files/utils required to mount Windows shares.
Then do the following:
mkdir /mnt/share
Type the following command to mount the share:
mount -t cifs //windowsmachineip/sharename -o username=user,password=urPassword /mnt/share
On older machines the shares could be mounted as follows:
mount -t smbfs -o username=user,password=urPassword //windowsmachineip/sharename /mnt/share

———————————————-

Starter menu to show you the power of tput.

 

#!/bin/bash
#testmenu.sh
#test for tput cursor movements
#colour the screen
tput setb 3 #Green in xterm and brown in linux terminal
tput clear
#paint menu onto the screen
echo ""
echo ""
echo "TEST MENU"
echo "1 ..... ECHO 1"
echo "2 ..... ECHO 2"
echo "3 ..... ECHO 3"
echo "4 ..... QUIT"
echo ""
echo "Select item: "
#loop around gathering input until QUIT is more than 0
QUIT=0
while [ $QUIT -lt 1 ]
do
#Move cursor to after select message
tput cup 8 13
#Delete from cursor to end of line
 tput el
 read SEL
 if [ ${#SEL} -lt 1 ]
 then
 continue
 fi
 if [ $SEL -eq 4 ]
 then
QUIT=1
continue
 fi
 #put message in middle of screen
 tput cup 15 20
 #Delete from cursor to end of line
 tput el
 case $SEL in
*) echo "You selected $SEL";;
esac
done
#reset the screen
#Find out if this is a "linux" virtual terminal
if [ $TERM ~ "linux" ]
then
 tput setb 0 #reset background to black
fi
tput reset
tput clear

———————————————-

Not my idea, but thought this might be another article to look at. It is allegedly a video generator. http://sbc.rictor.org/io/vid3.html

I am obligated to also mention:
https://code.google.com/p/arduino-tvout/
http://www.gammon.com.au/forum/?id=11608
http://www.pyroelectro.com/tutorials/arduino_basic_vga/index.htmlhttp://forum.arduino.cc/index.php/topic,102181

———————————————-

Homemade chips

SUNP0052

Good day.

More than you can hold.

Leave a comment

Chit chat

———–

Supposedly an update to vim, so I updated my Arch Linux box.

Do mirror this blog to others, so I am not copying someone’s work.

Story about #Munich backing out of #linux is allegely overbloated. http://www.omgubuntu.co.uk/2014/08/munich-council-say-talk-limux-demise-greatly-exaggerated

When it comes to #computers: Amateurs #reinstall. Professionals fix the problem and only reinstall as a last resort. #tech #support

You feel foolish when you have installed applications on a #web server a zillion times, but you make simple mistakes like typing in a url of phpmysql when it should of been phpmyadmin. Been a while, but the app is installed.
#linux
Batch file to slowly print out a text file. Perfect for a quickie teleprompter.
Still use the Chumby for many things. One is a portable Muzak.
As time goes on…..

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

If you are into arduino type stuff, this may interest you.
Avrian Jump

===========

A very simple ladder language for programming ATMega168s from a web browser.

This started out as a desire to be able to program an [Arduino][] from an iOS device.  Since it doesn’t seem like compiler tools of any sort would get into the app store, I figured something would need to be done in HTML5.  And if a [PC emulator][pcemu] could be written in javascript, so could something like this.

However, recreating the Arduino IDE in HTML seemed like too much work, at least for a first try.  So I reduced the project into something much simpler, while still putting real machine code into the AVR’s flash.  A simple ladder language that compiled into AVR assembly, which would be assembled into machine code, seemed like like a resonable reduction.  With that I could take advantage of the [Audioino][] bootloader, to load right from the web page.

This is still unfinished, go see the TODO file.

Also go read issue #2, playing sounds encoded in data URIs in iOS 5.1 is broken. *sigh*

Try it out! [Avrian Jump](http://tadpol.github.com/Avrian-Jump/avrianjump.html)

Some other ways (likely better) of putting Arduino IDEs into web browsers:
– [wifino](http://www.wifino.com/)
-

[codebender](http://codebender.cc/)

The Ladder
———-

Each rung on the ladder has a single test and multiple actions.  Tests can check the digital pins, analog pins, and a couple of variables.  Each action can set a digital pin, a PWM output, or a variable.  Analog, PWM, and variables are 16bit values.

There is no ‘setup()’.  Analog pins are always analog inputs.  When specified in a test, a digital pin is set to an input then read.  When specified in an action, it is set to an output then set.

PWM code is still non-existant, so how this will actually work is up in the air.  How I want it to work is:  Specifying a pin in an action as a PWM output makes it a PWM output.  Specifying a pin in a test stops it from doing PWM output.  Specifying a digital state for the pin in an action also stops it from doing PWM output.

There is an ascii format of the ladders.  This was done because it seemed like it could be neat to be able to tweet ladders.  You can view the ascii format, and also load ladders from it.  The ascii parser skips anything it doesn’t recognise; it is a bit too forgiving at times.

An example program:

#Fast Blink LED
:T;A+=1
:A=16383;D13=1
:A=32767;D13=0,A=0

Mostly though, a ladder is converted into AVR assembly.

The Assembler
————-

The assembler is pretty basic. Lots of features commonly found in other assemblers are currently missing.  It does assemble the mneonics from [Atmel's pdf][avrasm] into machine code.  It supports labels, but not local labels.  It has simple parameter replacement, so common names can be defined for IO registers and memory regions and things.  It can also specify where in memory to put the machine code, and can specify immeadiate words to save in the machine code.

This assembler doesn’t know about the various AVR devices, and so will happily assemble any of the known mnemonics into the output.  Even if your target device has no idea what to do with them.  It has assembled blink tests for the ATmega168 and the ATTiny13, so it seems pretty flexable. (Avrian Jump currently only supports the ATmega168 though.  Maybe add others in the future, but would have to figure the bootloader thing out first.)

Outputs
——-

A ladder can be compiled into a few different formats:

- ASCII
– This the only form can can be converted back into a ladder.
– This is for sharing your ladder with others, or saving a ladder for later.
– S19
– If you don’t have an [Audioino][] bootloader, but still want to use a ladder.  A S19 can be ded with [avrdude][].
– WAV
– A [Audioino][] compatible wav file for loading the ladder onto an ATmega168 with the [Audioino][] bootloader installed.
– Assembler
– This is mostly around for debugging the ladder compiler.  It can be interesting to look at  too.

License
——-

Copyright (c) 2012 Michael Conrad Tadpol Tilstra

Licensed under the MIT License.

[Arduino]:http://www.arduino.cc/
[pcemu]:http://bellard.org/jslinux/
[avrasm]:http://www.atmel.com/atmel/acrobat/doc0856.pdf
[avrdude]:http://ladyada.net/learn/avr/avrdude.html
[Audioino]:http://www.hobby-roboter.de/forum/viewtopic.php?f=4&t=128&p=531

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

Legacy Robot notes.

Have not made much time to work on special projects. One thing I need to start back on is robopet.  There is nothing real super snazzy about this unit although it could be. Mainly I will use it for carrying snacks back and forth from the kitchen during sporting events. There will be a second level not currently attached to hold the goodies. More information about the unit follows.

Electronics:

Using an old Pentium I computer, usb wireless, DC battery power, dc-dc atx ps and compact flash with an ide conversion interface. Powered wheels came from two Tonka RC cars that I dissected.

Made a special wiring hardness to connect the parallel port with the control electronics. Now I need to start testing the electronics for the motor control. Hoping the h-bridge can take the current. If not, I think I have a IC that will. Worst case scenarios is to do it the old fashion way with transistors. After that, everything should fall into place.

Using a standard power supply to test the unit, but it will run on battery when I finish it. Since the motherboard is AT and the DC-DC PS is ATX, I had to make a special cable from scratch to interface the two. Tested the cable and it works.

Have the wireless working via a usb interface set up to work with a specific router via the mac address and the zone. Albeit the wireless is 11 mb, more than fast enough to receive and send communication

Special home made turn signals to be added also.

No sensors added yet.

Software:

The Linux OS is installed.  The OS resides on a compact flash.The iso file for the version of the Ubuntu distribution also resides on the flash drive and gets mounted as a loop.

Using my own home grown robot control software to gather data from sensors and to operate the unit. Found a binary of the very lightweight web server Boa on launchpad.net for the version of Ubuntu I am using. Installed it. Apache2 is too bulky for this project. Eventually, I want to make an autonomous unit.  This unit will be more like a remote controlled car via wifi.

Code to control the motors has already been tested (using parcon.c) and is working.   Using a hardwired connection, already tested client/server socket programming to communicate with and control the unit. That should be way more efficient and possibly more secure than using a web server per se..

Etc.

Had to make special adapter plates to connect the wheel assemblies to the cart. Originally I used clear plastic, but those broke too easily. Wood worked much better, but not as pretty. Attached a third generic cart wheel.

Extra: We installed ptelnet on an old Palm pda to use it as a dumb terminal. That way we do not have to hook the robot to a monitor when we want to access the unit. Saves electricity and makes it more portable. With the installation of Boa, the Chumby can also be used to control the robot without requiring an umbilical cord. Which means that getting an Android or the like tablet more feasible.

Added schematic for turning blinker.

Links:
http://www.instructables.com/id/Atx-to-At-ps-test-cable/
http://www.instructables.com/id/Linux-beginning-home-automation-on-a-server/
http://www.instructables.com/id/No-solder-parallel-port-break-out/
http://www.instructables.com/id/Mini-parallel-port-break-out-cable/
http://www.instructables.com/id/DB9-serial-break-out-cable/
http://www.instructables.com/id/Vga-breakout-cable/

Parcon.c for controlling parallel port

 #include <stdio.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/io.h>

char *binprint( unsigned char x, char *buf )
{
  int i;
  for( i=0; i<8; i++ )
    buf[7-i]=(x&(1<<i))?'1':'0';
  buf[8]=0;
  return buf;
}

int main( int argc, char *argv[] )
{
  char c;
  unsigned char val;
  char buf[9];
  int x;
  if( argc<2 )
  {
    printf("  example usage: parcon 1l 2l 3h 5h 8l\n");
    return 2;
  }
  if( ioperm(888,1,1) )
  {
    printf("Couldn't get port 888\n");
    return 1;
  }
  val = inb(888);
  printf("old = %s\n",binprint(val,buf));
  for( x=1; x<argc; x++ )
    if( argv[x][1]!='h' )
      val &= ~(1<<(argv[x][0]-'1'));
    else
      val |= 1<<(argv[x][0]-'1');
 
  printf("new = %s\n",binprint(val,buf));
  outb(val,888);
  return 0;
}

Photos:

------------------------------------------------------

One way to recycle an old case cover.

Variation for pants.

------------------------------------------------------

 If you ever take the time to see what vim can do you would be very surprised.

------------------------------------------------------

Math can be interesting! This is oversimplified, but we can use math for many things. One is that might want to know the position of a motor. In electronics, we might want to know what part of an AC cycle we are in such as reading oscilloscopes. . What is even more interesting, we do not have to have some fancy computer language in most cases to calculate what we need.  Then if you want to, you can port the code to a fancier language and or system.

Sine wave graph

$ ./sine

 cat sine.bas
'rem  ----------------------------
'rem sine wave
'rem -----------------------------
?
?"Sine wave graph"
?
?
?tab(14);"- 1";tab(40);"0";tab(63);"+ 1"
?"Degrees";tab(14);
for j = 1 to 52
    ?"-";
Next j
?
for L = 0 to 360 step 7.5
    let x =  L / 57.19578
    'rem what makes the curve
    let r = sin(x)
    let s = int((r*25) + .5)

          if s<0 then? L;tab(s+40);"*";tab(40);":" 

          if s=0 then ? L;tab(40);"*"
    
          if S>0 then? L;TAB(40);":";tab(s+40);"*"
Next L
end

Cosine graph:

$ cat cosine.bas

'rem  ----------------------------
'rem cosine wave
'rem -----------------------------
?
?"Cosine wave graph"
?
?
?tab(14);"- 1";tab(40);"0";tab(63);"+ 1"
?"Degress";tab(14);
for j = 1 to 52
    ?"-";
Next j
?
for L = 0 to 360 step 7.5
    let x =  L / 57.19578
    'rem what makes the curve
    let r = cos(x)
    let s = int((r*25) + .5)

          if s<0 then? L;tab(s+40);"*";tab(40);":" 

          if s=0 then ? L;tab(40);"*"
   
          if s>0 then? L;TAB(40);":";tab(s+40);"*"
Next L
end

Note: Freebasic was used to compile the code on a Linux based system.

--------------------------------------

Update: For those of you who prefer C,  we found some code for the sine and cosine.

Sine:

$ ./sine

sine.c   (gcc sine.c -lm -o sine)

 

#include <stdio.h>
#include <math.h>

#define WIDTH 60
#define HEIGHT 20
#define X WIDTH/2
#define Y HEIGHT/2
#define XMAX WIDTH-X-1
#define XMIN -(WIDTH-X)
#define YMAX HEIGHT-Y
#define YMIN -(HEIGHT-Y)+1

char grid[HEIGHT][WIDTH];

int plot(int x, int y);
void init_grid(void);
void show_grid(void);

int main()
{
    float x,y;

    init_grid();
    for(x=-3.14159;x<=3.14159;x+=0.1)
    {

// line to change (sin, cos, tan, or etc)

        y = sin(x);
        plot(rintf(x*10),rintf(y*8));
    }
    show_grid();

    return(0);
}

/* Set "pixel" at specific coordinates */
int plot(int x, int y)
{
    if( x > XMAX || x < XMIN || y > YMAX || y < YMIN )
        return(-1);

    grid[Y-y][X+x] = '*';
    return(1);
}

/* Initialize grid */
void init_grid(void)
{
    int x,y;

    for(y=0;y<HEIGHT;y++)
        for(x=0;x<WIDTH;x++)
            grid[y][x] = ' ';
    /* draw the axis */
    for(y=0;y<HEIGHT;y++)
        grid[y][X] = '|';
    for(x=0;x<WIDTH;x++)
        grid[Y][x] = '-';
    grid[Y][X] = '+';
}

/* display grid */
void show_grid(void)
{
    int x,y;

    for(y=0;y<HEIGHT;y++)
    {
        for(x=0;x<WIDTH;x++)
            putchar(grid[y][x]);
        putchar('\n');
    }
}

Cosine:

cosine.c   (gcc cosine.c -lm -o cosine)

 #include <stdio.h>
#include <math.h>

#define WIDTH 60
#define HEIGHT 20
#define X WIDTH/2
#define Y HEIGHT/2
#define XMAX WIDTH-X-1
#define XMIN -(WIDTH-X)
#define YMAX HEIGHT-Y
#define YMIN -(HEIGHT-Y)+1

char grid[HEIGHT][WIDTH];

int plot(int x, int y);
void init_grid(void);
void show_grid(void);

int main()
{
    float x,y;

    init_grid();
    for(x=-3.14159;x<=3.14159;x+=0.1)
    {

// line to change (sin, cos, tan, or etc)

        y = cos(x);
        plot(rintf(x*10),rintf(y*8));
    }
    show_grid();

    return(0);
}

/* Set "pixel" at specific coordinates */
int plot(int x, int y)
{
    if( x > XMAX || x < XMIN || y > YMAX || y < YMIN )
        return(-1);

    grid[Y-y][X+x] = '*';
    return(1);
}

/* Initialize grid */
void init_grid(void)
{
    int x,y;

    for(y=0;y<HEIGHT;y++)
        for(x=0;x<WIDTH;x++)
            grid[y][x] = ' ';
    /* draw the axis */
    for(y=0;y<HEIGHT;y++)
        grid[y][X] = '|';
    for(x=0;x<WIDTH;x++)
        grid[Y][x] = '-';
    grid[Y][X] = '+';
}

/* display grid */
void show_grid(void)
{
    int x,y;

    for(y=0;y<HEIGHT;y++)
    {
        for(x=0;x<WIDTH;x++)
            putchar(grid[y][x]);
        putchar('\n');
    }
}

------------------------------------------------------

The above graphic is nice but what is the date for a particular day. How about the day 214? Supposedly close to the hottest day of the year, then what actual day is that?

Usage: ./main dayofyear year

$ ./main 214 2014
Result: day 214 of year 2014 is '08/02/2014'.

To confirm it:

So it looks like August 2, is near the hottest day of the year.

$ gcc main.c -o main

main.c

 #define _XOPEN_SOURCE /* glibc2 needs this for strptime */
#include <stdio.h>
#include <stdlib.h>
#include <time.h>  
#include <errno.h>

int to_date(
  char * date,
  const size_t size,
  const char * fmt,
  const short unsigned int day_of_year,
  const short unsigned int year)
{
  char buffer[16] = "";

  sprintf(buffer, "%hu %hu", day_of_year, year);

  {
    struct tm t = {0};
    char * presult = strptime(buffer, "%j %Y", &t);

    if ((NULL == presult) || ('\0' != *presult))
    {
      errno = EINVAL;
      return -1;
    }

    strftime(date, size, fmt, &t);
  }

  return 0;
}

int main(int argc, char ** argv)
{
  if (2 > argc)
  {
    fprintf(stderr, "Missing arguments. Usage: %s day-of-year year\n", argv[0]);
    return EXIT_FAILURE;
  }

  short unsigned int day_of_year = atoi(argv[1]);
  short unsigned int year = atoi(argv[2]);
  char date[16] = "";

  if (-1 == to_date(date, sizeof(date), "%m/%d/%Y", day_of_year, year))
  {
    perror("to_date() failed");
    return EXIT_FAILURE;
  }

  printf("Result: day %d of year %d is '%s'.\n", day_of_year, year, date);

  return EXIT_SUCCESS;
}

------------------------------------------------------

 

Light on is a one and light off is a zero.

There is an old joke that says: "There are only 10 types of people in the world: those who understand binary" In any case, it does not hurt to at least look at binary once in a while. Ascii (American standard code for information interchange) is usually eight binary characters of ones or zeroes. So you can take the first 8 ones and zeros for the first character.

Then to further split out the whole code sequence:

01000001 01010010 01010000 01000001 01001110 01000101 01010100

Then you can convert on character at a time.  You can just look at a table or write a program to do it.


</pre>
<pre><code class="language-js"><html>
<head>

<script type="text/javascript">
var input_id = "bin_text";
var answer_id = "answer";

function convertToASCII() {
 var bin_text = document.getElementById(input_id);
 var answer = document.getElementById(answer_id);

 if (!answer) {
  alert("Error: No element with id \""+answer_id+"\".");
  return;
 }
 if (bin_text)
  var text = bin_text.value;
 else {
  error("No element with id \""+input_id+"\".");
  return;
 }
 var divisible = text.length % 8;
 var nonBinary = /[^0|1]/.test(text);
 if (text.length > 0 && divisible == 0 && !nonBinary) {
  var regex = /[0|1]{8}/g;
  var str = text.match(regex);
  var code = 0;
  var placeVal, exp, digit;
  var ascii = '';
  while (str.length > 0) {
   code = 0;
   for (var i=0; i<str[0].length; i++) {
    placeVal = 7-i;
    exp = Math.pow(2, i);
    digit = str[0].charAt(placeVal);
    code += exp*digit;
   }
   str.shift();
   ascii += String.fromCharCode(code);
  }
  answer.innerHTML = "<p class=\"binary\">" + ascii + "</p>";
 }
 else {
  error("Malformed binary.");
  return;
 }

 function error(errText) {
  answer.innerHTML = "<span class=\"error\">Error: " + errText + "</span>";
 }
}
</script>

<style type="text/css">
.block {
 width: 45%;
 border: 1px solid #000000;
 padding: 10px;
}
.binary {
 background-color: #C6FFC7;
 padding: 3px;
}
.error {
 background-color: #FFC6C6;
 padding: 3px;
}
</style>

</head>
<body>

<div style="float:left;" class="block">
 <form onSubmit="convertToASCII(); return false;">
  <p>Enter some binary to decode:</p>

  <input type="text" id="bin_text"/>
 </form>
</div>

<div style="float:right;" class="block">
 <p id="answer"><br/></p>
</div>

</body>
</html></code></pre>
<pre>

------------------------------------------------------

Macaroni maker?

maacaronipress

Good day.

Older Entries

Follow

Get every new post delivered to your Inbox.