They asked me if I was “Arm”ed and I said yes….

Spooky?.

The price of the Beagleboard was reduced to compete with the Raspeberry Pi.  Ordered a Beagleboard black. Will give a review when I can.

More details at: http://beagleboard.org/Products/BeagleBone%20Black

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

Several people are allegedly using Netflix on linux. I would not do this on a production machine. Try these two links at your own risk.

http://www.iheartubuntu.com/2012/11/ppa-for-netflix-desktop-app.html

http://pristinesource.blogspot.com/2013/03/netflix-for-linux-httpwww.html

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

Seems ironic that not so long ago if you as a tech put a gui environment on a computer, users wanted to crucify the techs. Especially secretaries that used the multiple keyboard  commands with Word Perfect. Now the opposite is true. A system without a gui is an anthema. Go figure…. Mouse jockies need not apply.

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

Found a way to develop software on an Android tablet without using the standard develop,package. Here is a little spreasheet I ported from code I wrote for the x86 machines. Picture is horrible but you get the idea.

SUNP0052

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

Have this old Dell G1 computer that I use as a server. Ususlly run it headless and without speakers. For some reason I wanted to use the speakers. installed festival, saytime, espeak,aplay, mpg123 and etc.

$ sudo apt-get install  festival saytime espeak aplay mpg12

Made sure I was a member of the audo group.

$ sudo adduser eddie audio

Then I wanted to test the software: (tts stands for texttospeech)

$sudo echo Hello | festival –tts

Now to play a text file then use:

festival --tts filename.txt

Got an error of can not open the dsp file. Come to find out festival does not automatically create all the files needed. You have to create it and add a couple of lines. Found the answer on the web, but what was supposed to go into the file did not work. So I looked for other articles that night have better entries. Sound on and copied the text.

$ vim .festivalrc

Started the append mode and then pasted the text’

(Parameter.set ‘Audio_Command “aplay -q -c 1 -t raw -f s16 -r $SR $FILE”)
(Parameter.set ‘Audio_Method ‘Audio_Command)

Screenshot from 2013-05-27 12:22:10

Tested things again and all worked. Then I said to myself, lets have a little fun. Festival will work from the command line. in fact you can use SSH to call the festival command remotely.  Played a bad trick on a user. User was complaining the computer could not do this or that. so I sshed in to their computer and issued the following command: “echo I\’m sorry Dave, I’m afraid I can’t do that | festival –tts”.  Scared the crap out of them and they went running out of the office and headed for the bathroom facilities. (Good old Hal9000 )

Note mpg123 you can play either 1 song at a time or many one after the other. For a single song to be played in the background use:

$ mpg123 songfile.ext &

For many songs, create an ascii file with all the filenames including their location.

$ mpg123 -@ playlist &

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

Command line horoscope grabber: (Simple page scraper)

Daily:

$ ghpcl.sh
Enter your horscope sign:
_
‘ `:–.–.
| | |_ Virgo- The Virgin
| | | )
| | |/
(J

Today’s date: 06/10/13
Today’s horoscope for:
VIRGO (Aug. 23-Sept. 22). You like
your messages from the universe to be
inspired and fresh, and yet, today
the cliched thing also happens to be
the important thing. Age-old truths
hold firm for a reason.

#===================================
# Get today’s horoscope
# get sign
hsign=””
read -p “Enter your horscope sign: ” hsign
if [ -z $hsign ]
then hsign=”virgo”
fi
# hsign=$(zenity –entry \
# –title=”Daily Horoscope” \
# –text=”Enter your _sign:” \
# –entry-text “$hsign”)
#——————————————-
# output data
# character width required for information box
cw=38
#create data file (datadir and file name can be changed to your needs.
datadir=”/home/eddie/signs”
filename=”$datadir/th”
# make sure hsign is uppercase
hsign=”`echo $hsign|tr ‘[a-z]’ ‘[A-Z]’`”
cat $datadir/$hsign > $filename
echo -n “Today’s date: ” >> $filename
date +%D >> $filename
echo “Today’s horoscope for:” >> $filename
lynx -width 1000 -dump “http://www.creators.com/lifestylefeatures/horoscopes/horoscopes-by-holiday.html” | grep $hsign | fold -sw $cw >> $filename
#output
# zenity –text-info –filename=$filename
cat $filename
#remove unneeded file
rm $filename

Weekly:

$ ghwp.sh
——————————————–
_
‘ `:–.–.
| | |_ Virgo- The Virgin
| | | )
| | |/
(J

Today’s date: 06/10/13
Weekly horoscope for:
VIRGO (Aug. 23-Sept. 22). No one can say for sure what
can and cannot be. But you have a strong intuitive sense of
what people are likely to do; therefore, you are able to
predict the probable outcome of events. This predictive
talent will serve you well this week. Act on your
instincts, and you’ll be free of trouble and worry.
——————————————–

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

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

Screenshot from 2013-06-16 11:53:43

You can get add on boards to make your Arduino more functional. Seeed (available at Radio Shack and other fine companies) makes several boards that are price competive.)   I bought the Seeed ethernet ad-on board for half the price of the Arduino option, but it was a bit trimed down such as no card slot. The board aso works with the Osepp arduino clones. That is what we used for this project.

I wanted a way to have a web sever up when I needed to bring the regular web server down.  The arduino was the perfect choice. I just took the web server example from the Arduino IDE and commented out the code that was not needed (but could be resued later) and added the code that was needed i.e.


client.println(“<center>”);

client.println(“<h1>Your server name<h1>”);
client.println(“<hr”);
client.println(“<br />”);

client.println(“<h2>Bear with us as the server is under reconstruction!</h2>”);
client.println(“<img src=’http://www.seemyheart.org/wp-content/uploads/2013/06/Website_Under_Construction.gif&#8217; height=500 width=500 />”);
client.println(“</center>”);

SUNP0054

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

Simple calender maker:

$ ./calmake.sh dec 5
*December 1 –
*December 2 –
*December 3 –
*December 4 –
*December 5 –

# what month to start with and how many days after i.e. Oct 60
let l=$2-1;for i in $(eval echo {0..$l});do date -d "$1 1 2012 + $i day" +"*%B %_d - ";done

————————————————————————————————- Hottest instructables: Screenshot from 2013-05-31 07:56:49 ————————————————————————————————-

Really old computer jokes: Old C programmers don’t die, they’re just cast into void.

If you listen to a UNIX shell, can you hear the C?

Why are Assembly programmers always soaking wet? They work below C-level.

Q: Why did the programmer quit his job? A: Because he didn’t get arrays.

Q: Why do java programmers have to wear glasses? A: Because they don’t see sharp.

I’d like to make the world a better place, but they won’t give me the source code.

Q: Why should OS X be afraid of Windows 7? A: Because 7 8 9. And 10 is next.

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

Everyone loves twitter, but by now you know the governments have their finger in it. If you have your own web server, you can set up your own twitter like page called status.net. Of course, use at your own risk. If you set up your own private vpn with other security locks, you can have a private twiiter that only the people you choose can access. You can get the install details at:  http://www.instructables.com/id/Statusnet-the-\Twitter-clone-setup/

Testing several social media platforms for the private server, but have not found one I prefer yet. One possible candidate.

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

Take the time ro make your software user friendly… I admit that everything is graphical now, but I think using the command line gets the point across better. Even a simple game as tic tac toe could use some help. Here is the origral game start: $ ./ttt Do you want to go first? (y/n) Huh? here is the source code: \www.cs.columbia.edu/~sable/summer2000/ttt.c

I decided to add  just a short bit of code and here is how the games goes:

$ ./ttt

Tic Tac Toe

  *   *
1 * 2 * 3
  *   *
***********
  *   *
4 * 5 * 6
  *   *
***********
  *   *
7 * 8 * 9
  *   *

Use numbers to choose the box you want to use.

The starting setup:

  *   *
  *   *
  *   *
***********
  *   *
  *   *
  *   *
***********
  *   *
  *   *
  *   *

Do you want to go first? (y/n) y
Enter a square: 5

  *   *
  *   *
  *   *
***********
  *   *
  * X *
  *   *
***********
  *   *
  *   *
  *   *
I am choosing square 1!

  *   *
O *   *
  *   *
***********
  *   *
  * X *
  *   *
***********
  *   *
  *   *
  *   *

Enter a square: 3

  *   *
O *   * X
  *   *
***********
  *   *
  * X *
  *   *
***********
  *   *
  *   *
  *   *
I am choosing square 7!

  *   *
O *   * X
  *   *
***********
  *   *
  * X *
  *   *
***********
  *   *
O *   *
  *   *

Enter a square: 4

  *   *
O *   * X
  *   *
***********
  *   *
X * X *
  *   *
***********
  *   *
O *   *
  *   *
I am choosing square 6!

  *   *
O *   * X
  *   *
***********
  *   *
X * X * O
  *   *
***********
  *   *
O *   *
  *   *

Enter a square: 2

  *   *
O * X * X
  *   *
***********
  *   *
X * X * O
  *   *
***********
  *   *
O *   *
  *   *
I am choosing square 8!

  *   *
O * X * X
  *   *
***********
  *   *
X * X * O
  *   *
***********
  *   *
O * O *
  *   *

Enter a square: 9

  *   *
O * X * X
  *   *
***********
  *   *
X * X * O
  *   *
***********
  *   *
O * O * X
  *   *
The game is a draw.

Do you want to play again? (y/n) n

$

Added just this bit short bit of codewithin the existing code..

int user_first(void)
{
char response;

printf("\nTic Tac Toe \n\n");
 printf("   *   * \n");
 printf(" 1 * 2 * 3 \n");
 printf("   *   * \n");
 printf("***********\n");
 printf("   *   * \n");
 printf(" 4 * 5 * 6 \n");
 printf("   *   * \n");
 printf("***********\n");
 printf("   *   * \n");
 printf(" 7 * 8 * 9 \n");
 printf("   *   * \n\n");
 printf("Use numbers to choose the box you want to use.\n\n");

printf("The starting setup:\n\n");

 printf("   *   * \n");
 printf("   *   * \n");
 printf("   *   * \n");
 printf("***********\n");
 printf("   *   * \n");
 printf("   *   * \n");
 printf("   *   * \n");
 printf("***********\n");
 printf("   *   * \n");
 printf("   *   * \n");
 printf("   *   * \n\n");

printf("Do you want to go first? (y/n) ");

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

Bruscetta.

P000-256-327-666-f1016

P000-256-327-670-c3022

Good day.

Advertisements