lyncd

Code

Overclocked Android kernel for Optimus V

Now that LG has corrected its source code, I’ve built my overclocked Android kernel for the Virgin Mobile Optimus V, a phone that’s nearly identical to my Sprint Optimus S and that also runs on Sprint’s 3G CDMA network. If your V needs a speed boost or extra driver support, keep reading! more …

Filed under: Code.  Tagged: , , , .

Update: LG addresses bugs in kernel source for Optimus V

Sweet victory! LG took quick action and wrote me yesterday to tell me they’d released an updated version of the source code for the Optimus V that fixes the bugs I identified over the weekend.

So, all is well in this small corner of the open-source world. I’ve downloaded the new source code (labeled “LGVM670(Thunder) Android Froyo/kernel bugs were fixed” on LG’s download site), and verified that the fixes were made and that the new code builds cleanly.

In case you’re interested in the differences between the Optimus S and Optimus V (LS670 and VM670, respectively), here’s a diff of the kernel sources that I’ve made.

Filed under: Code.  Tagged: , , , , .

Bugs in LG kernel source code for Optimus V

I’ve discovered some bugs in the Linux kernel source code released by LG for the Virgin Mobile Optimus V, or VM670, a close CDMA twin to my Sprint Optimus S. It seems clear from the differences between the S and V source releases that LG has attempted to scrub code comments from the V source, but in the process they’ve created at least two syntax errors that break the code and cause it not to build.

They’ve also left out 15 files that are part of the Linux kernel’s netfilter and needed to build the kernel as configured by LG.

Update: LG has fixed the bugs, so keep reading only if you’re interested in the details.

I’ll detail the problems and explain how to (possibly) fix them below. However, the real issue is that the LG archive is broken as-is, so there’s no way it was used to build the actual Optimus V kernel. While I’m no GPL expert, it seems to me that LG is obligated to provide actual, working source code upon request, not an incomplete, broken fork. Let’s hope this was just an oversight, and one that LG will rectify. more …

Filed under: Code.  Tagged: , , , , .

Simple overclocked Android kernel for Optimus S

If you’re looking to give your Sprint Optimus S a speed boost, I’ve got a kernel for you, compiled from official LG source code, that adds overclocking and removes unneeded debugging features for a leaner, meaner kernel.

The basic idea behind this kernel build is “stable performance” — other devs are doing a great job backporting the latest features from the mainline Android kernel and writing experimental patches. My goal is a lot less ambitious, but also less bleeding-edge: Build a kernel from official source, one that “just works” for me the user, but boost performance to get the most from the hardware.

I’ve also included the Linux TUN/TAP driver as a module, so that (among other things) you can use OpenVPN with your Optimus, if you like. Need some other module? Ask! more …

Filed under: Code.  Tagged: , , , .

Some minor improvements to Minify for CSS

Recently I was taking a closer look at some minified CSS output, and I noticed a few things that Minify could be doing to compress CSS slightly better. more …

Filed under: Code.  Tagged: , .

The real scoop on WordPress ‘Connections Information’ request for FTP info

The last few versions of WordPress have had a feature that lets you install or upgrade a plugin directly through the WordPress GUI. There’s just a small problem — for many people, the process fails and, instead of explaining the issue, WordPress redirects to an inscrutable “Connections Information” screen requesting FTP server credentials. Which, for people like me who don’t use FTP, is kind of a dead end.

I deploy all my code through a VCS, so it wasn’t until I started testing activation/deactivation/uninstall hooks for a plugin that I ran into the problem. Anyway, the reason I’m writing this post is that, while the workaround is just a one-liner, unfortunately, most of the “solutions” I found on the web were wrong or at best incomplete. Also, I think what WordPress is doing here could use improvement. more …

Filed under: Code.  Tagged: .

Get it while it’s hot: User Spam Remover for WordPress

I’m releasing a WordPress plugin that I wrote to tackle the scourge of user registration spam — those annoying bots that linkspam the WordPress registration form.

If you need a way to silently and automatically delete these spam accounts, and block the new user notification e-mail that WordPress normally sends, check out User Spam Remover. more …

Filed under: Code.  Tagged: .

HTML Minify for WordPress and WP Super Cache: Now a plugin!

It’s been a while, but I’ve updated my code that adds Minify to WP Super Cache, making everyone’s favorite WordPress caching plugin that much better.

What’s better is that my code now operates as a fully fledged plugin to Super Cache, so it’s now a drop-in install (no more patches!). Go to WPSCMin’s project page for all the info. more …

Filed under: Code.  Tagged: , , , .

Better Google Analytics JavaScript that doesn’t block page downloading

If you saw Steve Souders’ March 5 talk at Google and have ever used Google Analytics, then you were probably amused when he used GA’s JavaScript insertion code as his “wrong” counterexample. Well, at least I was, and somebody else mentioned it in the Q&A so I figure I’m not the only one.

The GA insertion code that Google gives you to put on your site does a couple of bad things: First, it uses document.write, and second, it loads ga.js directly, which blocks browsers from doing any page rendering or downloading of other page components (images, scripts, stylesheets) during the whole time it takes ga.js to download and execute. In other words, Google Analytics makes your pages load slower!

Using Steve’s best practices, I’ve coded up a better version that does DOM insertion of the script tag and uses the “script onload” technique to initialize the tracker, so that it doesn’t block I/O, and you can inline it anywhere on the page or even load it from an external file. You can choose to lazy-load GA whenever you want — for instance, even after window.onload fires — so that it’s totally asynchronous and doesn’t interfere with page rendering at all. more …

Filed under: Code.  Tagged: , , .

Optimize all your PNG and JPEG images with one command using imgopt

Here’s something useful for the web developers out there. It’s a script I’ve been using for a while that makes it super-easy to losslessly compress entire folders of PNG and JPEG files for the web.

If you’re familiar with PNG optimization, then you know about programs like advpng, optipng and pngout that optimize and recompress PNG files, making them much smaller than the likes of Photoshop can. My shell script combines all three of these utilities to achieve minimum file size, while hiding their command-line syntax and adding the ability to recursively process entire directory trees.

And, it works with JPEGs, too! It uses jpegtran (included with libjpeg) and another small utility I’ve included to optimize and strip all metadata from JPEG files. Since my script searches directories recursively, all you need to do is type, say, imgopt myproj/htdocs and it’ll take care of your entire website.

All compression is lossless, which means no pixels are changed and no information is lost, the files just get smaller — chances are your layout can shrink by as much as 50%, which is like getting free bandwidth, and it means your site will snap into place that much faster for users. more …

Filed under: Code.  Tagged: , , .

Older posts »