Friday, April 1, 2011
www.timeanddate.com
Flash Based Clock:
Text based clocks (HTML/Javascript):
It has different styled clocks in both text and flash formats. The best part is you can customize to your liking. Give it a try.
Copying all the songs from iTunes Music folder: I love Unix
Recently, all of sudden I do feel like listening to music. At least now and then if not all the time. So, I thought of copying songs from my personal computer to office computer. The problem with the iTunes is that it doesn't play music from the folders you keep songs in. It does maintain its own library, which means it copies all the songs. So, I don't like to maintain songs separately from iTunes. If I did then it would be like wasting lot of space.
Anyway, coming to the problem how do I copy the songs from my computer that's there at home to the computer that's there at my work place. The one thing you could do is by copying the entire music into hard-drive and copy it back to your office computer. But, the problem with this method is it takes a while if you have huge collection. I don't care about tagging at all. I just want to listen to music. So I'd just like to copy the entire music files. At the same time I don't want to copy all the folders from iTunes Music folder. iTunes has weird way of naming folders, which I absolutely hate it.
Being a Linux guy, I wanted to linux way. Or you could say Unix way. First, what I wanted to do was to avoid copying music to hard-drive or taking my laptop to work place. Hence, I went for rsyncing. I've used rsync to sync the data from my personal computer to office computer. rsync is amazing in the sense if you are backing up data constantly from the same computer or at least from the same location on your computer. rsync doesn't copy the files that have been already copied before, unlike scp. For example, there are 100 files in one of the folder. You rsynced it today. In a week time from now you made another 50 files. After a week time, you want to back up those 50 files too. When you do rsync it just checks the files on both sides and immediately knows that it doesn't have to copy first 100 files but just 50 files. Where as scp tries to copy all the files.
I know what you are thinking now. What's the big deal, you might be thinking. Right? Yeah, it's no big deal if you are dealing with data in mb. If you are dealing with data in GBs and TBs it takes days. So I prefer rsync over scp for backing up data.
It's pretty simple. The command goes like this from the terminal.
rsync -e ssh -az <path_to_itunes_music_folder>/ <user>@<ip-destination>:~/Desktop/<directory_of_your_choice>
This command would prompt for password and when you enter the password it hangs there until it finishes copying. Once you are done, you can log on to the the office computer remotely using ssh to check for the music.
ssh <user>@<ip-destination>
Once you are there on the remote computer you can check whether copying is in progress by doing ls.
ls du -sh ~/Desktop/<path_to_directory_of_music>
The second command above gives the size in human readable format, like in mb and gb. So once rsync is done what I wanted to do was to get the all the mp3 files into one folder on my office computer. So from the remote shell I ran this command.
find . \( -name "*.m4a" -o -name "*.m4p" -o -name "*.mp3" \) -exec mv {} <path_to_desired_folder> \; du -sh <path_to_the_desired_folder> ls -l | wc -l
The first line finds all the .mp3, .m4a and .m4p songs and moves them to the desired folder. The next command tells you the size of the folder containing copied songs. Now you should see all the songs copied into that folder. It's just one folder. That's it. The third command tells you the number of songs you have by subtracting one from the number you see on the terminal.
The last thing you do is to add the songs from this folder to iTunes library. So now I have all my songs in iTunes on my office computer. I did it all this with two commands sitting at home. You can ask me how I added the songs to iTunes library sitting at home. I have used remote desktop to do that. I use chicken of vnc. Try it out. In the end I did everything in short time with out any hassles. Simple and effective. The lesson is learn Unix. I love Unix.
Cash from Google
Anyway, over the time they got good number of views and Google offered me revenue through ads. Why not? After an year, last month Google paid me $112 as my earnings.
Now, these videos are making $20 a month. Which is pretty cool because I never expected money. I guess when you help people without expecting anything back it gets paid off. Dividends are always there for helping.
It's not that much money, but like someone said each penny helps. More over, I am it's an impetus for me to make some more helpful videos for people. It's worth it. Not because of the money but because of the appreciative comments you get from people. Soon I'll start making videos on maths, programming and unix. There is lot of stuff we can help withto people. I guess everyone needs help from everyone. I will post the links here right after making them. I guess this is the right time to invest in good video camera.
Sent from my phone.
PBS Script Generator: Interdependent dropdown/select menus in Javascript
About Me
- My Knotty Mind - Labyrinth
- LA, CA, United States
- Here I write about the battles that have been going on in my mind. It's pretty much a scribble.