Posts Tagged ‘google’

Tutorial: How to Loop a YouTube Playlist

April 11, 2009

The video above is an example of a YouTube playlist that loops forever. It consists of 3 Jon Lajoie music videos that I never get tired of hearing. Here’s how you can have your very own looping YouTube playlist.

  1. Login to YouTube. If you don’t have an account, get one here…
    http://www.youtube.com/signup
  2. Go to a YouTube video that you like.
  3. Click “Playlists” near the bottom of the video.
  4. Make sure “[ New Playlist ]” is selected, then click “Add”.
  5. Enter whatever you want for “Playlist Name” and “Description”, then click “Save Playlist Info”.
  6. Go to another video that you want to add to the playlist you created and click “Playlists” again near the bottom of the video.
  7. This time, make sure the name of your playlist you created earlier is selected, then click “Add”. Do this for anymore videos you want in the playlist.
  8. When you’re done adding videos to the playlist, click your username at the top of the screen.
  9. Click “Playlists” which is also near the top of the screen.
  10. Find the name of the playlist you want to loop and click it.
  11. Copy and paste the contents of “Playlist/URL (Permalink):” into the YouTube Playlist Looper at following link…
    http://ia331413.us.archive.org/3/items/YoutubePlaylistLooper/youtube_playlist_looper.html
  12. After pasting the permalink into the YouTube Playlist Looper, click “submit”.
  13. Your YouTube playlist should automatically start playing and start over when it reaches the end.
  14. You also have the option to copy and paste the resulting code to loop your playlist on your own website.

Ta da! That’s it. Enjoy your infinite playlist.

If you are interested in how I created the YouTube Playlist Looper, read on.

First, I googled “loop youtube playlist”. The first page of results didn’t have any solutions I liked, but it did have a link to a blog post that gave me a clue on how I might be able to loop a YouTube playlist.

Here’s the blog post that mentions the 2 parameters “&loop=1″ and “&autoplay=1″ that I needed to add to a playlist’s embed code…

http://googlesystem.blogspot.com/2008/06/play-youtube-videos-in-loop.html

To get a playlist’s embed code, I had to hover over my username in YouTube, then click “Playlists”. Then, I had to click the playlist name that I wanted to loop. Where it says “Embed:”, is the code I had to add the two parameters to.

The rest is pretty self explanatory if you understand JavaScript and view the source code of the YouTube Playlist Looper. I just had to get a user to input the ID of the playlist they wanted looped. Then, I returned the code with the 2 parameters automatically appended to the embed code that YouTube provided.

I did have some trouble with the display after hitting “submit”, but a quick trip to the javascript IRC channel helped me find my answer (see below).

As with everything I create, the YouTube Playlist Looper has been set free from any copyrights using the CC0 waiver.

Correspondence with temp01

#javascript@irc.freenode.net (4/11/09)
[10:42pm] jorel314: hello…
[10:44pm] jorel314: anyone care to help a javascript noob?
[10:44pm] temp01: maybe.. if the noob asks a question
[10:45pm] jorel314: I created this form that lets you loop a youtube playlist.. i was wondering how to get the results on the same page as the form..
[10:45pm] jorel314: http://dl.getdropbox.com/u/154234/youtube_playlist_looper.html
[10:46pm] jorel314: right now.. when I click submit.. the form disappears when the results show…
[10:46pm] temp01: firstChild.nodeValue = document.write .. lol
[10:47pm] jorel314: i’d like the results to appear on the same page…
[10:47pm] jorel314: be gentle.. it’s my first javascript program…
[10:47pm] temp01: sorry couldnt resist
[10:47pm] jorel314: i tried innerhtml..
[10:48pm] jorel314: but i don’t think that is part of DOM…
[10:49pm] temp01: jorel314: getElementById(‘results’).innerHTML = “<h1>PREVI….”
[10:50pm] jorel314: ok.. let me try that out..
[10:50pm] temp01: 99% of what you are using.. is not part of DOM
[10:51pm] temp01: i.e. standards-compliant
[10:51pm] jorel314: i was trying to get functionality first.. then fix it up to standards..
[10:54pm] jorel314: thanks temp01, it worked! http://dl.getdropbox.com/u/154234/youtube_playlist_looper_0.2.html

~~~~

- More of my tutorials (feed)
- Alpha Nerd (feed)
- Set Free (feed)

Patient: Forgotten Password

March 27, 2009


cc photo by Mirko Macari

A friend of mine brought me his brother’s laptop. His brother just got home from the hospital after a stroke and couldn’t remember the password. I never tried retrieving a forgotten password before, so I jumped at the opportunity.

The laptop was a Dell Latitude D630 running Windows XP. I used Google to do a little research on Windows XP password recovery, and a method using Ophcrack was popular.

I downloaded the open source Ophcrack live CD from here…
http://ophcrack.sourceforge.net/download.php?type=livecd

I burned the live CD to a disc, and booted the laptop from it. Ophcrack started up, and there was a display error. No text was showing up in the desktop environment.

During startup, there was an option to choose “Ophcrack Graphic VESA mode”. I restarted using that option instead, and everything looked fine this time. The thing that I thought was really cool is that I didn’t have to press anything for Ophcrack to start cracking the Windows XP password. It just started doing it automatically, and after 9 minutes, I had the password for the administrator account. Also, it told me two other limited accounts on there had no passwords.

So, I tried logging in to the Windows XP administrator account using the password Ophcrack gave me, and it worked! Then, I was able to change my friend’s bro’s limited account to an administrator one.

Needless to say, I’ve added Ophcrack to my arsenal of live CD’s which also include SystemRescueCD and BackTrack.

- Alpha Mesh

Patient: Vista Virus

February 23, 2009

Virus
cc photo by Nils Geylen

I was contacted yesterday by a friend who needed urgent help. He said that his work computer had been infected by a virus after clicking a link to a Manga site. Several warning messages popped up saying there were all kinds of viruses on his computer, so he turned off the computer and unplugged the network cable.

His work computer is owned by the company he works for which has their own IT staff. However, he didn’t want them knowing he was browsing non-business related websites, so he came to me.

The first thing I did was boot up the computer to see what was going on. After starting up, it asked for a password to log into Windows Vista. However, he didn’t want to put in his password for fear of a keylogger recording the buttons being pressed.

So instead, I rebooted the computer and used the handy SystemRescueCd to bypass Windows. SystemRescueCD comes with the open source anti virus program called Clam AV. I plugged the network cable back in and updated Clam AV’s virus database. Then, I did a virus scan which took awhile. When the scan was done, Clam AV said 0 files were infected. This was odd because he told me the pop up warning messages said he had around 40 something viruses infecting his computer.

I felt pretty confident in Clam AV’s results, so I unplugged the network cable and logged into Vista. Sure enough, there were several warning messages popping up saying his computer was severely infected. One of the messages said the anti virus program had expired and that he should purchase a new registration to get rid of all the viruses. The program giving the messages was called Anti-Virus-1.

A simple Google search for “Anti-Virus-1″ yielded several results stating that Anti-Virus-1 was a rouge anti-spyware program. Basically, it’s a program that gives you fake warning messages about non-existent viruses to scare you into giving them money to remove them. This was my first experience with such a convincing rogue program. Here’s more info on it and how to get rid of this particular rogue…

http://www.bleepingcomputer.com/forums/topic204619.html

My friend’s goal was to get rid of the virus without his company finding out he was visiting non-business related sites, so I showed him how to delete individual items in Internet Explorer’s history. Then, I advised him to just contact his IT department and tell them about this rogue program and that he didn’t know how it got installed. Hopefully, they’ll just take care of it with no questions asked. I’d offer to do a clean install for him instead of contacting IT, however, I don’t have a copy of the proprietary programs his company uses.

For future reference, I told him to just bring his own laptop to work for browsing personal sites. I’m mostly on a Linux or Mac computer, so I don’t deal with viruses very often. Anyone know a better way I could have handled the situation? I think we were overly paranoid about the keylogging since we already unplugged the network. Also, I could have saved some time by just deleting his browsing history instead of trying to get rid of the virus which his company’s IT staff should be able to handle fine.

Anyways, here are some tips to prevent malware from reeking havoc…

  • Use a firewall.
  • Use a more secure browser like Firefox
  • Use a real time anti virus program like Avast! that auto updates its virus database.
  • Don’t run programs or open files from untrusted sources.

Anyone know any other helpful tips?

- Alpha Mesh