Archive for the ‘tech’ Category
Exercise in Master Padlock “Picking” meets PHP
After seeing:
http://lifehacker.com/5376442/crack-a-master-combination-padlock-redux
which has a link to a graphic art representation of how to pick a master padlock:
http://www.markedwardcampos.com/index.php?/design/master-lock/
a coworker and I set about to figure out the pattern in the tables that help you reduce the possible combinations from 64,000 to only 100 (to open the lock without knowing the combination).
Seeing the pattern, I wrote a quick piece of shoddy php to generate the combinations needed based on the number you divine from the mechanical part of the process.
<?
$num = $argv[1]; $mod = $num % 4; $secondRow[] = $mod % 2; if($mod > 1) $secondRow[] = $mod; $secondRow[] = $primer = 6 + $mod; $i = $mod; while($i < 40) { $firstRow[] = $i; $i += 4; } $i = $primer + 4; while($i < 40) { $secondRow[] = $i; $i += 4; } echo "\nStart with the first number of the top row, in combination with the first number of the second row\nThen use the same number of the top row with second number of the bottom row\nThis way you reduce the possibilities from 64,000 to only 100\n"; foreach($firstRow as $row){ echo $row . "\t"; } echo "\n|\\\t/|\\\t/|\\...\n"; foreach ($secondRow as $row){ echo $row . "\t"; } echo "\n\nLast number is: {$num}\n\n"; ?>
Sloppy but accurate.
Cheers
Rip High Quality mp3s From The Web
Using a one-two combo, you can get your quick rips of mp3s (in good quality).
Step 1) www.goear.com
The site http://www.goear.com/ will search out nearly any song (I tried with the obscure, but awesome, Canadian band The Rural Alberta Advantage here: http://www.goear.com/search.php?q=the+rural+alberta+advantage). This search will find a song and then offer you a web-player and play the song. The next step is to copy the link from the listening page, and paste it into step 2.
Step 2) dowint.net
Paste the audio listen link into http://dowint.net/ (take a second to copy the song name, so you can replace the random text that the filename has by default) and save that bad larry to your computer using the right-click -> save link feature of your browser.
Note that dowint.net can also rip media from youtube.com, dailymotion.com and metacafe.com, but goear.com seems to have the best quality audio, so far. Side-note: if you listen to the song first, before placing the link in downint.net, it grabs it from your local cache, so you can grab the mp3 almostinstantly.
Happy Ripping
Firefox 3.0.10 Revisited, Chrome Stuck Around
In July of last year, I wrote a long winded and frustration-born post about my struggles with Firefox, which had seen a recent upgrade to version 3. I thought it only fair to report that Firefox 3 has been working well for me on both of my XP machines (still no new hardware or motivation to try Vista or the beta for Win 7) and my development Linux box (and the linux install I had on my laptop for about 6 months).
Chrome came into the view a while back, and after beating down suspicions that it was little more than a Google services platform, and taking a lot of slack for extension lack, it has really shown itself a worthy competitor in the browser arena.
The lack of extensions is the main issue for me, or at least I thought it was. Over time, and now with Chrome v.2, which offers a stable build with full screen, I’ve realized that while some extensions are irreplaceable, if a browser is good enough at it’s core, you don’t really need to extend it. There will always be special needs for customization, and Firefox is the itinerant work horse here. It will always have a warm spot in my heart for taking on the big blue ‘e’ (IE) and holding it’s own there. But Chrome is just hitting the spot these days, at least on my Windows builds.
In other tech related notes, I’m testing an Ubuntu 8.10 server install on some old cobbled together hardware to fool around and… serve stuff here at home. After I muck about a bit more, I’ll post up on it.
Firefox 3.0 and 3.0.1 – Enough to make you think about IE again
I was hoping to write up a nice glowing review of Firefox 3. I’ve tried the betas, the final and now the first update. The problem is, the browser won’t let me play with it long enough to test it’s new features.
When searching for fixes to the problem I’m having, I find a crew of other malcontents slowly raising their hands on forums (Mozilla’s own, as well as others), admitting, despite their best wishes, that the browser has bottomed out for them too.
The specific problem I am having relates to the browser hanging and running up it’s memory use. If I give it a higher priority (working with the Windows task manager process list) sometimes it will resolve, but the fix is always temporary. I get between one and five minutes of FF3 free wheeling fun and then bam, frozen. It has topped out at 200k, even with no page loaded while in safe mode.
Helpful posters at the mozilla forums suggested some possible solutions (opens in new window) which did not help my case. Also, Mozilla offers tips at their Firefox Hangs (opens in new window) page on how to address a freezing browser, but again no help for me.
I spent the first part of the day switching back to FF3, after changing my anti-virus, uninstalling a slew of possibly conflicting programs, and going commando on all traces of previous FF installs (folders, registry settings, old happy memories). Of course, the initial 5 to 10 minutes of my first run of each fresh install of FF3 are beautiful, filling me with soon-to-be bitter hope. After admitting that I was still not ready for Firefox3 on this machine, I uninstalled it and reinstalled the latest 2 release (2.0.0.16) and was back to no problems.
With the day nearly over, the news that 3.0.1 was available trickled into my RSS catcher and I went out, once again, on the hunt. Needless to say, the experience was not improved by the mysteriously summarized “Fixed several stability issues” (See http://www.mozilla.com/en-US/firefox/3.0.1/releasenotes/).
In summary, after a day of juggling between Firefox 2 and Firefox 3, I’m throwing in the towel and sticking with 2 until I hear about some major stability fixes. I still can’t take myself out of the search for solution. For all I know, some little proggie I use is gumming up the works, but Mozilla, this is for you: Address these issues!
Incidentally, a frozen Firefox browser still beats a working one of Internet Explorer. Sheesh, who does Microsoft hire to come up with product names, anyways: “Internet Explorer.” Woo hoo, where’s my captain’s hat?
Download links:
Firefox 3.0.1: http://www.mozilla.com/en-US/firefox/
Firefox 2.0.0.16: http://www.mozilla.com/en-US/firefox/all-older.html
Installing the New Ubuntu 7.10 is Easy
So you want to try Linux. You heard Ubuntu finally made an easy to use and install version of Linux.
My advice? Do it.
First word of caution: Linux has come a long way, but it is still young.
Second word of caution: If you are not willing to lose your old operation system, you might still want to sit this one out. It is very possible to create a dual-boot machine, and install Ubuntu on your machine without damaging your current installation of windows (or whatever you have), but there are not guarantees whatsoever.
So, you feeling a little experimental, don’t have much to lose on your system and finally want to try a free operating system? Navigate to this link, and choose one of the first two downloads. The first download ( PC (Intel x86) desktop CD ) is for most users, and if you have a 64-bit machine, use the other ( 64-bit PC (AMD64) desktop CD )
Link: http://releases.ubuntu.com/7.10/
Some quick notes?
- I installed version 6.06 of Ubuntu, and found it adequate and in some respects better than my Windows machine.
- One of the best features is a full catalog of free software. You actually choose these titles from a list of EVERYTHING available. There are games, applications, utilities and nearly any application on any other system has a brother or sister which does the same thing on Linux, but without any price tag (and legally free, not pirated).
- The newest version of Ubuntu – 7.10 is faster. I installed it on the same exact machine as I installed Ubuntu 6.06 and boot up and load time was faster, menu response was quicker, I could run more applications at the same time, and the newer version automatically supported my video card more efficiently. High definition video could run full screen with no lag whatsoever, and the audio did not skip.
- Ubuntu 7.10 now offers to help you find “non-free” support for video and audio. Normally, the Linux will not come with any support for file formats (such as “mp3″) which are commercially bound to someone. In the case of “mp3″ – this is a format which is owned by a corporation, and is not public domain. The spirit of the Linux community revolves around open source and open licensed software. This latest version of Ubuntu does not come with support for “mp3″ installed either. However, the first time you attempt to play an “mp3″ file, your media player will ask if you want to search for one – and sure enough it will find it. The same goes for dvd, avi, divx and a host of other “closed” formats. The world of media just became easier to access on a Linux based machine.
