Sunday, April 27, 2014

Be a sort of weather person.

You can get all kinds of gadgets for your desktop that usually sit on the top panel. One of them that can be very important is the weather.  The unit is called a barometer, which was allegedly invented in 1643 by Evangelista Torricelli.  You may need to elect to display the barometric pressure on your panel outtake.






Normally during clear weather, the measure is above 30. Where you may live it may vary. In our case, the pressure is dropping. This can mean that rain is coming. And rain is in the forecast for the next day or so, Gives you a chance to outsmart the weatherman. So higher pressure is good weather for the most part.

Not only can you predict the weather, you might predict when the fish might bite! Fish are much more comfortable when there's stable high pressure, and tend to feed actively most anywhere within the water column. So do not expect good fishing if it is going to get cold or bad weather is coming.

You can build your own non-precise barometer with materials around the house. A jar, balloon, tape, a straw, and a chart are pretty much what you need to build it. The main thing you want to look at are the trends. Is the straw going down, up, or just sitting still.




Have fun!

Something else, you might like: http://computoman.blogspot.com/2013/09/weather-report.html

Be a sort of weather person.

You can get all kinds of gadgets for your desktop that usually sit on the top panel. One of them that can be very important is the weather.  The unit is called a barometer, which was allegedly invented in 1643 by Evangelista Torricelli.  You may need to elect to display the barometric pressure on your panel outtake.






Normally during clear weather, the measure is above 30. Where you may live it may vary. In our case, the pressure is dropping. This can mean that rain is coming. And rain is in the forecast for the next day or so, Gives you a chance to outsmart the weatherman. So higher pressure is good weather for the most part.

Not only can you predict the weather, you might predict when the fish might bite! Fish are much more comfortable when there's stable high pressure, and tend to feed actively most anywhere within the water column. So do not expect good fishing if it is going to get cold or bad weather is coming.

You can build your own non-precise barometer with materials around the house. A jar, balloon, tape, a straw, and a chart are pretty much what you need to build it. The main thing you want to look at are the trends. Is the straw going down, up, or just sitting still.




Have fun!

Something else, you might like: http://computoman.blogspot.com/2013/09/weather-report.html

Thursday, April 24, 2014

Poof it might be gone.

Hope that your data in the cloud never gets held hostage or even just disappears. So how secure is your data on the web? Can you afford to lose your web presence because government interference, a website's hardware issues,or even the company holding your web presence  and or data hostage? What's your backup?

Poof it might be gone.

Hope that your data in the cloud never gets held hostage or even just disappears. So how secure is your data on the web? Can you afford to lose your web presence because government interference, a website's hardware issues,or even the company holding your web presence  and or data hostage? What's your backup?

Multihomed nics.

More and more people are wanting to separate their private network from the internet but still want to access both for a system or two. No problem. You can set up multihomed nics faily easily and all things being equal, no packets should go between the two.


If you have 2 NIC (network Lan card) each connected to different networks:

=> eth0: 192.168.1.0/24
=> eth1: 192.168.2.0/24

Consider above setup. Now if you want to route traffic to connected network only (eth0 and eth1) w/o setting Linux server as a router. This is generally called multi homing setup. You don't have to setup Linux box as a router to use multi homing :). Just assign as IP address to each NIC and you are done.

How do I configure Linux multi homing?

Just assign each interface IP address using ifconfig or use DHCP and multi homing will be turned on:

# ifconfig eth0 192.168.1.254 up
# ifconfig eth1 192.168.2.254 up


Commonly, most admin confuse the idea of multi-homing with the concept of routing or IP forwarding. Once two IP address assigned your system follows the default. No special configuration needed. Your multi-homing is up and running :).

 Private network setup:
http://www.instructables.com/id/Your-personal-intranet-Part-1/
http://www.instructables.com/id/Your-personal-intranet-Part-2/

Multihomed nics.

More and more people are wanting to separate their private network from the internet but still want to access both for a system or two. No problem. You can set up multihomed nics faily easily and all things being equal, no packets should go between the two.


If you have 2 NIC (network Lan card) each connected to different networks:

=> eth0: 192.168.1.0/24
=> eth1: 192.168.2.0/24

Consider above setup. Now if you want to route traffic to connected network only (eth0 and eth1) w/o setting Linux server as a router. This is generally called multi homing setup. You don't have to setup Linux box as a router to use multi homing :). Just assign as IP address to each NIC and you are done.

How do I configure Linux multi homing?

Just assign each interface IP address using ifconfig or use DHCP and multi homing will be turned on:

# ifconfig eth0 192.168.1.254 up
# ifconfig eth1 192.168.2.254 up


Commonly, most admin confuse the idea of multi-homing with the concept of routing or IP forwarding. Once two IP address assigned your system follows the default. No special configuration needed. Your multi-homing is up and running :).

 Private network setup:
http://www.instructables.com/id/Your-personal-intranet-Part-1/
http://www.instructables.com/id/Your-personal-intranet-Part-2/

Saturday, April 19, 2014

Rock, paper, or scissors.

Game of Rock, paper, or scissors. Should be able to run on any platform that can support the Python interpreter.

$ python rps.py
or
c:/[pythondirectory]> python rps.py


rps.py
[code]

import random
import sys


def makeYourChoice():
    print "Press R for Rock"
    print "Press P for Paper"
    print "Press S for Scissors"
    print "Press Q to quit!"

    userChoice = raw_input("What do you want to choose?").lower()
    
    if userChoice == "r":
        return "Rock"
    if userChoice == "p":
        return "Paper"
    if userChoice == "s":
        return "Scissors"
    if userChoice == "q":
        sys.exit(0)
    else:
        makeYourChoice()

def computerRandom():
    options = ["Rock","Paper","Scissors"]
    randomChoice = random.randint(0,2)
    return options[randomChoice]

def comparison(humanChoice, computerChoice):
    if humanChoice == computerChoice:
        return "Draw"
    if humanChoice == "Rock" and computerChoice == "Paper":
        return "Computer Wins"
    if humanChoice == "Paper" and computerChoice == "Scissors":
        return "Computer Wins"
    if humanChoice == "Scissors" and computerChoice == "Rock":
        return "Computer Wins"
    else: return "Human Wins"

#print makeYourChoice()

while True:
    humanChoice = makeYourChoice()
    computerChoice =  computerRandom()

    print "You chose", humanChoice
    print "The computer chose", computerChoice

    result = comparison (humanChoice, computerChoice)

    if result == "Draw":
        print "Its a draw"
    elif result == "Computer Wins":
        print "Unlucky you lost!"
    else: print "Well done you won!"

    print " "

[/code]

Rock, paper, or scissors.

Game of Rock, paper, or scissors. Should be able to run on any platform that can support the Python interpreter.

$ python rps.py
or
c:/[pythondirectory]> python rps.py


rps.py
[code]

import random
import sys


def makeYourChoice():
    print "Press R for Rock"
    print "Press P for Paper"
    print "Press S for Scissors"
    print "Press Q to quit!"

    userChoice = raw_input("What do you want to choose?").lower()
    
    if userChoice == "r":
        return "Rock"
    if userChoice == "p":
        return "Paper"
    if userChoice == "s":
        return "Scissors"
    if userChoice == "q":
        sys.exit(0)
    else:
        makeYourChoice()

def computerRandom():
    options = ["Rock","Paper","Scissors"]
    randomChoice = random.randint(0,2)
    return options[randomChoice]

def comparison(humanChoice, computerChoice):
    if humanChoice == computerChoice:
        return "Draw"
    if humanChoice == "Rock" and computerChoice == "Paper":
        return "Computer Wins"
    if humanChoice == "Paper" and computerChoice == "Scissors":
        return "Computer Wins"
    if humanChoice == "Scissors" and computerChoice == "Rock":
        return "Computer Wins"
    else: return "Human Wins"

#print makeYourChoice()

while True:
    humanChoice = makeYourChoice()
    computerChoice =  computerRandom()

    print "You chose", humanChoice
    print "The computer chose", computerChoice

    result = comparison (humanChoice, computerChoice)

    if result == "Draw":
        print "Its a draw"
    elif result == "Computer Wins":
        print "Unlucky you lost!"
    else: print "Well done you won!"

    print " "

[/code]

Temporary alternative to wireless networking.

There are times when you just need a quick connection at home or in a small office and setting up wireless can be a real hassle not to mention potential security issues. Instead you might consider ethernet over power aka eop. Advantages are that it is all plug and play, you can even use use house wiring as your medium. You will need at least two modules (on for each side of the connection,) i have seen a set of modules for under thirty dollars. That is not much more than the price of a good Nic.



Give it a try.

Temporary alternative to wireless networking.

There are times when you just need a quick connection at home or in a small office and setting up wireless can be a real hassle not to mention potential security issues. Instead you might consider ethernet over power aka eop. Advantages are that it is all plug and play, you can even use use house wiring as your medium. You will need at least two modules (on for each side of the connection,) i have seen a set of modules for under thirty dollars. That is not much more than the price of a good Nic.



Give it a try.

Thursday, April 17, 2014

Closed source vs open source software.

Someone asked me the difference between closed source and open source software. For a layman, I thought the best way might be to use pictures. Closed source might be like a tv dinner where everything is almost precooked. Until you get the meal out of the box and into the microwave or oven (if the meal supports an oven), there is little you can do to change or alter the meal. But you have the advantage of no recipes to follow and it is easy per se to prepare. One shortcoming though is you do not know where the ingredients came from or how it was prepared.




Actually this tv dinner was cheaper than expected and quite good to eat. I was surprised. The portions were exacting though. Added some butter for the mashed potatoes and the corn. With open source things are a bit different. You have to go out buy all the groceries to prepare and cook the meal. There is an advantage here is that you can inspect the ingredients to make sure you have what you want. You can also either use prepared recipes, modify the prepared recipes to your likes, or you can even make up your own recipes for preparing the meal. I am no cook by any shape or means, but sometimes I like to do something different you generally will not find in a tv dinner. For example, I like to make my own buttermilk biscuits from scratch, pasta from scratch, or many other choices.




In the picture above, I made banana bread and pudding from scratch, Also have cooked pork chops to my liking, made homemade gravy, hand cut salad, and vegetables. A meal fit for a king. I can also choose the portion size of my preference, I did cheat a bit by using store bought bread. Oh well, that is part of the choices you get to make when preparing your own dinner. Mixing and matching makes dinner more fun. Hope that helps define the difference between closed source and open source.

Closed source vs open source software.

Someone asked me the difference between closed source and open source software. For a layman, I thought the best way might be to use pictures. Closed source might be like a tv dinner where everything is almost precooked. Until you get the meal out of the box and into the microwave or oven (if the meal supports an oven), there is little you can do to change or alter the meal. But you have the advantage of no recipes to follow and it is easy per se to prepare. One shortcoming though is you do not know where the ingredients came from or how it was prepared.




Actually this tv dinner was cheaper than expected and quite good to eat. I was surprised. The portions were exacting though. Added some butter for the mashed potatoes and the corn. With open source things are a bit different. You have to go out buy all the groceries to prepare and cook the meal. There is an advantage here is that you can inspect the ingredients to make sure you have what you want. You can also either use prepared recipes, modify the prepared recipes to your likes, or you can even make up your own recipes for preparing the meal. I am no cook by any shape or means, but sometimes I like to do something different you generally will not find in a tv dinner. For example, I like to make my own buttermilk biscuits from scratch, pasta from scratch, or many other choices.




In the picture above, I made banana bread and pudding from scratch, Also have cooked pork chops to my liking, made homemade gravy, hand cut salad, and vegetables. A meal fit for a king. I can also choose the portion size of my preference, I did cheat a bit by using store bought bread. Oh well, that is part of the choices you get to make when preparing your own dinner. Mixing and matching makes dinner more fun. Hope that helps define the difference between closed source and open source.

Guiless?

You actually can do a minimal windowing from the command line in Linux with dvtm. Dvtm is excellent for low end machines where graphics are not a priority. In the picture shown we have a working clock, SC a spreadsheet that you can easily export data to your favorite desktop spreadsheet such as Libreoffice, Links2 a web browser pointed to www.google.com, and finally nano a pretty decent basic text editor. I prefer vim, but nano has more of a user interface.


Cheatsheet:
`dvtm` is one simple, easy-to-use terminal multiplexer.
Commonly used Options:
    -v         prints version information to standard output, then exits.
        -m <mod>   set default modifier at runtime.
        [cmd...]   Execute cmd after dvtm is started.
KeyBoard Shortcuts:
    Mod    Each keybinding begins with Mod which defaults to ^g but can  be
              changed in config.h or with the -m command line option.
          
           Mod-c  Create a new shell window.
           Mod-x  Close focused window.
           Mod-l  Increases  the  master  area width about 5% (all except grid and fullscreen layout).
           Mod-h  Decreases the master area width about 5% (all except grid and fullscreen layout).
           Mod-j  Focus next window.
           Mod-k  Focus previous window.
           Mod-[1..n]
               Focus the nth window.
           Mod-.  Toggle minimization of current window.
           Mod-u  Focus next non minimized window.
           Mod-i  Focus prev non minimized window.
           Mod-m  Maximize current window (change to fullscreen layout).
           Mod-PageUp
               Scroll up.
           Mod-PageDown
               Scroll down.
           Mod-Space
               Toggle between defined layouts (affects all windows).
           Mod-Enter
               Zooms/cycles current window to/from master area.
           Mod-t  Change to vertical stack tiling layout.
           Mod-b  Change to bottom stack tiling layout.
           Mod-g  Change to grid layout.
           Mod-s  Shows/hides the status bar.
           Mod-r  Redraw whole screen.
           Mod-G  Escape the next typed key.
           Mod-a  Toggle  keyboard  multiplexing mode, if activated keypresses are
                  sent to all non minimized windows.
           Mod-X  Lock screen.
           Mod-B  Toggle bell (off by default).
           Mod-M  Toggle dvtm mouse grabbing.
           Mod-q  Quit dvtm.