OS X: Unzip Protected Zip

March 17, 2008 – 10:20 pm

This weekend I went to the local Botball workshop at UMUC where they gave our team the lego kits and an instructional CD. I head home and pop in the CD only to find that I can’t unzip the included Zip file. I suspect that the file is protected (with the password they gave us) but Archive Utility (Mac’s default uncompresser) simply says that permission is denied. First I try giving myself full read write permissions like so;

Osiris:~ amir$sudo chmod a+w+x BBallGame.zip

but still I get the same error. I then found out that I can unzip the file in the Terminal with this command;
Osiris:~ amir$ /usr/bin/unzip BBallGame.zip
This did infact ask me for a password and once entered, successfully unzipped my file.

Automatically Backup Your Flash Drive on Windows

December 21, 2007 – 9:20 pm

Yesterday I made an automatic backup script for external drives on the Mac. A few of my friends have wanted a Windows version, so here it is:

Step 1: Create a file called backup.bat in the root of your flash drive. Use Notepad, or any other editor. Copy and paste this code into it, changing “Path” with the path you want (Leave the quotes in, they do matter).

@echo off
echo ----------------------------------
echo Backing up your flash drive...
echo ----------------------------------
echo.
echo.
xcopy "*" "Path" /Y /E /R
echo ----------------------------------
echo Backup Complete!
echo ----------------------------------
echo.
Pause.

Step 2: Create a file called autorun.inf on the root of your flash drive. Copy and paste this code into it:

[autorun]
action=Backup
open=backup.bat
labelBackup
includeRuntimeComponents=True

Step 3: ???
Step 4: Profit

You’re done. The only issue is that you now have to watch the dreadful commandline copy everything over, and you have to select “backup” everytime you plug in your drive. Also, unlike the Mac version, Windows copies all the files over every time (Because it does not have rsync installed) so it will cause a bit of lag depending on the size of the drive. On the plus side you don’t have to install anything.

Kudos to Sandstorming for the know-how to do this.

-Amir

Using “DSW” to Automatically Backup You Flash Drive

December 18, 2007 – 12:53 pm

OS X.5 came with a cool new feature called Timemachine which automatically backs-up your internal Mac harddrive. People like me live off their flash drive, and losing it would mean disaster, and you can never remember to manually back it up. When I learned that Time Machine didn’t backup external drive I was disappointed. Enter “Do Something When.” A program that will execute a script, or application anytime we mount a new drive. Check the link below to get DSW

First you need to create the script to backup your drive. You can copy and paste this code into Script Editor and save it somewhere as MyScriptName.

do shell script "rsync -rt /Volumes/MyUSBDrive/
                         /Volumes/TMBackup/MyUSBDrive_Backup"
display dialog "Backup Complete"

Be sure to change MyUSBDrive and TMBackup to the name of your USB Drive and your Time Machine Backup drive.

Once DSW is installed, plug in your drive and tell it “When MyUSBDrive mounts run application My script name” Then tell it to start DSW automatically when the computer turns on.

You’re done. Now everytime you plug in you USB drive you will have it backed up on your Time Machine Backup

Some of my friends have said that backing up large flash drive can cause lag on their system, and would rather be prompted to back up then automatically backing up. In order to do this use this script instead of the one above:

display dialog "Backup your flash drive?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "Yes" then
    do shell script "rsync -rt /Volumes/MyUSBDrive/
                         /Volumes/TMBackup/MyUSBDrive_Backup"
    display dialog "Backup Complete" buttons {"OK"} default button 1
else
    display dialog "Backup Canceled" buttons {"OK"} default button 1
end if

Remember to save the script as an application in order for DSW to be able to run it.
>Get DSW <

The Better Way to Watch DVR-MS Files on a Mac

July 15, 2007 – 9:33 pm

A while ago I posted about MPlayer, the Mac media player that plays DVR-MS files. There were a few problems with it:First of all, it’s skip feature was not so great. Another problem was that it didnt play many file types. Every once and a while I would get a video that nither this nor Quicktime could play. I did some looking around and found VLC. VLC is great (just like everyone else says) It plays everything without complaining at all. VLC is everything you’ve loved about all other media players all rolled up into one great package.

/>Get it!<

Visit my new Website!

May 31, 2007 – 8:40 pm

http://code.fiyocom.com

Its a place to upload small, simple java programs made using Rails (the irony!). I made it for an end of the year computer science projects titled “Passing on the torch.” The idea was to make learning easier for incoming CS students, and what better way to learn than by example?

Its still a work in progress, but it should be done by Tuesday!

Radio Station Helps Students Review for AP Government Test

May 6, 2007 – 4:18 pm

Today at 8 pm EST (6 pm CST) Beyond the Beltway will have their first nationally broadcasted AP review program. The “2Regular Guys” will have their review on Chicago-based WLS-AM 890. Students can also listen to the review streamed form online.

>Click<

Earth-like Planet Found

April 24, 2007 – 8:03 pm

The European Southern Observatory has just discovered a planet that resebles Earth more closesly than any ever found before. Here are the basic details:

  • The planet has a diameter of 1.5 that of Earth’s
  • The planet has a mass 5 times that of Earth’s
  • The planet orbits a Red Dwarf (These produce less heat than our Sun)
  • The mean temperature is suggested to be between 0* and 40* C (That means it supports water)
  • The planet is 120 trillion miles away
  • This seems to be the third planet of this type to be found by astronomers, but this one more resembles Earth than the others in size. For the excruciating details you can visit one (or more) of the following sites:

    >CBC, The Independent<

    See the sun in 3-D

    April 23, 2007 – 8:16 pm

    NASA has just released tones of 3-D images of the Sun takes by its new STEREO telescopes. STEREO was launched in in October 2006. the way it works is that there are two telescopes each orbiting at diffrent places around the Earth (one ahead and one behind). They’re kind of like a pair of eyes in space that can take 3-D pictures.

    Here are just one of the images off NASA’s website. You’ll need those funky red-blue glasses to view them.
    The Sun

    >The rest<

    How to play .dvr-ms files on a Mac

    April 17, 2007 – 7:39 pm

    Everything is great. You have a nice little computer set up to record your shows, and an Xbox to watch them on your TV. But what happens when you want to watch them on your Mac? Microsoft has discontinued WMP support for the Mac so your pretty much screwed right?

    Wrong!

    Where theres a will theres a way! Head over to MPlayer’s website and download their media player. It will play those pesky .dvr-ms files.

    >Website<
    >Direct Download for Mac<

    Introducing Community Quran (Beta)

    April 9, 2007 – 12:41 pm

    The Qur’an belongs to us all, not just to scholars. What does this mean? This means that you can now search Allah’s words yourself. But I don’t understand Arabic…? That’s okay, because communityquran.com gives 5 different translations for each verse of the Qur’an, so you can understand more. But I want a deeper meaning. Communityquran.com also provides commentary by known scholars such as Yousif Ali. Not only that but, there is also an introduction for each Surah, which includes details on the background of each Surah, and it’s main topics. The most convenient part is that if you are looking for something specific, there is an index tool that has listed all of the Qur’an’s major topics, and linked them to the specific Ayat. And instead of scrolling through each page, or clicking the next button a million times, you can jump straight to any Ayat of any Surah.

    For all of those Imams, and Khateebs out there we have a tool for you. Though we are still working on it, there will be a sort of a scrapbook, where you can store all of the Ayat that you want to use in your khutbah.

    And for anyone who has found a new interpretation that he wishes to share with the community, communityquran.com has a feature, where the person can add his own comments or translation to an Ayat. Isn’t that great, now everyone can have and share their own interpretation of Al Qur’an.

    >Click<