Monday, June 28, 2010

Making sounds or notes with internal speakers

If you have qbasic you can try this:
http://www.youtube.com/watch?v=hITypVqHWjk
here is the code that will play a song.

PLAY "T120 << e8e8f8g8g8f8e8d8c8c8d8e8e8d12d4"
PLAY "e8e8f8g8g8fe8d8c8c8d8e8d8c12c4"
PLAY "d8d8e8c8d8e12f12e8c8d8e12f12e8d8c8d8P8"
PLAY "e8e8f8g8g8fe8d8c8c8d8e8d8c12c4"

The T120 is the tempo and the << means go down 2 octaves

Then I also got my internal pc speakers to play different tones with this python code:
import winsound
winsound.Beep(337, 200);
winsound.Beep(437, 200);
winsound.Beep(537, 200);
winsound.Beep(637, 200);
winsound.Beep(737, 200);
winsound.Beep(937, 200);
winsound.Beep(637, 200);
winsound.Beep(337, 200);

although it is not as music sounding. But I may try making it sound better later.
The first parameter of the winsound.Beep is the frequency and the second is the length of the note.

Saturday, June 26, 2010

mod re-write is awsome

I think I found how to make multiple mod re-write rules in one htaccess file
you just write the regular expression line
then do another afterward
and if it doesn't match the first it tries the second line.
then I was wondering if you could use this to make it so that no one can visit a certain page such as your js or css folder without being redirected to somewhere else.

Monday, June 21, 2010

foo

command line posting

Sunday, June 20, 2010

blog

I just posted this from GoogleCL!
I hope they keep improving this service

WOW GoogleCL

I can now edit my google docs from the commandline in Windows!
This is great. I got a list of my contacts to the screen easily. Now I am going to try editing a google docs document.
to install google CL go here
then download gdata-2.0.10.tar.gz
Now uncommpress these files to 2 different folders then to install you have to install python.
I already had it installed.

Now go to:
C:\googlecl\gdata-2.0.10
run this command from that folder
python setup.py install

Now go to C:\googlecl\googlecl-0.9.5
and do this command as well
python setup.py install

Now go to C:\googlecl\googlecl-0.9.5\src
and run this:
python google

Now you should get a
>
now type

contacts list name,email

Now it will ask you for your email for google.
It should open your browser for you now you type in your password.
Next press enter and that is it. Soon it will print all the contact info for you.

All the info you need is here for more commands

type help and you get:
Welcome to the Google CL tool!
Commands are broken into several parts: service, task, options, and arguments.
The available services are 'picasa', 'blogger', 'youtube', 'docs', 'contacts', 'calendar'

docs command options are
Did not recognize task, please use one of ['edit', 'delete', 'list', 'upload', 'get']

test post from BloggerClientTest

Hey look, another test!

test from python BloggerTest

This is only a test.