0

How To Display Just The HTTP Response Code In CLI Curl


Posted by Artem Russakovskii on June 10th, 2010 in Linux, Tips

Today, I was looking for a quick way to see HTTP response codes of a bunch of urls. Naturally, I turned to the curl command, which I would usually use like this:

curl -IL "URL"

This command would send a HEAD request (-I), follow through all redirects (-L), and display some useful information in the end. Most of the time it's ideal:

curl -IL "http://www.google.com"
 
HTTP/1.1 200 OK
Date: Fri, 11 Jun 2010 03:58:55 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
X-XSS-Protection: 1; mode=block
Transfer-Encoding: chunked

However, the server I was curling didn't…

  • Share/Bookmark

http://media.smashingmagazine.com/cdn_smash/images/shortcuts/total-commander-logo.pngToday I have 2 tips for Total Commander users:

  • how to display hidden local directories and files and
  • how to display hidden FTP directories and files

Really, Total Commander should just control this setting in one place but, unfortunately, it is not the case.

I usually prefer when my file manager shows me everything I have, so that I can be more in control and see the hidden directories, such as .svn or $Recycle.Bin, and files, such as .bashrc or pagefile.sys.

How To Display Hidden Local Directories And Files

  • go to Configuration -> Options… ->

  • Share/Bookmark

VPN This tip can also be filed in the "post with the longest title that kind of makes sense but needs more explanation" category.

If you use a VPN (Virtual Private Network), this tip is for you.

 

The Problem

  • you connect to a VPN to get access to your work/whatever network
  • your connection is fast but the VPN connection is balls slow
  • you try to stream a bit of online radio, go to a website, watch a video, or do anything, which is automatically routed through the VPN connection but everything TAKES AGES because

  • Share/Bookmark
5

How To View A Specific SVN Revision In Your Browser


Posted by Artem Russakovskii on February 20th, 2010 in SVN, Tips

Updated: July 26th, 2010

image This is a quick recipe that I found pretty interesting and relatively unknown.

Everyone who uses SVN knows that most repositories are set up to allow viewing of their contents via a web browser. For example, here's the trunk of WP Plugins SVN: http://plugins.svn.wordpress.org/ and here is the current trunk version of a specific file, let's say http://plugins.svn.wordpress.org/stats/trunk/readme.txt.

The Problem

However, what if you wanted to view a specific revision of a file or directory in your browser?

Let's say I wanted revision 100,000 of http://plugins.svn.wordpress.org/stats/trunk/readme.txt

Normally, on a command line,…

  • Share/Bookmark

The Problem

If you use the Recent Comments sidebar widget in your WordPress installation, it's possible that you want to customize this widget's style.

You will quickly find, however, that as soon as you add the widget to your sidebar, it injects the following inline, hardcoded CSS into the containing page (using !important to make things worse): 

<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>

The code above comes from recent_comments_style() (found in wp-includes/default-widgets.php), which is in turn called by WP_Widget_Recent_Comments() in the same file (this is just an old-style PHP4 constructor – same as PHP5's __construct()), which is triggered…

  • Share/Bookmark

Updated: August 8th, 2010

Introduction

wordpress logo In this tutorial, I am going to introduce a WordPress technique that I believe was unpublished until I raised the question a few days ago on the WordPress forums.

In short, the problem I was trying to solve was plugins unnecessarily loading their JavaScript and CSS on *every* page of the blog, even when doing so would achieve absolutely nothing and the plugin wouldn't do any work.

Update #1: I have posted a follow-up in response to some comments received around the web.

Update #2: There is a solution that can be considered a compromise

  • Share/Bookmark

youtube thumb Don't you just hate it when you visit somebody's blog, see an embedded Youtube video, play it, and find that the player is missing the full screen button.

Yeah, this one: youtube fullscreen button.

Well, I hate it too, so please, try not to be that guy. I realize sometimes you copy the embed code wrong or, on a larger scale, you add the wrong embed code to your generic template.

Not a problem. If your Youtube embeds are missing this button, here is how you can easily fix…

  • Share/Bookmark

Seasonscape - credit alexiuss There are undoubtedly a lot of wallpaper sites. Even more undoubtedly, most of them suck, both in content and filtering capabilities (by resolution, theme, etc).

My preferred way until recently was Deviant Art, because it had a lot of content and very nice filtering – I could specify my exact resolution.

However, as of some time ago, Deviant Art browsing by resolution disappeared, as evident from trying to find it on their site and from the comments on this post announcing the capability in the first place.

The Solution

Sometimes the solution lies right in…

  • Share/Bookmark
0

How To Export/Import Your ExpanDrive/SFTPDrive Drives And Settings


Posted by Artem Russakovskii on January 9th, 2010 in Linux, Tips, Tutorials

ExpanDrive logo ExpanDrive (formerly SFTPDrive) is a very handy Windows and Mac application that lets you take any SSH connection and mount it as a local drive. It saves me countless annoyances because I don't have to use a proprietary sftp uploader – in fact, I can simply open any file with my favorite editor, directly on the newly mounted drive.

The Problem

The problem with ExpandDrive is – it's quite simplistic. So simplistic that it doesn't offer an easy way to export its drive list and the associated settings. Because of that, you will have to enter all…

  • Share/Bookmark

image Ever since the introduction of the official Retweet button, I've wanted it to be a little more interactive. I usually want to add my 2 cents into the tweet I'm about to retweet but the default RT button just doesn't allow for it – Yes is the only option:

image

Troy's Twitter Script

Enter Troy's Twitter script for Firefox that I reviewed in detail a few months ago.

Troy's script added the RT button to my stream (along with inline picture and video embed, auto url expander and shortener, name autocomplete, and other things) way…

  • Share/Bookmark

image As a backend developer, I don't get to work with JavaScript much anymore. However, from time to time, a project would come along that uses JavaScript (specifically, AJAX) to load some backend data on the fly. Of course, nothing works 100% right away*, so I would often have to tweak this JavaScript and massage it until it does what I need.

Here's where Firebug comes in with its JavaScript debugger. I'm used to using a debugger in every language I deal with, so using Firebug is a no brainer. Since it supports breakpoints, stopping execution and inspecting local variables…

  • Share/Bookmark
1

Tip: Make Your Google Reader More Lively By Showing Favicons For Feeds


Posted by Artem Russakovskii on December 16th, 2009 in Google, Tips

image Well, this one almost escaped my attention but I'm glad it didn't: the best online news reader – Google Reader – just enabled favicon support for each feed you subscribe to.

Favicons are those 16×16 pixel tiny icons you see next to site urls in your browser and bookmarks. Not surprisingly, this was done as a 20% project, which is when Google developers get to work on anything they want, quite similarly to the monthly "haxo"s that Plaxo runs (that is where I work).

So now the previously boring subscriptions:

image

look like this:

image

  • Share/Bookmark

Updated: December 16th, 2009

image It's not a secret that my Sprint HTC Hero has been having trouble keeping battery charge – by the time I came home from work, the battery level would oftentimes be at 10% or the phone would be simply dead.

One would give up and accept this futility but I had 2 reasons to keep trying to figure out why:

  • my co-worker's battery would consistently hold twice as much charge as mine – by the time I was at 50%, he was at 75%
  • a wide range of responses on Internet forums and blog posts suggested

  • Share/Bookmark
0

Is Your Simplifymedia For Winamp Broken On A 64 Bit Windows 7? Here's How To Fix It


Posted by Artem Russakovskii on November 17th, 2009 in Tips

image

SimplifyMedia is an extremely useful program, which allows super easy song and playlist sharing via streaming between multiple computers. It also works as a Winamp plugin, so the shared songs simply show up inside Winamp's own media library – each computer sharing music appears under the special "Shared" tab. And the beauty is – there is no need to muck around with network settings, open ports, or even touch your router.

Here's a screenshot of how it's supposed to work:

image

The Problem

Since I recently installed Windows 7 64bit on my laptop, I wanted to set up…

  • Share/Bookmark

image

Introduction

Dear Skype,

you are great. You have the convenience of a nearby, well, convenience store and the UI that is acceptable to even an Apple fanboy (I'm not one, I'm just saying).

Skype also has a Firefox extension which finds all pieces of text that resemble phone numbers on web pages you are visiting and converts them into clickable Skype buttons image. One click and you're dialing the number. The premise is great but the execution… When it comes to your Firefox extension, Skype –…

  • Share/Bookmark