The Awesome Russian Ekranoplan
Found via my buddy, this russian giga-plane uses the “ground effect” to achieve a level flight near the surface of the earth, the distance relative to the wingspan. Here’s another picture of this leviathan.
Wordpress Trick: Hide Admin Panels From Specific User Roles
When you’re building a Wordpress website for a client, sometimes you’ll want to hide certain admin panels from specific user roles; do editors really need “custom fields”? Drop the following code into your functions.php file to hide the Custom Fields meta-box from editors.
function hide_meta_boxes() { remove_meta_box('postcustom','post','normal'); remove_meta_box('postcustom','page','normal'); } if (!current_user_can('manage_options')) { add_action('admin_init','hide_meta_boxes'); }
The remove_meta_box function takes three parameters. 1: the div ID of the box you want to hide, the context (post or page) and position (normal or advanced).
The Complete Archives Of Popular Science
Out now using Googles “Books” engine, all the magazines ever published of Popular Science Monthly. Delicous.
A New Ubuntu Interface
Ubuntu is getting a new interface replacing the theme it’s sported across a number of versions now. Some superfast observations:
- Only a top-bar as opposed to previously, a top and bottom bar.
- Close buttons on the left! Are they insane?
- There are still file menus. How 1995.
- There’s a “Shutdown” button in the top right corner, arguably the best real-estate according to Paul Fitt. Do we really want it to be that easy to shut down?
Open Letter To Steve Jobs Concerning The HTC Lawsuits
Enforcing patents is wrong. You’ve famously taken and built on ideas from your competitors, as have I, as we should, as great artists do. Why is what HTC has done worse? Whether an idea was patented doesn’t change the morality of copying it, it only changes the ability to sue.
[...]
I always thought of you as a guy who’d say, “Well, copy me if you can, because you’re copying what I did years ago, and what I’m working on now is EVEN cooler!” I like it when competitors copy me because it means they aren’t about to leapfrog me: they’ll always be playing catch-up.
This is, of course, the laser-eyes-lion-riding Wil Shipley who was himself copied by Apple. Which makes this post extra delicious.
Wordpress Trick: Google MP3 Player Shortcode
Here’s another Wordpress shortcode which is quite useful. It piggybacks on Googles excellent Flash-based MP3 player (the one they use in Gmail and so on), makes it easy to embed playable MP3s in your posts. Syntax: [mp3=path/to/filename.mp3]. Dump this in your functions.php:
function mp3player($attr) { $src = str_replace("=", "", $attr[0]); return '<embed type="application/x-shockwave-flash" src="http://www.google.com/reader/ui/3247397568-audio-player.swf?audioUrl='.$src.'" width="100%" height="27" allowscriptaccess="never" quality="best" bgcolor="#ffffff" wmode="window" flashvars="playerMode=embedded" />'; } add_shortcode('mp3', 'mp3player');
Here’s an example:
Music by Speaker Bite Me.
Wordpress Trick: Create A Google Viewer PDF Shortcode [Update]
Want your PDFs to view through Google Reader? Wrap it in a shortcode like this: Link to a PDF. Drop the following in your functions.php:
function pdflink($attr, $content) { return '<a class="pdf" href="http://docs.google.com/viewer?url=' . $attr['href'] . '">'.$content.'</a>'; } add_shortcode('pdf', 'pdflink');
[Update]: Here’s an updated shortcode function which allows you to also embed PDFs using this syntax: Link to a PDF. Note how it’s just a tad shorter, and you don’t have to remember the “href” parameter, though you can still use it.
function pdflink($attr, $content) { if ($attr['href']) { return '<a class="pdf" href="http://docs.google.com/viewer?url=' . $attr['href'] . '">'.$content.'</a>'; } else { $src = str_replace("=", "", $attr[0]); return '<a class="pdf" href="http://docs.google.com/viewer?url=' . $src . '">'.$content.'</a>'; } } add_shortcode('pdf', 'pdflink');
Also, here’s an example PDF link using the above code: Link to a PDF.
Android Market Finally Shows Updates To Your Apps
Until now (which is a while) you haven’t had any easy way to find updates to apps you’ve installed on your Android phone. You had to enter the market and search for a particular app to see if an update was available. Since just a few days ago, you can now simply click the “Downloads” tab, to see which apps you have installed, and which of them have updates available.
Forcing Scrollbars, 2010 Edition
One of the challenges in webdesign is preventing the slight jog that happens when you — in a centered HTML design — when you go from a page that needs a scrollbar, to one that doesn’t. Think about it — you go from the short contact page to the blog, and everything is offset to the left in the process, because the scrollbar takes up 18px. The solution, so far, has been to force the scrollbars by faking extra page height:
html { height: 100%; margin-bottom: 1px; }
Which has, for the most part, worked, even if it felt somewhat unnatural to scroll a page that doesn’t need scrolling. Fortunately, there’s a new method in town, which relies on CSS3:
html { overflow-y: scroll; }
This forces the scroll-pane even when not needed. The beauty of it is, it doesn’t add the actual scroll-bar until it’s actually needed. This works in Internet Explorer, Safari 3+, Firefox 3+, Opera and Chrome.
Special thanks Alexander Graf and also M. Slater who has a demo available.