PHP curly syntax + non-object functions

<?php
$F = "F";
function F($s) { return $s; }
$filename = '<some code>';
echo "{$F(htmlspecialchars($filename))}";

This allows you to use functions in the curly syntax when defining strings for PHP.

The inherent danger of single sign-on

Although OpenID’s ubiquity is still growing, we already live in a world of “single-sign on,” although in a much smaller scope. Take Google for example: your one Google account authenticates you to your email, RSS feeds, stocks, Adsense, Analytics, and anything else you use. While that makes life easy for you, that one login gives you your life history through all the services you use. Now, if someone else got a hold of your login information, they could change the login password and your alternative email address so that you would be unable to login to or recover your account. Not only that, if your login details were stolen, for example, because you were using Google Talk, it’s not only your Google Talk account that you would have lost: it’s your entire Google account.

However, I think there’s an easy solution to this. Analogous to a well-configured Linux system, you don’t log onto root unless you intend on modifying some important part of the system. By sticking to a lowly, regular user account, you don’t give yourself privileges that you do not need. This model could work just as well for website logins. While you still keep the same login name, services should allow its users to assign alternative passwords that provide different sets of credentials. For example, my 2nd password would only allow me access to my messenger account and nothing more. If that password gets stolen, I can login with my “root” password and remove that compromised login. While all of my contacts may have been deleted or stolen, the attacker never had access to my email account.

I think it’s a novel idea. Now, if only MSN and Google would implement it! That way, I might be able to use one of the only decent IM programs for Pocket PC (they all connect through a company’s proxy).

Photoshop CS3 3D Rendering and Video

Well, apparently as of Adobe Photoshop CS3 Extended, 3D models can be imported and videos can be edited. Obviously, as Photoshop is an image manipulation program, it is not exactly the best suited for these tasks. However, if you don’t have the resources to use other programs, then I suppose these features could come in handy. It makes me wonder whether Adobe is running out of enhancements to add though.

The following is a 3D model of a school bus rendered in Photoshop (wireframe mode) and animated into a video. Don’t get too excited now…

RapidShare’s Cat and Dog CAPTCHA

I just noticed that RapidShare had implemented a CAPTCHA with cats and dogs (I haven’t been to RapidShare.COM for a while). Their original one wasn’t that hard to break. The new is interesting because it requires a human to recognize the animal that is shown. Computers can’t do that.

RapidShare CAPTCHA with cats and dogs

But it looks to be still weak. It appears that Rapidshare uses the same image for the cat and dog for every CAPTCHA. It would be easy for a program to find the cat and dog images on the CAPTCHA, extract them, identify them, and remove them from the image so that the text can be very easily OCRed. Maybe if RapidShare distorted the image, used different fonts, added random lines, and used different images for the animals, then they would have a real chance against those automated download programs. In fact, I wouldn’t be surprised if it already has been broken.

Edit: Well, (unfortunately…) it appears they have now added distortion and blurring… >.>

Express FTP Uploading: ByteDropper

For a long time now, I have been using ByteDropper to quickly upload files to an FTP server without having to boot up an entire FTP client. ByteDropper isn’t alone in its category though; there are several other programs that do basically the same. However, ByteDropper is the best in my opinion. Files can be dragged into the program to upload to any of the pre-configured server profiles, and once the file has been transferred, ByteDropper will provide you a URL to copy and paste. The closest competitor is written in .NET, but it’s a little too slow during boot up to be of much use.

ByteDropper

No one seems to know about ByteDropper though. Google returns only two entries for the program, one being the official website and the other a Norwegian forum. I have no clue how I found ByteDropper myself to begin with, and I can assure you that I don’t visit Norwegian forums, less understand Norwegian. ;) ByteDropper’s free, so check it out!

Changing the UI font in Outlook 2007

I am curious as to whether anyone knows how to change the interface font of Microsoft Outlook 2007 from Segoe UI(?) to something else, such as Tahoma. It drives me mad that the font in Outlook 2007 clashes with every other program on my system. Oh the inconsistency—ERRGH! One of the reasons I turned off Windows Vista’s Aero theme, other than primarily for performance reasons, was that half of the dialogs still used Tahoma while the rest used Segoe UI. At least when Microsoft chose to make the change from MS Sans Serif to Tahoma, the fonts were relatively similar. (I actually held off on enabling ClearType for a while because the jagged characters of MS Sans Serif, which was common in use at the time, were jarring to the eye when shown next to a ’smooth’ font.)

I’d use Mozilla Thunderbird+Lightning if the combination had more features. Lighting is especially problematic with some of its bugs, eating up my calendar events when I was working with several repeating ones. Most importantly, ActiveSync and Windows Mobile Device Center do not support Thunderbird/Lightning out of the box (and I don’t find BirdieSync, the only available option, worth either my money or RAM).

Windows’ version of Time Machine

Shadow copies is a feature introduced in Windows XP that kept incremental versions of your files in case you ever needed to restore files and folders from the past. As of Windows Vista, its role has been made a little effective. It is accessible on the “Previous versions” tab of file and folder properties as a list of versions in the past. If you use it on a folder, you can open a folder as if you were back in time and copy files out of it at your will. Just right click a folder or file, click “Properties,” and select “Previous versions.”

Read the rest of this entry »

Gmail version two

Google is testing a new interface for its Gmail client with only a handful of selected individuals, so login to your webmail account to see if you’re one of the lucky few. You will realize that your account has been upgraded when a "Newer version" or "Older version" link appears in the top right corner.

So what’s new?

  • More JavaScript used throughout the interface
  • Filter similar messages option under "More Actions"
  • Mute option under "More Actions"
  • Completely revamped 3-pane (groups, names, person details) interface for the contacts list

Filter messages like these, Mute options     image

The changes appear to be useful, but it seems this version is considerably slower than the older one. The Google Rumor Mill says the changes were to make Gmail faster, but that’s not true for me. Even scrolling the page is sluggish. I hope Google fixes this before it becomes official, but for now, I’ll stick with the old version.

Contact me with my PGP key

I recently acquired a new PGP key that you can use to create encrypted messages that only I can open. This move was spurred by my switch to Thunderbird, fueled by GMail’s newly added support for IMAP (now Yahoo! needs to follow along…). To sum it up, PGP (Pretty Good Privacy) uses public-key cryptography to create two keys: a private and a public one. Anyone can use the public key to encrypt a message, but only the holder of the private key can decrypt the encrypted message. You will need a PGP implementation such as GnuPG to send me encrypted messages.

Read the rest of this entry »

My experience with Windows Live Writer

I have used Windows Live Writer for three posts now, and I’m liking it. Aesthetically, it is very appealing. Functionality-wise, it’s very user friendly and serves well for most blog posts. The WYSIWYG editor is easy to use, responsive, and churns out (mostly) clean, valid XHTML. You have the basic formatting controls (bold, italics, underline, strike-through),  image upload (with effects) support, tables, lists, links, and teaser cut off. WLM also handles hierarchal categories and WordPress’ pages. Lastly, there’s the trusty spell check with the squiggly red lines and plugin support.

Windows Live Writer has its limitations though. While it does the formatting functions well, Windows Live Writer has no support for using the other twenty or so XHTML tags like acronym and code without having to resort to the code editor. Even then, WLW tends to destroy code, especially code in pre tags, by removing the new lines and tabs once you do put it in the code editor.

My conclusion: try it if you need a blog editor, and see if it fits your needs, but don’t forget that there are already several others out on the market already.

Getting SSH to automatically start tunnels on Windows

Using an encrypted SSH session as a way to tunnel your communications has several advantages: (1) system administrators cannot spy on your activities, (2) you will not become a victim for using an unencrypted wireless access point, and (3) you can bypass website and service blocks. I won’t cover how to setup a SSH server here though. *nix and BSD users already have sshd and man sshd_config to help them, while Microsoft Window users have plethora of articles on the subject.

What concerns me, then, is how to get ssh going automatically, possibly on the startup of your computer, so you have a tunnel ready to use when you need it. I won’t be using the ever popular PuTTY telnet/SSH client though; *nix’s SSH client is far more customizable and it’s available for Windows too. You can get ssh by installing Cygwin (a large package) or just OpenSSH for Windows.

Read the rest of this entry »

Blocking Facebook application invites

It’s nice and dandy that Facebook became a MySpace clone with its 3rd-party applications, earning Zuckerberg a little more for his pockets, but the volume of application invitations has become akin to the spam I get in my inbox. Presently, Facebook has no function to block these invitations, but some of you begging for some sanity in this mess don’t have to rely on Zuckerberg to get the wheels going. Grab the Greasemonkey extension for Mozilla Firefox and install Ali’s Auto-Block Facebook Apps script. When you visit your Facebook homepage (upon logging in, for example), new invites will be blocked automatically. Enjoy.

Update: Check out this funny video about the excess of Facebook apps. Echos my own opinion.

Updated Quick Edit for InvisionFree

My InvisionFree scripts have gone to Google Code! Updating the repository for me is a cinch, and server reliability is no longer an issue. In addition, there’s no more of that domain expiration business that plagued several forums over the last few days (with nasty advertisement redirects). I also took the time to update Quick Edit a bit, finally adding Safari support (took only two changed lines, too), and updated the design for the form. For those using an InvisionFree forum, I encourage you to go install the Quick Edit script immediately. Quick edit is so de facto nowadays, mainly because it’s so useful.

Quick Edit screenshot

Hacked my CueCat

I finally hacked the CueCat I have (well actually, I have at two or more). Too bad I have no use for a barcode scanner; I have no video archives to scan, no CD collections to scan, etc. Nevertheless, I felt a lure to do it because it was such an easy project. No soldering was needed; it only required pure brute force as you attempted to destroy one pin.

I’ve got my GrandCentral account

GrandCentral logoGrandCentral gives you a phone number that will be yours “for life.” Service began in 2005, but I only became aware of it when Google acquired the company back in July. When you get a call through your GrandCentral number, all the phones of your choosing will ring, and you are free to pick up on any of them. In case you don’t want to answer, you can send it to voicemail, and access it online or by phone. In addition, you can customize your ringback tones, your greetings—per group or person, or activate spam filtering.

My invite came only last week, but I’m already updating all my friends with my new number. For now, it doesn’t have SMS messaging (not that my cell plan paid for it anyway) or an easy way to make an outgoing call, but it’s saving me minutes, and that’s all I care. I have eight invites left, so if you want one, drop me a line. Available while supplies last.

Want to watch anime online?

Search Google for online anime and you’ll find 2,410,000 results. Watching episodes online have become a boom in the last two years, mostly thanks to the introduction to YouTube and its derivatives. Anyone with a decent Internet connection can upload a whole episode in under an hour, and with so many people uploading episodes, there’s such a lucrative market for websites to “index” these videos. The first site to do it (to my knowledge), was Keiichi Anime Forever, which is, ahem [bragging]my site[/bragging]. Os2 Anime began at the beginning of January 2006, and it became the largest (and only) index of episodes, totaling a few hundred series within two months. The idea took off, and there were a ton of copycat sites (it is an honor to be copied!) like PeekVid and Galbadia Hotel.

If you want to find anime episodes, or just episodes of any kind, try alluc.org and tv-links.co.uk. If absolutely no moral barriers cross your mind, you can check out movies at movieforumz.com.

New blog look

Now the black expanse has left behind its black, but now it’s asking for some color, or some image, or at least something. At least this is much better than the one that was up for a few months. It’s simple, and plain, yes, but I think I’m going to stick with it. (By the way, the CSS specifies the font size in pixels, which, I know, is a no-no, but I didn’t make the [original] theme. Can’t blame me!)

JavaScript Source Code Editors

CodePress and EditArea have become rising stars of the edit-code-in-your-browser scene, but which one fits your needs?

EditArea

EditArea, hands down, has the features. There’s cut and paste, full block/line forward and backward tabbing, search and replace, smart tabs, and spaces as tabs. So what’s the catch? EditArea loses its charm when you become friends with its slow response time. A file with 500 lines is a no-no. EditArea aligns another layer over a TEXTAREA element to color code the text. The bottom line: go for EditArea if you want the features, sacrificing speed.

CodePress

CodePress instead uses an IFRAME with edit mode enabled, giving CodePress the response time akin to a native text editor, but CodePress lacks many of the “vital” features. You won’t find smart tabs, spaces-as-tabs, tabbing blocks of code forward and backward, and the ability to paste cleanly to outside the editor. The bottom line: go for CodePress if you want to edit large files.

By the way, there are two more options: CodeArea 2 and Helene. The former uses the same mechanism as CodePress, but it has unfortunately fallen out of development. Helene was one of the first (if not the first) to edit code, but it does itline by line, so the interface is a little awkward.

5 CM Signature and Avatar Set

I’ve made a new signature and avatar set based off of the beautiful anime 5 Centimeters Per Second, “a chain of short stories about their distance.”

sk89q's 5 CM 50x50 avatar sk89q's 5 CM signature

Updated Site

In an effort to make this site easier to maintain, I’ve deleted all the original pages and returned my blog back to the root directory. And, in the interest of saving some time, I installed a pre-made skin called “Ninja Monkeys!” I hope you enjoy the black expanse that envelopes this neglected blog.

Next entries »