Sunday, May 25, 2008

This blog has been continued at a new address

Tuesday, January 8, 2008

Automatically Scheduled Script to Download and Backup All Your Google Notebook Pages

Link
This is a tutorial to apply the learnings from this page to make a FULL OUT Automatically scheduled automator application that runs in the background every week, automatically quits terminal and saves all your downloaded notebooks in a seperate file. You don't have to ever put time into downloading and backing up your notebook files and also never have to put time into worrying about losing them with this auto-backup system!

Also needs:

1. Personally tweaked "wget_online_notebook_BU_script.term" file that is opened with terminal.

2. A set directory for the downloaded files to go into (detailed in the "wget_online_notebook_BU_script.term" file).

3. To export this automator workflow as a program and then assign this automator application to an iCal weekly repeated event by going to "Add Alarm" and selecting "Other..." adn then this automator program.

4. Make Public by "Sharing Options" under Google Notebooks.

The Automator Script.





This is a beautifully written automator program that you attach to an iCal event with a scheduled alarm (repeating weekly) to automatically download all of your google notebooks, and back them up in your own personal folder on a local drive! Sweet!

The applescript code is hand-crafted myself, and quite beautiful if I say so so myself. It makes the downloading of your notebooks literally invisible and unintrusive to whatever work you're currrently doing because the applescript immediately hides the Terminal application and then it it quits the program automatically after a 12 second delay. Downloading 5 notebook seperate calendars took about 5 seconds so 12 is sufficent. If you, for some insane reason, have like 500 notebooks, you'll want to change the delay 12 to a longer delay so the program won't quit while terminal is downloading those programs.

The terminal script.

Open a terminal window. Save that window as... (give it a reasonable name like, "wget_online_notebook_BU_script.term". Then open that file with a text editor.

The highlighted text (note it's location . VERY IMPORTANT. Is)
ExecutionString
HERE. Insert Your wget Commands Here
is all you need to change.

The format is
wget -k -p -erobots=off -np -N -nd -O "Path to where you want the notebooks downloaded"/"Notebook1.html" "INSERT URL of Public Notebook web page"; NEXT WGET Note book;
I learn by example, so I thought all the example screenshots would be helpful.

Sites, Tutorials, and Web Aids I found invaluable in making this awesome automator:

  1. Applescripts
  2. Master WGET
  3. Basically a tutorial to make the Terminal file (but without iCal and Automator features that this tutorial has.

Wednesday, October 10, 2007

Parralax, Retrograde, all that Visual Brew-Ha-Ha

Parralax -- okaya parralax is the "apparent" (But not actual) movement of an object visually because of the REAL movement of the observer. Most common is the STellar parralax where a very distant (millions of miles) star appears to move, but realy it's the earth orbitting annually revolving around the sun that creates the impression of the star moving, a parallax. A large parralax angle means the star is closer. the farther away a star is (or an object is )from the observer, then the smaller the parralax angle (The smaller amount of shifter that occurs on the visual spectrum. A sundial is a perfect eample of a natural parralx (the dial moves (attached to the earth taht moves) creating hte impression that hte shadow moves. Just bottom-line, the observer (earth, or dial, or whatever) moves creating the impression that a distant objects moves. The closer the object, the larger the parallax angle.

Another well known parallax is the mercury retrograde. Note: this is mercury's apparent (not real) retrograde, that said, all apparent retrograde is really just a parallax effect. Mercury or Mars does not actually move backwards in the orbit. The earth just loops back around the sun so the vision the sun casts (From the earth) makes it look like it flips back the other way, In short, whenever the earth gets horizontal with a planet(it hten goes diagonal, given different rates of revoltion), the the parralax fliparound retrograde effect occurs.

Saturday, August 18, 2007

The References of the "Picard Song"

This blog - -devoted to linux and all things geekiness -- wouldn't do very well without a Star Trek post. So this is the mother of all star trek posts!

It's the episode origins of every line (all 10 of them) from the "Picard Song"! Yeah! I also, have seen all the 8 distinct episodes mentioned in the song! Uber-geekiness.
  1. "Make it so”=About every episode
  2. "Engage”=About every episode
  3. “Here's to the finest crew in Starfleet.”=3.18Allegiance
  4. "Darmok and Jelad at Tenagra”=5.02Darmok
  5. "The first duty of every Starfleet officer is to the truth! Scientific truth, or historical truth, or personal truth! It is the guiding principle on which Starfleet is based. And if you can’t find it within yourself to stand up ‘n’ tell the truth…You don’t deserve. To wear. That. Uniform.”=5.19TheFirstDury (wesley crash)
  6. “Sorry, that became a speech. You're the captain, sir. You're entitled. I am not entitled to bore you with what you already know. Carry on!”=1.04Codeofhonor
  7. "Hey just talking in one incredibly long unbroken sentence. It was really quite hypnotic.”=6.25Timescape
  8. "You’ll have to call again! I’m just leaving. I’m uh… not dressed properly.”=1.12Biggoodbye
  9. "My love is a fever, longing ‘till for that which Longer nurs the disease. Tell me more! In faith! I do not love thee! With mine eyesThey in thee A thousand errors see! But ‘tis my heart That loves, what they despise Who, in despite of view, are pleased! To dote, Shall I compare thee, to a summer’s day?!”=3.24Menageatroi_multipleshakespearean references; stewart was once a member of the royal shakespeare co.!
  10. "I am locutus of Borg, I am borg...”=3.26Bestofbothworlds1

Friday, August 17, 2007

Fundamentals rm,cp,mv to Advanced

In order to manipulate the cool (mdesg, modprobe, cat /etc/fstab) commands you must have the basic, most fundamental (the "boring":) file manipulation commands down pat. You use all the boring commands to manipulate files and dirs with the more advanced "cool" commands, so I've taken the time to lay some fundamental understanding of essential shell commands. This may seem slow, boring, and obvious, but I can't tell you how encouraging it is to be tweaking some advanced system root file and then feel "at home" with some essential commands. For example, you could be tweak /etc/fstab and be fiddling with obscure device ids you know nothing about and then then suddenly realize, "Hey, I can just COPY the file" and then whip out the reliable, trusty old cp command. You'll never learn the new exciting stuff untill you feel "at home" with atleast a few of the most fundamental commands.

These commands in GNU/Linux/Ubuntu (as well as most all other unix-like OS) offer a tremendously refreshing degree of simplicity in regards to working with files in the shell (with the case of Ubuntu, the awesome BASH shell). In other shells (like DOS) or guis you typically need the following fundamental commands to manipulate the essentials of files:

copy files
move files
rename files
delete files
delete directories

BASH (and Ubuntu), therefore, can do all the above with only the following commands

cp -- copy files
mv -- move files, rename files
rm -- delete files, delete directories

See the simplicity! Half the number of commands, same amount of accessible operations!

Specifically, here are the ways to manipulate files with the above three commands

copy files -- cp // results = 2+ filename // -r copies entire directory and sub-dir contents
move files -- mv // results = 1+ filename // -r moves entire directory and sub-dir contents
rename files -- mv // results = 2+ files //
delete files -- rm // result = 0 filename // -f delete without confirmation
delete dirs -- rm -r //results 0 directoryname // -f delete without confirmation

So, know understanding and have practiced with (ahem) these three commands (cp, mv, and rm) and their 5 specific implementations (copy, move, rename, delete files, delete dirs) you can build from this fundamental understanding to comprehend more advanced shell commands.

The theory here is the same "method" you used to understand these (boring) fundamental commands will be the same method to learn the more advanced fun commands. So the purpose with these three commands is not so much to learn the commands (although you must do that), but rather to acquaint yourself with how you learn new commands, so that adapting to and picking up more advanced commands will seem familiar!




Mounting File Systems Recipe
Ingredients for Mounting File Systems
vol_id -u /dev/devicename
gedit /etc/fstab
mount
umount
sudo mkdir /media/mountpointname



Sound Tweaking Systems Recipe
Ingredients
lspci -v
aplay -l
alsamixer
sudo gedit etc/modprobe.d/alsa-base
cat /proc/asound/card0/codec\#* -- codec informaiton and address


My info:
Codec: SigmaTel STAC9200

Default system beek Works. Only with
these parameteres

Panel Sound says "No Volume control Gstreamer plugins found"

alsamixer, aplay do not work

Sound control panel
playback: STAC92xx Analog (not connected)
playback music:STAC92xx (Not Connectioned)
audio confere playback: Autodetect
audi Capture: ALSA
Device: No options
No options

Tuesday, August 7, 2007

Linux Beginning Notes Compilation

In learning more about the linux kernal, platform, and OS, I had countless “key clarification” that, frankly, turned on the “light bulb” and really helped me understand what the hell is going on the linux world. This includes some of those essentials and a few not-so-essential-but-very-cool findings, as well.

Linux Installing File Formats (most to least complicated to install)

1. Source code (needs compiling and file placement, no wizard)
2. Binary (needs file placement, no wizard)
3. Package (. deb, .rpm automatically installs pre-compiled files into necessary folders, no wizard)
4. SE binary (automatically installs pre-compiled files into necessary folders, wizard)

Software Installation Dependency

Windows and macs provide huge clunky install files that already have all the system software code already installed in it. Linux files don't come with dependcy files, so to uninstall or install a program, you may need to respectively install or install dependency files. Yo u experiene dependency hell, when a package needs dependency files, which, themselves, need depency files!

Mounting Files -- Basics

Linux is so cool because you can add any harddrive and make it “normal architecture” that automatically mounts by adding to the /etc/fstab file, creating a directory for it under /media/ folder. Note: remarkable how like this is with Big Brother updates. Everything must be updated and cross-referenced if a “BB surplus reference was changed for example”. To add a constant external drive you have to change /etc/fstab, /media/ references to it! Then it shows up in Places.

Also, realized that me criticizing with evidence why some advice is wrong is very similar to showing command line errors in terminal! It's not insulting; quite informative and helpful! A person who looks at it as insults shouldn't really be using it!

Linux OS

Linux just refers to the kernel; the sensitive part of the OS that does everything. GNU provides the shell, the libraries, and the components that all a user to use the linux kernel. The shell prevents bad commands from destroying the kernel, so the shell is a necessary buffer. GNOME is a GUI shell, but typically the terminal is what is referred to as “shell”. GNU/Linux then is the whole OS – shell, libraries, AND kernel.

Shell Commands

Whenever you type a command in the shell, it is really running just a small little program (ls, cd, totem – all programs). The terminal knows where to find these programs by looking in specific folders. echo $PATH lists these folders. For me, they're /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games , seperated by a colon. If the program is found in one of those folders just typing the command will launch it, otherwise you'll have to type the direct location of the command (or add it's folder to the PATH) or if the program is in the current folder, just precede it with “./” (./ means execute it right here). So way's to run programs:

l ./ -- if program is in current folder

l “program name” if program is in PATH variable

l “location/of/program” -- exact location of program name.

Extensibility Flexibility

Linux epitomizes life because you can change and do ANYTHING to the OS – if you want a folder to pop out a certain way, a menu to be added to a menu, anything, you can change it in linux!

System Variables

These tell, among other things, where commands are located for them to be executed from the command-line prompt. You can see the code for system variables with the “set” command.

Aliases

AWESOME trick. To permanently create an alias (another shortcut for a command or sequence of commands) just append to the end of the .bashrc file (the resource file for all bash shell work terminals) the following line

alias ='linux command'

so for example to create a shortcut for sudo apt-get install, an enormously painful experience to keep typing, just add this line of code to your .bashrc file:

alias sagi='sudo apt-get install'

Awesome! (Note: you must not have any spaces between the “=” sign (That threw me off at first). Just restart the terminal window or reboot and tot download a program just type:

sago program_name

List Command – ls

Okay ls is pretty straight-forward and basic. The fun stuff happens with options.

-h – (combined with -l) produces human-readable formats, meaning instead of byte sizes, kilobyte and megabyte sizes

-l (long format, including permissions and author and modified. tons of information

-a (all files, even invisible with “.” before the name.

Copy and Move Commands –cp mv

Okay Copy, cp is again basic. It adds a new file or directory to the new path name.

cp file1 /home/kooz/file2

if you cp the same file in the same folder to that folder, you can rename it, which duplicates the file. The only special command is to copy a directory, you need the -r option.

mv.

Move is a little more interest because it is basically renaming the absolute path of a file or directory. Unlike windows or other OS, where a file is deleted and recreated, the file stays the same, but it's absolute path changes. To rename 'myfolder' to 'thefolder' do this:

mv myfolder thefolder

To move myfolder into the folder

mv myfolder/ thefolder/

Move, unlike rm or cp, you don't need the -r flag to work with directories.

Remove – rm

The other basic task.

Unlike recycle bin, it's gone baby with rm. Salvaging deleted (rm-ed) files requires special software and is not easy; best to avoid this) Some nifty flags:

-f – delete it without y/n question verification.

-r – deletes an entire folder (and all its contents) – requried to delete a folder.

to delete all files in a directory (but keep the directory) this is a nifty trick.

rm -f * (wildcard for everything!)

WildCards and Spaces

· everything after that

? that specific characteristics

“ “ -- exactly as is, can include spaces.

\ -- escape character. so you can type spaces when that precedes the space . For example consider the file my file that you want to delete. A lot of choices when working with those funky file names, but ti's best just to name_files_like_this_with_the_underscore so you don't have to go into that crazy *?*\ !

You can delete it using the four methods above:

rm my*file or rm my* (assuming nothing else begins with my that you don't want to delete!)

rm my?file

rm “my file”

rm my\ file

Make Directory – mkdir

Very obvious and basic but one nifty “thinking ahead task”

-p – makes a new folder within a new folder

So if you're in an empty folder and type

mkdir myfolder/stuff/

you'll get an error sayin “myfolder” doesn't exist, but with:

mkdir -p myfolder/stuff/

then you'll create those two folders, “myfolder”, and “stuff”, within “myfolder”.

Links

There are two types of links, symbolic and hard. Symbolic links are created with

ln -s oldfile linktooldfile

Under ls -l it then points to the old file:

linktooldfile -> oldfile

note you have to throw in the -s (or –symbolic) option, or else it will automatically create hard links. Linux is so short and nifty with the options, instead of typing out –symbolic, just type -s!

Hard links actual change the file pointer and the only difference is that it will up the number before the owner under the file information

Mounting files

When you mount a drive, a symbolic link is created drawing from the /dev folder and the the /etc/fstab (file system table) file when the mount.

mount /media/cdrom

will look up the cdrom drlive in fstab and compare it to /dev based on a uuid number,to then mount it.

Manual Mount

Step 1: create a mount point (just a directory in /media/, although the mount point could be anywhere, it's best to stay organized and ue the /media directory) to mount the external drive to.

Step 2: check the partition type with

sudo fdisk -l /dev/hdb (warning: fdisk formats hard drives! be careful with it!)

step 3: now mount the disk (this is temporary mount and /newdisk will show up in the /mnt/ directory):

sudo mount -t nfts -o umask=0222 /dev/hdb1 /media/newdisk

Okay -t refers to type (ntfs, fat32 (vfat), ext3, etc.) then -o tells it you're doing more options, then /dev/hdb1 is the virtual device location and /media/newdisk is the mount point. After that command, the file should end up in /mnt/newdisk.

To unmount the drive, just type

umount /media/newdisk (also you could specify it's location in /dev/, but that's tricky and more complicated).

So in conclusion, mounting gets information from /etc/fstab, has a mount point in /media/, shows up after mounted in /mnt/, and accesses /dev wit uuid numbers to mount it = 4 seperate directories!

File Sizes

ls -h lists file sizes in kilobytes

ls -S lists file sizes with largest to smallest

ls -Shl shows all that information.

disk usage

du shows the directory size

du -h directory size in kilobytes.

du -sh total directory size in kilobytes.

(note du and find and the like are limited by permissions, so use sudo before it).

disk free space

df -h lists free disk space in kilobytes.

df shows ALL total mounted file systems! External, var, etc. to see your root, just look under the "mounted on" column.

Friday, July 27, 2007

An Introductory Assemblage of Linux Tidbits

In learning more about the linux kernal, platform, and OS, I had countless “key clarification” that, frankly, turned on the “light bulb” and really helped me understand what the hell is going on the linux world. This includes some of those essentials and a few not-so-essential-but-very-cool findings, as well.

Linux Installing File Formats (most to least complicated to install)
1. Source code (needs compiling and file placement, no wizard)
2. Binary (needs file placement, no wizard)
3. Package (. deb, .rpm automatically installs pre-compiled files into necessary folders, no wizard)
4. SE binary (automatically installs pre-compiled files into necessary folders, wizard)

Software Installation Dependency
Windows and macs provide huge clunky install files that already have all the system software code already installed in it. Linux files don't come with dependcy files, so to uninstall or install a program, you may need to respectively install or install dependency files. Yo u experiene dependency hell, when a package needs dependency files, which, themselves, need depency files!

Mounting Files -- Basics
Linux is so cool because you can add any harddrive and make it “normal architecture” that automatically mounts by adding to the /etc/fstab file, creating a directory for it under /media/ folder. Note: remarkable how like this is with Big Brother updates. Everything must be updated and cross-referenced if a “BB surplus reference was changed for example”. To add a constant external drive you have to change /etc/fstab, /media/ references to it! Then it shows up in Places.
Also, realized that me criticizing with evidence why some advice is wrong is very similar to showing command line errors in terminal! It's not insulting; quite informative and helpful! A person who looks at it as insults shouldn't really be using it!

Linux OS
Linux just refers to the kernel; the sensitive part of the OS that does everything. GNU provides the shell, the libraries, and the components that all a user to use the linux kernel. The shell prevents bad commands from destroying the kernel, so the shell is a necessary buffer. GNOME is a GUI shell, but typically the terminal is what is referred to as “shell”. GNU/Linux then is the whole OS – shell, libraries, AND kernel.

Shell Commands
Whenever you type a command in the shell, it is really running just a small little program (ls, cd, totem – all programs). The terminal knows where to find these programs by looking in specific folders. echo $PATH lists these folders. For me, they're /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games , seperated by a colon. If the program is found in one of those folders just typing the command will launch it, otherwise you'll have to type the direct location of the command (or add it's folder to the PATH) or if the program is in the current folder, just precede it with “./” (./ means execute it right here). So way's to run programs:
./ -- if program is in current folder
“program name” if program is in PATH variable
“location/of/program” -- exact location of program name.

Extensibility Flexibility
Linux epitomizes life because you can change and do ANYTHING to the OS – if you want a folder to pop out a certain way, a menu to be added to a menu, anything, you can change it in linux!

System Variables
These tell, among other things, where commands are located for them to be executed from the command-line prompt. You can see the code for system variables with the “set” command.

Aliases
AWESOME trick. To permanently create an alias (another shortcut for a command or sequence of commands) just append to the end of the .bashrc file (the resource file for all bash shell work terminals) the following line
alias ='linux command'
so for example to create a shortcut for sudo apt-get install, an enormously painful experience to keep typing, just add this line of code to your .bashrc file:
alias sagi='sudo apt-get install'

Awesome! (Note: you must not have any spaces between the “=” sign (That threw me off at first). Just restart the terminal window or reboot and tot download a program just type:
sagi program_name