Friday, May 30, 2014

What's your linux distro version?

A generic script to show a version of the Linux distro installed. I like to use lsb_release, but that is not always available.
release.sh
[code]

lsb_release >/dev/null 2>/dev/null
if [ $? = 0 ]
then
lsb_release -ds | sed 's/^\"//g;s/\"$//g'
# a bunch of fallbacks if no lsb_release is available
# first trying /etc/os-release which is provided by systemd
elif [ -f /etc/os-release ]
then
 
source /etc/os-release
if [ -n "${PRETTY_NAME}" ]
then
printf "${PRETTY_NAME}\n"
else
printf "${NAME}"
[[ -n "${VERSION}" ]] && printf " ${VERSION}"
printf "\n"
fi
# now looking at distro-specific files
elif [ -f /etc/arch-release ]
then
printf "Arch Linux\n"
elif [ -f /etc/gentoo-release ]
then
cat /etc/gentoo-release
elif [ -f /etc/fedora-release ]
then
cat /etc/fedora-release
elif [ -f /etc/redhat-release ]
then
cat /etc/redhat-release
elif [ -f /etc/debian_version ]
then
printf "Debian GNU/Linux " ; cat /etc/debian_version
else
printf "Unknown\n"
fi

[/code]
 
$ chmod +x  release.sh
 
 $ ./release.sh
Ubuntu 12.04.4 LTS
 
 $ ./release.sh
Arch Linux

What's your linux distro version?

A generic script to show a version of the Linux distro installed. I like to use lsb_release, but that is not always available.
release.sh
[code]

lsb_release >/dev/null 2>/dev/null
if [ $? = 0 ]
then
lsb_release -ds | sed 's/^\"//g;s/\"$//g'
# a bunch of fallbacks if no lsb_release is available
# first trying /etc/os-release which is provided by systemd
elif [ -f /etc/os-release ]
then
 
source /etc/os-release
if [ -n "${PRETTY_NAME}" ]
then
printf "${PRETTY_NAME}\n"
else
printf "${NAME}"
[[ -n "${VERSION}" ]] && printf " ${VERSION}"
printf "\n"
fi
# now looking at distro-specific files
elif [ -f /etc/arch-release ]
then
printf "Arch Linux\n"
elif [ -f /etc/gentoo-release ]
then
cat /etc/gentoo-release
elif [ -f /etc/fedora-release ]
then
cat /etc/fedora-release
elif [ -f /etc/redhat-release ]
then
cat /etc/redhat-release
elif [ -f /etc/debian_version ]
then
printf "Debian GNU/Linux " ; cat /etc/debian_version
else
printf "Unknown\n"
fi

[/code]
 
$ chmod +x  release.sh
 
 $ ./release.sh
Ubuntu 12.04.4 LTS
 
 $ ./release.sh
Arch Linux

Thursday, May 29, 2014

Not pepperoni pizza.

Cold cuts are cheaper than pepperoni.


Frittata - scrambled egg pie.

Here is a quick, inexpensive, and easy dish to feed 4-6 people who might show up unexpectedly. It is certainly a Latin (in the European sense) classic meal. Hope you enjoy it as much as we do.






Ingredients:
1 - tablespoon cooking oil.
8 - large eggs.
1 - 29 ounce can of mixed vegetables.
1/2 - cup or so of your favorite cheese. (we use our own home made cheese).
To taste:
Garlic powder.
Pepper.
Salt.

Required equipment:
Oven with a broiler.
Large heatproof pan or skillet.
heat proof gloves or pads.

Method:
Preheat broiler to 350 - 400 degrees Fahrenheit.
Put cooking oil in pan and warm to medium heat.
Scramble eggs in a bowl.
Add the seasoning's and stir to combine.
Pour into the skillet.
Add the vegetables and stir to combine so that everything is uniform.
Cook for 4 to five minutes till the bottom is firm.
Top with the cheese.
Put skillet under the broiler.
Let cook for four to five minutes.
Check on it at least once every two minutes.
Skillet will be HOT!!!
When top is brown remove from the broiler using the heat proof gloves.
Let cool for a few minutes.
Slice and serve.

Enjoy!

Ubuntu rain cloud.


Wednesday, May 28, 2014

Try using these next time...


From gravy to mac-n-cheese.

Gravy is so easy to make and inexpensive sauce for a lot of dishes. It probably was made most famous from being the usual topping for chicken fried steak. In this case we will use toast as the base.





1. Take several slices of bacon or other meat that will make grease when you fry it.
2. Fry the meat, but keep the stove on. (substitution: take solidified fat, lard, or butter)
3. Remove the meat (if you did not use the fat or butter) and put on some paper towels.
4. Remove all the oil except for about a tablespoon and a half.
5. Add about a tablespoon and a half of flour. mix well with a heat proof whisk. till it is light brown.
6. Add a cup or so of milk.
7. Stir till you get a nice thick brown slurry.
8. Add a little black pepper and mix it in.
9. Pour  the mixture on the biscuits. (you can use toast also just as well.)
10. Crumple the fried bacon on top. (if you fried the bacon)

Eat and you are in high heaven.  One plus to this is that you are two steps away from having macaroni and cheese.  add your favorite cheese (and seasonings) to the gravy mix and then mix in with some boiled and drained noodles. That easy.



Note: For a lighter more traditional gravy, use chicken stock, beef stock, vegetable stock, or even just water instead of milk.

Tuesday, May 27, 2014

Your place..

Do not you wish you could charge for food at home?


Ransomed iphones


Visually impaired can use linux!

Sometimes I forget how lucky I am to see. Not everyone has that gift. If you do not have that gift, does not mean you should be limited in using computers. Traditionally you had to let someone install linux for you, Several Linux distros now allow even the seeing and or hearing impaired to install and use Linux. As a test for myself, I took the Debian linux distro to see if I could install and use it blindfolded. As many times as I have done the text install of Linux, I did not do very well with the audio commanded install of Debian Linux (www.debian.org).  I am sure they have improved it. Then again they never advertized it as a distro for the blind. (You use the speech synthesis option).  Later you might need to install Orca if you want to use the gui.


But then you can use the distros meant to be used for the handicapped  such as  Arch (http://talkingarch.tk/). They even have an audio not video tutorial.  You could also use Vinux  (vinuxproject.org/) or Sonar (http://sonargnulinux.com/). Sonar is recommended by the TLLTS podcast team.  

There are some excellent text based utilities to start of with before you venture into the gui.


Some of my favorite programs are:
alsa sound modules – music and to support speech programs (and voice recording)
Twidge – twitter client
links2 – internet browser
ps2ascii – convert postscript files to text files.
bashpodder – audio podcast collector
alpine sendEmail – email client tools
irssi – interrelay chat
centerim – instant messaging client
vim can be used as and editor or word processor, there are many others.
antiword – for dealing with proprietary word procesing formats.
screen – allows you to easily switch remote sessions
ledger – accounting program
curl wget – web page and file extracting tools
bash – the built in programming language that can be used with awk, sed, sort tr figlet (make your own database or game programs as well as other tools).
ImageMagick suite – manipulate graphics
cadubi tetradraw – ascii drawing programs
opensched – schedule formater.
hnb – notetaking and outlining
moc mplayer aplay ffmpeg – audio tools and players.
nget newbueter – newsreader
pal – calendar/planner program
cdrecord – burn cd’s and back up computer.
ssh and other tools. – network administration/file amangement
espeak festival – voice synthesis (great for having your computer read outloud documents) Who needs a Kindle?
wyrd - calendaring program.

The bottom line is that you can do word processing. spreadsheets. database, email, listen to podcasts or even hear documents spoken. Who could ask for more?  Happy computing.

Monday, May 26, 2014

Amazing graphics with text.

In the last article, using older computers that does not use the fancy graphics of today. You actually can do quite a bit with text such as movies, radar screens and etc. though the old favorite of using a computer as a clock.  Source for the program is aclock.c (http://www.tenox.net/out/)


Another generic clock: vtcclock  (http://webonastick.com/vtclock/)




Many command line users really appreciate text graphics to make their terminals more interesting especially at the point of login.


Want to see more?  More at:  http://www.instructables.com/id/Graphics-in-a-text-world/


Amazing graphics with text.

In the last article, using older computers that does not use the fancy graphics of today. You actually can do quite a bit with text such as movies, radar screens and etc. though the old favorite of using a computer as a clock.  Source for the program is aclock.c (http://www.tenox.net/out/)


Another generic clock: vtcclock  (http://webonastick.com/vtclock/)




Many command line users really appreciate text graphics to make their terminals more interesting especially at the point of login.


Want to see more?  More at:  http://www.instructables.com/id/Graphics-in-a-text-world/


Sunday, May 25, 2014

Legacy computers.

Not my video, but I thought it was prolific. Know many adults who might have the same reaction.


https://www.youtube.com/watch?v=PF7EpEnglgk

https://www.youtube.com/watch?v=prSUUwEcTbM

For reference only: http://www.apl2bits.net/2011/04/21/uthernet-online/

Legacy computers.

Not my video, but I thought it was prolific. Know many adults who might have the same reaction.


https://www.youtube.com/watch?v=PF7EpEnglgk

https://www.youtube.com/watch?v=prSUUwEcTbM

For reference only: http://www.apl2bits.net/2011/04/21/uthernet-online/

Raspberry Pi spy?

The Rasberry Pi or RPi for short is an amazing little unit. It can be a desktop, thin client, server, or a multitude of other devices. It is a sort of jack of all trades. At http://www.instructables.com/id/Raspberry-Pi-Jack-of-all-trades  we look at some of the options of what the RPi can do. One such option is to let the Rpi be a private eye or spy device. Compared to some the commercial video units, it is a bargain in price.


Security is an important subject these days. With the RPi you can easily install yourself a spy setup without bringing in an expensive consultant. Check it out.

Raspberry Pi spy?

The Rasberry Pi or RPi for short is an amazing little unit. It can be a desktop, thin client, server, or a multitude of other devices. It is a sort of jack of all trades. At http://www.instructables.com/id/Raspberry-Pi-Jack-of-all-trades  we look at some of the options of what the RPi can do. One such option is to let the Rpi be a private eye or spy device. Compared to some the commercial video units, it is a bargain in price.


Security is an important subject these days. With the RPi you can easily install yourself a spy setup without bringing in an expensive consultant. Check it out.

Saturday, May 24, 2014

Geeks gotta eat.

Coffee makers are not just for coffee anymore. You can actually make some interesting meals. Soup of course( http://www.instructables.com/id/Tuna-noodle-coffepot-soup/), but you can even make pasta from scratch. http://www.instructables.com/id/Coffee-maker-pasta/ 
But of course those are the standards. We can actually go a bit farther and even make cheese and other goodies (http://www.instructables.com/id/Coffeemaker-meals-and-etc/ ). What will be your next coffeemaker meal?





Geeks gotta eat.

Coffee makers are not just for coffee anymore. You can actually make some interesting meals. Soup of course( http://www.instructables.com/id/Tuna-noodle-coffepot-soup/), but you can even make pasta from scratch. http://www.instructables.com/id/Coffee-maker-pasta/ 
But of course those are the standards. We can actually go a bit farther and even make cheese and other goodies (http://www.instructables.com/id/Coffeemaker-meals-and-etc/ ). What will be your next coffeemaker meal?





Web server information from the web.



Wondered if there was a way to get information about a web server from the web. After researching, I found an abandoned article with a script that fit the bill. From a few lines, the script has expanded quite nicely. The script is becoming more and more popular. You can get more information at: http://www.instructables.com/id/Simple-linux-commands-from-a-web-page/

Reprint from an earlier post that applies.

One of the things I get dismayed with is when going to the bookmarks and a link is dead. Also too, If I have several web servers I like to access, it would be nice to know if the site is up before I try to go to that site. Here we will use a small amount of PHP (another web language) that can be used with HTML just like javascript. Generally PHP is used only on servers, but you can run a local copy of it. PHP is available for most systems.



Bookmarks really do not carry that much information per se. The above example only has one entry for sake of simplicity. What I would really like to know is if that site is still good, that is up and running. So I added an extra column for the server status.


Again just one entry for sake of simplicity. Now before I even go to the site I can tell whether it is available. In the real world, you will probably will have many entries and many servers. For example, one page I use lists several servers, but some  sites are virtual so they will use the same ipaddress. There is no need to relist that information. I also want to be able to see all the servers at once to know their status.



Typo1 is offline. That is ok, because I know the server box is turned off. If it is supposed to be up then, that server needs to be attended to. You could also do this with your favorite servers (i.e. Facebook and etc.). So you have another great simple management tool. Oh yes, I said we would be using PHP and HTML. Here is the abbreviated code:

su.php:
[code]

<html>
<body>

<hr>
<center>
<h2>
Bookmarks
</h2>
</center>
<hr>

<table border="1" cellpadding="10">
<tr>
<td>
Ipaddress
</td>
<td>
Site (and link)
</td>
<td>
Description
</td>
<td>
Server status
</td>
</tr>
<tr>
<td>
192.168.1.31
</td>
<td>
<a href="http://oesrvr1">Offshore Educators</a>
</td>
<td>
School site
</td>
<td>
<?php
if (fsockopen('oesrvr1', 80)){
echo('The server is online');
} else{
echo('The server is offline');
}
?>
</td>
</tr>
</table>

</body>
</html>
[/code]

Note: The code is being run on a server and not a local machine. If you want an update, you will have to reload the page.

Web server information from the web.



Wondered if there was a way to get information about a web server from the web. After researching, I found an abandoned article with a script that fit the bill. From a few lines, the script has expanded quite nicely. The script is becoming more and more popular. You can get more information at: http://www.instructables.com/id/Simple-linux-commands-from-a-web-page/

Reprint from an earlier post that applies.

One of the things I get dismayed with is when going to the bookmarks and a link is dead. Also too, If I have several web servers I like to access, it would be nice to know if the site is up before I try to go to that site. Here we will use a small amount of PHP (another web language) that can be used with HTML just like javascript. Generally PHP is used only on servers, but you can run a local copy of it. PHP is available for most systems.



Bookmarks really do not carry that much information per se. The above example only has one entry for sake of simplicity. What I would really like to know is if that site is still good, that is up and running. So I added an extra column for the server status.


Again just one entry for sake of simplicity. Now before I even go to the site I can tell whether it is available. In the real world, you will probably will have many entries and many servers. For example, one page I use lists several servers, but some  sites are virtual so they will use the same ipaddress. There is no need to relist that information. I also want to be able to see all the servers at once to know their status.



Typo1 is offline. That is ok, because I know the server box is turned off. If it is supposed to be up then, that server needs to be attended to. You could also do this with your favorite servers (i.e. Facebook and etc.). So you have another great simple management tool. Oh yes, I said we would be using PHP and HTML. Here is the abbreviated code:

su.php:
[code]

<html>
<body>

<hr>
<center>
<h2>
Bookmarks
</h2>
</center>
<hr>

<table border="1" cellpadding="10">
<tr>
<td>
Ipaddress
</td>
<td>
Site (and link)
</td>
<td>
Description
</td>
<td>
Server status
</td>
</tr>
<tr>
<td>
192.168.1.31
</td>
<td>
<a href="http://oesrvr1">Offshore Educators</a>
</td>
<td>
School site
</td>
<td>
<?php
if (fsockopen('oesrvr1', 80)){
echo('The server is online');
} else{
echo('The server is offline');
}
?>
</td>
</tr>
</table>

</body>
</html>
[/code]

Note: The code is being run on a server and not a local machine. If you want an update, you will have to reload the page.

Collected cartoons (not mine).

A selection of collected cartoons.




Wednesday, May 21, 2014

Tuesday, May 20, 2014

EyeOS, the web based gui.

One thing I like about servers is that clients or users can run an application from a server. That means software only has to be installed and or upgraded once at a time. What a savings in support time. Places such as Sourceforge.net have many programs that can run from a web server.



Three of the most common programs that people use are a spreadsheet, word processing. and a database. One such program although it was not in the package I used was a relational database. A flatfile database could be created in the spreadsheet. The program I am talking about is eyeOS. eyeOS is sort of a computer desktop for your browser.  That means the software should be platform independent.  That means you can generally use any touchpad, desktop, laptop, or anything with a browser. No per se special setup is needed in most cases on the user side.



You do need a web server to host the software. A lamp, wamp, mamp, or similar type server should work. We use Apache a lot.The neat thing about web based apps is you do not need a gui based machine to host the software. We use and old Pentium II computer at home to host the software. In fact, I have run it on an nslu2 running debian.
 


If you would like to know more about installing eyeOS see:
http://www.instructables.com/id/eyeOS/

Nix runs almost anything.

Even the Sega Dreamcast runs nix and not MSWindows. Nix runs on almost anything.



Linux is available for
 (openbsd)

alpha Digital Alpha-based systems
amd64 AMD64-based systems
armish ARM-based appliances (by Thecus, IO-DATA, and others)
hp300 Hewlett-Packard HP 9000 series 300 and 400 workstations
hppa Hewlett-Packard Precision Architecture (PA-RISC) systems
i386 Standard PC and clones based on the Intel i386 architecture and compatible processors
landisk IO-DATA Landisk systems (such as USL-5P) based on the SH4 cpu
loongson Loongson 2E- and 2F-based systems, such as the Lemote Fuloong and Yeeloong, Gdium Liberty, etc.
luna88k Omron LUNA-88K and LUNA-88K2 workstations
macppc New World PowerPC-based machines, from the iMac onwards
mvme68k Motorola 680x0-based VME systems
mvme88k Motorola 881x0-based VME systems
sgi SGI MIPS-based workstations
socppc Freescale PowerPC SoC-based machines
sparc Sun sun4, sun4c, sun4e and sun4m class SPARC systems
sparc64 Sun UltraSPARC and Fujitsu SPARC64 systems
vax Digital VAX-based systems
zaurus Sharp Zaurus C3x00 PDAs

Nix runs almost anything.

Even the Sega Dreamcast runs nix and not MSWindows. Nix runs on almost anything.



Linux is available for
 (openbsd)

alpha Digital Alpha-based systems
amd64 AMD64-based systems
armish ARM-based appliances (by Thecus, IO-DATA, and others)
hp300 Hewlett-Packard HP 9000 series 300 and 400 workstations
hppa Hewlett-Packard Precision Architecture (PA-RISC) systems
i386 Standard PC and clones based on the Intel i386 architecture and compatible processors
landisk IO-DATA Landisk systems (such as USL-5P) based on the SH4 cpu
loongson Loongson 2E- and 2F-based systems, such as the Lemote Fuloong and Yeeloong, Gdium Liberty, etc.
luna88k Omron LUNA-88K and LUNA-88K2 workstations
macppc New World PowerPC-based machines, from the iMac onwards
mvme68k Motorola 680x0-based VME systems
mvme88k Motorola 881x0-based VME systems
sgi SGI MIPS-based workstations
socppc Freescale PowerPC SoC-based machines
sparc Sun sun4, sun4c, sun4e and sun4m class SPARC systems
sparc64 Sun UltraSPARC and Fujitsu SPARC64 systems
vax Digital VAX-based systems
zaurus Sharp Zaurus C3x00 PDAs

Internet not required.

You can actually have a network without depending on the interneR. Some people might joke that it ia an internet of nothing aka ION.




Now we hear about the IOT or internet of things.  Where you and anyone else can access your network from anywhere.  That may or may not be such a good thing.What can you do? You can build you own net where you  have more control and everything is accessed locally, so the internet being down does not affect what you do.




Basic setup (part 1). http://www.instructables.com/id/Your-personal-intranet-Part-1/


More goodies (part 2). http://www.instructables.com/id/Your-personal-intranet-Part-2/


For small offices and neighborhood setups, these ideas can be a boon to privacy.

Internet not required.

You can actually have a network without depending on the interneR. Some people might joke that it ia an internet of nothing aka ION.




Now we hear about the IOT or internet of things.  Where you and anyone else can access your network from anywhere.  That may or may not be such a good thing.What can you do? You can build you own net where you  have more control and everything is accessed locally, so the internet being down does not affect what you do.




Basic setup (part 1). http://www.instructables.com/id/Your-personal-intranet-Part-1/


More goodies (part 2). http://www.instructables.com/id/Your-personal-intranet-Part-2/


For small offices and neighborhood setups, these ideas can be a boon to privacy.