Home

Electonic stuff.

Leave a comment

chit chat

=======

Busy weekend with repairs and etc.

Saw the old Makezine Tv series on over the air TV. They usually come onin the middle Saturday morning.

Ubunru 14.04 has a lot of maturing to do.

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

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.

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

Note: adapter used was http://www.instructables.com/id/No-solder-parallel-port-break-out/

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

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

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

This was not my project, but I really would like to try it. Sort of a 3d mouse. You should have good familiarity with the Arduino to do this project.  This definitely a project that could apply to the handicapped.

Parts:
Aluminum foil (1)
Masking tape (1)
Computer with Processing and Arduino software installed (1)
Shielded cable, cut off the ends, cut into (3) 2′ lengths (1) from RadioShack.
Arduino (1) from RadioShack.
10KΩ resistors (3) from RadioShack.
220KΩ resistors (3) from RadioShack.
Alligator clips (3) from RadioShack.
pieces of cardboard (3)
Main circuit: (left side to the Arduino and right side to each of the three foil plates.)

Unit hookup:

Arduino hookup:

Software download links:

Processing:  https://processing.org/download/?processing
Arduino: https://github.com/Make-Magazine/3DInterface

More information at: http://makezine.com/projects/a-touchless-3d-tracking-interface/

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

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.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, 0for 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,0rnd.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

Note: adapter used was http://www.instructables.com/id/No-solder-parallel-port-break-out/

Good day.

Getting back to basics.

Leave a comment

Chit chat

=======

I’m kind of quiet this week, but  here is a cartoon or two:

Building a six plus node analog computer cluster. An analog computer is a device that measures some value.

Future programmer.
Podcast?
She’s trying to get into your computer.
Bash issue…

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

Good old fashioned office.

Standalone packages

Database:

Word processor:

Spreadsheet:
Integrated packages:
Office packages:

 

 

Integrated ERP/CMS:
Beyond…..
———————————————————
Five basic components of computer system1.Input Unit
2.Output Unit
3.Storage Unit
4.Central Processing Unit (CPU)
5.Arithmetic and Logic Unit (ALU)
6.Control UnitThe internal architectural design of computers differs from one system model to another. However, the basic organization remains the same for all computer systems. The following five units (also called “The functional units”) correspond to the five basic operations performed by all computer systems.1. Input UnitData and instructions must enter the computer system before any computation can be performed on the supplied data. The input unit that links the external environment with the computer system performs this task. Data and instructions enter input units in forms that depend upon the particular device used. For example, data is entered from a keyboard in a manner similar to typing, and this differs from the way in which data is entered through a mouse, which is another type of input device. However, regardless of the form in which they receive their inputs, all input devices must provide a computer with data that are transformed into the binary codes that the primary memory of the computer is designed to accept. This transformation is accomplished by units that called input interfaces. Input interfaces are designed to match the unique physical or electrical characteristics of input devices to the requirements of the computer system.In short, an input unit performs the following functions.
It accepts (or reads) the list of instructions and data from the outside world.
It converts these instructions and data in computer acceptable format.
It supplies the converted instructions and data to the computer system for further processing.2. Output UnitThe job of an output unit is just the reverse of that of an input unit. It supplied information and results of computation to the outside world. Thus it links the computer with the external environment. As computers work with binary code, the results produced are also in the binary form. Hence, before supplying the results to the outside world, it must be converted to human acceptable (readable) form. This task is accomplished by units called output interfaces.In short, the following functions are performed by an output unit.
It accepts the results produced by the computer which are in coded form and hence cannot be easily understood by us.
It converts these coded results to human acceptable (readable) form.
It supplied the converted results to the outside world.3. Storage Unit (Memory and off-line storage memory).The data and instructions that are entered into the computer system through input units have to be stored inside the computer before the actual processing starts. Similarly, the results produced by the computer after processing must also be kept somewhere inside the computer system before being passed on to the output units. Moreover, the intermediate results produced by the computer must also be preserved for ongoing processing. The Storage Unit or the primary  main storage of a computer system is designed to do all these things. It provides space for storing data and instructions, space for intermediate results and also space for the final results.In short, the specific functions of the storage unit are to store:
All the data to be processed and the instruction required for processing (received from input devices).
Intermediate results of processing.
Final results of processing before these results are released to an output device.4. Central Processing Unit (CPU)

The main unit inside the computer is the CPU. This unit is responsible for all events inside the computer. It controls all internal and external devices, performs “Arithmetic and Logical operations”. The operations a Microprocessor performs are called “instruction set” of this processor. The instruction set is “hard wired” in the CPU and determines the machine language for the CPU. The more complicated the instruction set is, the slower the CPU works. Processors differed from one another by the instruction set. If the same program can run on two different computer brands they are said to be compatible. Programs written for IBM compatible computers will not run on Apple computers because these two architectures are not compatible.The control Unit and the Arithmetic and Logic unit of a computer system are jointly known as the Central Processing Unit (CPU). The CPU is the brain of any computer system. In a human body, all major decisions are taken by the brain and the other parts of the body function as directed by the brain. Similarly, in a computer system, all major calculations and comparisons are made inside the CPU and the CPU is also responsible for activating and controlling the operations of other units of a computer system.4. Arithmetic and Logic Unit (ALU)

The arithmetic and logic unit (ALU) of a computer system is the place where the actual execution of the instructions take place during the processing operations. All calculations are performed and all comparisons (decisions) are made in the ALU. The data and instructions, stored in the primary storage prior to processing are transferred as and when needed to the ALU where processing takes place. No processing is done in the primary storage unit. Intermediate results generated in the ALU are temporarily transferred back to the primary storage until needed at a later time. Data may thus move from primary storage to ALU and back again as storage many times before the processing is over. After the completion of processing, the final results which are stored in the storage unit are released to an output device.

The arithmetic and logic unit (ALU) is the part where actual computations take place. It consists of circuits that perform arithmetic operations (e.g. addition, subtraction, multiplication, division over data received from memory and capable to compare numbers (less than, equal to, or greater than).

While performing these operations the ALU takes data from the temporary storage are inside the CPU named registers. Registers are a group of cells used for memory addressing, data manipulation and processing. Some of the registers are general purpose and some are reserved for certain functions. It is a high-speed memory which holds only data from immediate processing and results of this processing. If these results are not needed for the next instruction, they are sent back to the main memory and registers are occupied by the new data used in the next instruction.

All activities in the computer system are composed of thousands of individual steps. These steps should follow in some order in fixed intervals of time. These intervals are generated by the Clock Unit. Every operation within the CPU takes place at the clock pulse. No operation, regardless of how simple, can be performed in less time than transpires between ticks of this clock. But some operations required more than one clock pulse. The faster the clock runs, the faster the computer performs. The clock rate is measured in megahertz (Mhz) or Gigahertz (Ghz). Larger systems are even faster. In older systems the clock unit is external to the microprocessor and resides on a separate chip. In most modern microprocessors the clock is usually incorporated within the CPU.

6. Control Unit

How the input device knows that it is time for it to feed data into the storage unit? How does the ALU know what should be done with the data once it is received? And how is it that only the final results are sent to the output devices and not the intermediate results? All this is possible because of the control unit of the computer system. By selecting, interpreting, and seeing to the execution of the program instructions, the control unit is able to maintain order and directs the operation of the entire system. Although, it does not perform any actual processing on the data, the control unit acts as a central nervous system for the other components of the computer. It manages and coordinates the entire computer system. It obtains instructions from the program stored in main memory, interprets the instructions, and issues signals that cause other units of the system to execute them.

The control unit directs and controls the activities of the internal and external devices. It interprets the instructions fetched into the computer, determines what data, if any, are needed, where it is stored, where to store the results of the operation, and sends the control signals to the devices involved in the execution of the instructions.

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

In an earlier article we briefly discussed the start, stop, and flow symbols. Now let us add one more symbol. Now let’s add the rectangle to represent process or arithmetic calculation. Computers have memory. We can represent a piece of memory with a symbol known as a variable. Variables can change value at any time we want them to. Usually when we change a variable, we assign a new value to it or we just want to define a part of memory to a particular variable.

In this case, we want define part of memory to be known as “A” and then assign the value of zero to it. We could also say that “A” was assigned a starting value of zero sort of like algebra you may have learned in school. So the program above starts, then assigns the value of zero to “A”, and then just stops  So far that does not seem very practical, but it is still a program.

So now so far, we have four tools to work with. Let’s review. Every program must have a starting and an ending point or termination. We need to have flowlines to describe how the program gets from the beginning to the end. Now we have a way to define a process or something to do in the program we have just created. This program might be represented in code as (rem stands for remarks or programmer notes that will not be executed by the computer):

‘rem start
A=0
end

or

‘rem start
‘rem assign values
let A = 0
‘rem stop
end

or you could go a bit further for documentation purposes:

‘****************************************
‘  Program start


‘=========================
‘Variable assigment (aka starting values)

Let A = 0

‘=========================
‘  Program stop (this is the end of the program)
end

‘****************************************

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

One of the most often asked questions I hear is “What language should I learn.?”. Can not really tell you the answer to that. Then I ask, what are going to do with your programming skills? The answer is many times they do not know. They just want to be a programmer. Many times they see the big dollar signs, but programming is not really where their heart is sometimes.

Usually for future programmers I recommend having two disciplines. For instance, how can you do an accounting program if you have no idea how debits and credits at the minimum even work. You need to know about what you want to program for. In most cases, people in a particular industry feel they do not have the software that meets their needs. They go on a quest to develop such software.

Now let us go one step further. You need to know more than a language. You need to understand logic modules, just like there are different rooms in a house. All houses have the basic rooms, but they are all not attached in the same way. So is it true of software. You will need to learn the basic constructs to apply them in programming. Some say musicians can make good programmers, because they are used to putting parts of songs together. You will also need to be a good problem solver to be a programmer. No piece of software works the first time.

If you have ever done a “todo” list, you have written a program aka a piece of software for humans. Unless you are an independent programmer, you will not be developing the code from scratch, You will have guidelines that will usually come from a systems analyst or the like. Those guidelines may come in either the form of a flowchart (sort of an architect’s blueprint) or it may come in some form of “todo” list such as pseudocode. It will be your job to translate those instructions in to a computer language program.

What makes up a program? Lots of instructions. Just like you speak English or even another language, you know you have to say things in a certain way so that you will be understood by the instructions you want to convey. You need to know the syntax or the constructs (there is that word again) of the programming language you are using to write your program. That leads people to want to use the language both spoken and as a program that you feel comfortable with. Only you can decide what that is for you.  What languages are there?

As for languages, some of them were developed to accomplish certain tasks easier. In the early days, Many people in the sciences learned Fortran (formula translation) because it was good for doing heavy computation. then again people use Cobol (common business oriented language) because it was good for business, self documenting  and was very much like using English. Now there are a zillion languages for a variety of purposes or just what someone liked at the time. There are also languages that were meant for teaching about computing such as Pascal, Basic, Python, and C (and it’s variants).

In some cases, especially working for an employer, more than likely you will not get to choose the programming language will program with. Be flexible. Just like now it is good to know more than one oral language even if you do not speak it fluently. Knowing even a little bit, makes it easier to communicate with others. makes it easier to translate computer code from one language to another. The Basic language is now sort of frowned upon. It is a shame. I like to use old books with Basic computer programs and translate them to what I can use. For example, mathematics is not my strong point. I found an old program that created what is known as a sine wave. I translated that into what I could use. So it is best to be multilingual both in programming and in oral conversations.

Now that we have gone through all of that, what is next? Of course, you want to write a program. You have either read a book, magazine article, took a class, or even looked at some old programs, that you would like to try!  You will need a program that will translate what you create into what the computer can understand or a sort of a translator. All computer language translators do not come with all machines. You can go online to places like compileonline.com to start entering programs to see the results. Computeronline.com has a wealth of programming languages to choose from. There you can experiment in coding and learning a language.

For a survey of a few languages see: http://computoman.blogspot.com/2014/09/freedom-of-assembly.html In my case, I wanted to learn a bit of Java. so I went to the java option and entered some code to see what would happen.

So now you have a sandbox to try several languages to see what you personally may like,

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

Whether you prefer a graphical user interface such as:

Where all you have to do is just double click a picture is so sexy and seems very easy. Let’s consider and alternative where all you have to do is just press a single key to start the program you want:

But then you could actually sort of do the same thing with an interface like this:

Oh but it is not as sexy some might say. It does exactly the same thing, but without using so many system resources. Not only that but you could get even more choices without having to redo the desktop. So if you pressed 1, you would get:

Or if you pressed 2 than you would get:

All this was done without any swiping!  Of course that does not prevent you from using your favorite program such as a spreadsheet or whatever:

But then you could do sort of the same thing with a text based alternative like homecalc or sc:

With all the embedded devices such as the Raspberry Pi and the like, you will want to be as resource conscious as you can.  Or to put it in another way, with all the impending issues in the world, what if computers, hand held devices and the like were stopped from being made? You still have to compute. What would you use? Those old systems in the closet do not look so bad now!?! Do not worry, computers will not be stop being made.

———————————————————————
A bit of code:

echo “************************”
echo “* Music programs       *”
echo “************************”
echo “* [1] Autoharp         *”
echo “* [2] Radio            *”
echo “*                      *”
echo “* [0] Exit/Stop        *”
echo “************************”
echo
echo “Enter your menu choice [1-2, or 0]: “
read -n 1 yourch
case $yourch in
1) autoharp.sh  ;;
2) radio.sh ;;
0) exit 0 ;;
*) echo “Oopps!!! Please select choice 1,2 or 0″
echo “Press Enter to continue. . .” ; read ;;
esac
done

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

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 big named computer company: 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 babyOPINION

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

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.sh
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.
####################################

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

Schools spend a a lot of money on computer education management systems  such as the following: (values are subject to change at any time.)

Blackboard has dominated the market including try to allegedly sue out of business their competitors.  If your a small school with less than a hundred students, a thousand dollars a per student seems a bit extreme to me unless you can afford it.  The login in can tell you a lot about an institution. Lee college gives you the chance to look at potential courses.

Yet, when I see a credit card pictured and focused on, I wonder if the they are only looking for your money. Could be a turnoff for a potential student.

Now let’s look at an open source alternative. No money mentioned and you can again grab information without even signing up.

The cost of the Moodle software alone is $0 per student, allowing institutions to be more competitive. It is at least something to look at if you are an education administrator. Used Moodle a long time. Just did a fresh server install for testing. There are already many pre-setup modules you can use such as: http://moodle.net/?downloadable=1&submitbutton=Search+for+courses

Plus there are dozens of other sources with just a web search. i.e.  http://moodleshare.org/

Check out http://moodle.synergy-learning.com/.

 

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

Penne pasta and red sauce.

SUNP0081

Good day.

Pxe booting to a linux install.

Leave a comment

Chit chat

=======

Finally started putting back together my desktop. so I can get off a borrowed laptop.

This weekend is for building electeronic stuff.

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

Just a few notes about doing an http based linux install.

 

Linux Debian is kind of taking of the reigns of being one of the most popular linux distros. Like installing any operating system the traditional way, you can run into roadblocks.  For example, you may not be able to burn a linux cd, the machine you want to load linux on has a broken cd/dvd rom, or a host of other reasons. What we are about to do is what is known as pxeboot networking. Another words we will use a web server to get us started with a linux install on a system. Traditionally you actually had to have several servers to do the network install. You had to modify a Dhcp (Ipaddress servers) server,  a Tftp (boot files) server, and among other systems which general required a lot of setup and the blessing of the system administrator,

Tried this with the python web server, but you have to have all the files in one directory from what I could see.  I just did not want to take the time to do it.

$ python -m SimpleHTTPServer

I went ahead and used the Apache2 web server. You can get portable versions of the Apache2 web server so that there is not much to install. But before I get ahead of myself, we need a way to boot the target computer to access the network.

Etherboot led the way in this direction and had now graduated to Ipxe. (more information at http://www.etherboot.org). So we need to make a boot disk for the computer we want to install linux on. You have severaal choices. For our purposes a floppy will be used. You can also use a cd/dvd rom disk and or a very small usb stick. We need to go to http://www.romomatic.org to create the boot media for our system.

We chose the floppy disk. Now even though we can use the floppy disk to access the network, we need to add a short script to let the floppy know about the web server we want to use. in our case the script was for oeorgan1 using the debian in /var/www directory. The script is pretty standard so all we had to do was to change one line of the script.

#!gpxe
echo Performing DHCP on first network interface
dhcp net0
set 209:string pxelinux.cfg/default
set 210:string http://oeorgan1/debian/
chain ${210:string}pxelinux.0

You will press the customization button to get the text box where to enter the script. If the script is ok, the you want to save it to your existing system.  It is usually saved as a very long name so I use the gui to rename it to test.dsk.

Now we need to get the image written to the floppy and that is pretty easy,

$ sudo dd if=test.dsk of=/dev/fd0

Note: on newer systems it might be something like:

$ sudo dd if=gpxe-1.0.1+-gpxe.dsk of=/dev/sdb

The client machine is ready to go, so now let us look at the server. You probably want to make a special directory such as debian in your document root. /var/www/.

$ sudo mkdir debian
$ cd debian

Now that we have a place to store the files we need to download them. Remember we will not have to burn a dvd. Here is where the files are, so all you have to do is download them directly to your web server,

$ sudo wget http://debian.linuxmint.com/incoming/dists/testing/main/installer- i386/current/images/netboot/netboot.tar.gz

The we need to expand the archive in the /var/www/debian directory.

$ tar zxvf netboot.tar.gz

Then you also need to get the cdrom image file for your system. In this case we are going for the i386 version,

$ wget http://ftp.nl.debian.org/debian/dists/wheezy/main/installer-i386/current/images/netboot/mini.iso

That is all you need! Make sure your apache2 web server is running though.

$ sudo service apache2 status

Apache is running (pid 12345)

Now it is time to boot up your client machine with the floppy media!

 

In just a few seconds you should get the install menu. Now the rest of the install should come from the internet. That is another article. We have our server set up to support several linux distros. i.e. Debian, Mint,  Ubuntu, and others. Using a standard boot media, there is.no need to burn new cd’s every time a new version of linux comes out.  Have fun!

Even if your computer does not have a floppy drive you can get a usb floppy drive fairly cheap. Since the data on the floppy is so small, it should not take long to load even with a usb floppy drive.. For mass installs we recommend the cobbler, drbd/clonezilla, or as a last resort the Fog software. I will talk about them later.  Last but not least you can also use this method to install MSWindows systems.

 

Arch Linux Netboot Live System

The Arch Linux netboot environment allows booting Arch Linux live media directly over the network. It will boot into a menu where you can choose from a list of available mirrors. The image will be downloaded into memory.
Requirements: A computer that connects to the internet via LAN and DHCP.
If your ethernet NIC is not supported by iPXE, you must use your NIC’s netboot capabilities. This is only possible if you select “Boot from network” in the BIOS and configure your DHCP server to load the PXE image provided below. In this case, the UNDI driver will be used for downloads until Linux is booted. The first stage of the download can be extremely slow.

Test netboot with qemu

Download an iPXE kernel image.

Run qemu with the kernel image:

qemu -m 1G -kernel ipxe.lkrn

Boot with any Linux bootloader

Download an iPXE kernel image to /boot.

Add the image to your bootloader configuration:
GRUB 2:

menuentry 'Arch Linux Netboot Environment' {
  set root='(hd0,1)'
  linux16 /ipxe.lkrn
}

Syslinux:

LABEL archnetboot
MENU LABEL Arch Linux Netboot Environment
KERNEL /ipxe.lkrn

GRUB Legacy:

title Arch Linux Netboot Environment
    kernel (hd0,0)/ipxe.lkrn

Boot from USB

Install a bootloader (e.g. GRUB or syslinux) onto the USB drive and use the .lkrn file as described above.

Boot from Floppy

Download an iPXE floppy image.

Write the image to your floppy:

dd if=ipxe.dsk of=/dev/fd0

Boot from CD

Download an iPXE ISO image and write it to a CD.

Boot from the network   (from the Arch documentation)

There are two ways to do this:

Using an iPXE image

Download an iPXE PXE image into your TFTP root.

Set the PXE filename to ipxe.pxe (using the filename option in dhcpd or the -M option in dnsmasq).
This method is recommended, as it will always work – if iPXE lacks a native NIC driver, the UNDI driver will be used.

Flashing your boot ROM

You can build a custom iPXE images and flash it to your boot ROM. You must include one of the following iPXE scripts:

If you do this, your computer will always boot the Arch netboot environment when you netboot your computer.

 

Been spending time looking at booting systems to the net to install linux operating systems. So far we have looked at Arch and Debian based systems. Both Fedora and Centos have pre-made iso’s for network install.

Centos:

http://www.centos.org/download/

Fedora:

http://fedoraproject.org/en/get-fedora

But if you want to roll your own, here are some scripts to look at:

Fedora

#!ipxe
dhcp any
# Set source URI
set mirror http://download.fedoraproject.org/pub/fedora/linux/releases/20

# Detect CPU architecture and calculate repository URI
set arch i386
set repo ${mirror}/Fedora/${arch}/os

# Start installer
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
initrd ${repo}/images/pxeboot/initrd.img
boot

or

#!ipxe
dhcp any
# Set source URI
set mirror http://download.fedoraproject.org/pub/fedora/linux/releases/18

# Detect CPU architecture and calculate repository URI
cpuid –ext 29 && set arch x86_64 || set arch i386
set repo ${mirror}/Fedora/${arch}/os

# Start installer
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
initrd ${repo}/images/pxeboot/initrd.img
boot

or older releases

#!ipxe
dhcp any
# Set source URI
set mirror http://archives.fedoraproject.org/pub/archive/fedora/linux/releases/14

# Detect CPU architecture and calculate repository URI
set arch i386
set repo ${mirror}/Fedora/${arch}/os

# Start installer
kernel ${repo}/images/pxeboot/vmlinuz initrd=initrd.img repo=${repo}
initrd ${repo}/images/pxeboot/initrd.img
boot

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

Centos

dhcp any
set base http://mirror.centos.org/centos/6/os/x86_64
kernel ${base}/images/pxeboot/vmlinuz stage2=${base}/images/install.img ksdevice=${netX/mac}
initrd ${base}/images/pxeboot/initrd.img
boot

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

Our local server ipxe script

dhcp any
set base http://oeorgan1/distro/centos
kernel ${base}/pxeboot/vmlinuz stage2=${base}/install.img ksdevice=${netX/mac}
initrd ${base}/pxeboot/initrd.img
boot

Files  for local server needed:

${base}/
boot.iso
install.img
${base}/pxeboot/
initrd.img
vmlinuz

 —————————————————
Stromboli biscuit:
stroboli
Good day.

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.

Older Entries

Follow

Get every new post delivered to your Inbox.