Updated: May 17th, 2012

imageWell, this one took ages. And whenever something takes me ages, rather than write it down in my personal notes, I prefer to put it out online for everyone with the same problem to easily find and benefit from.

The problem I'm talking about today is trying to upgrade your Windows 7 installation to SP1 by applying Microsoft's update KB976932, called "Windows 7 Service Pack 1 for x64-based Systems" and getting nothing but a failure every time. The same problem may affect 32-bit systems as well, and I'm not sure what the update number for that would be, but the solution should work for either one.

SNAGHTML3837080

The update starts just fine, chugs along for 10 minutes or so, then reboots …

Read the rest of this article »

Updated: August 27th, 2012

Today's snippet is tremendously helpful if you are using an XML-RPC WordPress interface to read and publish your articles and are running into 500 Server Error issues due to running out of memory, manifesting themselves in something like this error message: "Invalid Server Response – The response to the metaWeblog.newMediaObject method received from the weblog server was invalid".

For example, my regular PHP memory allocation is 32MB or so, but if I load up Windows Live Writer, my favorite publishing tool, and ask it to load 1000 of the latest blog posts, I will undoubtedly get a server error back.

One solution would be to increase the memory allocated to PHP to something higher, like 256MB, which is how …

Read the rest of this article »

Updated: February 2nd, 2011

WordPress has a great way of letting you use simple text tags called shortcodes to provide a whole bunch of functionality, including custom PHP code. In this article, I'm assuming that you already know what shortcodes do and how they operate (if you don't, head over here: Shortcode_API).

One glaring omission in the way shortcodes are set up by default is that they only get triggered in the content of your post, leaving the sidebar and comments out. I'm sure this is done for security, so that your readers can't screw something up by posting shortcodes they're not supposed to – after all, shortcodes are PHP snippets on the backend.

However, let's assume you really know what you're doing …

Read the rest of this article »

Updated: August 30th, 2014

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 as it works well for loading JavaScript but doesn't handle CSS.

I briefly mentioned this approach here but Scribu decided to expand on …

Read the rest of this article »

2

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 the drives all over again in case you reinstall Windows or want to replicate them to another computer.

Of course, there is a …

Read the rest of this article »

8

[Android] Auto Formatting Android XML Files With Eclipse


Posted by Artem Russakovskii on November 4th, 2009 in Android, Eclipse, Java, Programming, Tips, Tutorials

image In this article I will describe the problem I've had with Eclipse's handling of XML file formatting as well as the best way to fix it.

 

I use Eclipse to do my Android development for a few reasons:

  • it's the only IDE fully supported by the Android dev team
  • it has a visual Layout/Resources builder that transforms XML files into corresponding visual representations
  • it's free and open source
  • I've been using Eclipse for many years and am very familiar with it
In order to use the visual features in Eclipse when developing for Android, you need to install the ADT plugin provided by Google

The Problem

However, one thing about Eclipse Android development has bothered me for a while …

Read the rest of this article »

10

2 Gmail Tricks I Bet You Didn't Know About


Posted by Artem Russakovskii on August 17th, 2009 in Awesomeness, Google, My Favorites, Technology, Tutorials

OK, maybe you did know them – just see for yourself.

Introduction

The tricks I am going to describe allow you to create unique gmail addresses that still hit your existing gmail inbox, without actually making new gmail accounts.

This can be useful in a variety of situations when you need to use multiple email addresses without having the pain of maintaining them, such as

  • using unique emails while registering for the same service more than once (say, paypal)
  • giving out a unique email address to see if you start getting spam to it later – that way you know exactly who to blame for it
  • more generally, easily create email rules to sort incoming emails into folders, delete them,
  • Read the rest of this article »

Updated: October 6th, 2009

Introduction

Every time I have to deal with svn:externals in SVN, I forget the command line syntax. Every single damn time. Normally, I use SVN GUI clients, such as SmartSVN, which make it very simple to add an svn:externals property. But for command line, it always takes looking at 25 different sites on google, which are all incredibly unhelpful for this question for some reason. Trying "svn help propset" on the command line was bloated and equally useless.

So this time I needed to write it down and make sure everyone who needed help with svn:externals would find exactly what they need here. I hope this page will soon come up on top of all the unhelpful results on …

Read the rest of this article »

Updated: September 27th, 2009

Introduction

Welcome to part 2 of the Essential Firefox Extensions And Tips – A Comprehensive Guide series. In this article I’m going to describe a number of time saving pragmatic extensions that make me a better, faster, more efficient browser user (browserer?).

Pragmatic Extensions

All-in-One Gestures

All-in-One Gestures introduces customizable gestures for all kinds of actions. To perform a gesture, hold the right (by default) button and move the mouse in the specified direction, drawing the needed shape.

Btw, I believe Opera has gestures without any extensions, so Opera users should feel right at home using All-in-One Gestures.

image_thumb12

I use it mostly for 3 things: history back/forward and close tab (see below). Once you start using gestures, there is no …

Read the rest of this article »

Updated: June 10th, 2009

* Lightning Fast is a blatant exaggeration. Got you to look though, didn't it?

Introduction

Whether you are a web developer or a self-hosting business owner, the only excuse for not activating compression capabilities of your web server can be that you didn't know about it. And now that you are reading this, there is no excuse left at all.

Here is how big a single page of this blog was before compression was enabled on CSS and Javascript files (computed by YSlow):

image

And here it is after compression:

image

As you see, the difference is quite substantial – almost 30% savings.

Compressing your HTML, XML, Javascript, CSS, etc pages will mean less data transferred between the server and the …

Read the rest of this article »

Updated: June 10th, 2009

Introduction

In this article I’m going to discuss a number of useful Firefox extensions and tips. This list is not a “COMPLETE GUIDE TO FIREFOX!!!111!” but a collection of some, albeit many, extensions and techniques I find useful, with detailed descriptions and illustrations. I try to make my reviews as personal as possible and express my own points of view, so I will not be using any boring official descriptions altogether. Short, concise, and useful – that is my goal.

Right now I use 53 extensions in total. If you think that’s a lot, you might be right. However, because Firefox is so mature and new extensions come out every day, it is not as crazy of a number …

Read the rest of this article »

2

[Perl] Finding Files, The Fun And Elegant Way


Posted by Artem Russakovskii on April 8th, 2009 in Awesomeness, Linux, Perl, Programming, Tutorials

Updated: October 6th, 2009

No matter what programming language you use, there comes a time when you need to search for a file somewhere on the file system. Here, I want to talk about accomplishing this task in Perl. There are many ways of doing so, most of them boring, but I want to discuss the fun and elegant way – using File::Find::Rule.

Let me briefly discuss some of the other methods first.

Limited

Using glob() (or <>, TODO verify) you can find files in a single directory, using only the limited shell wildcard support. For example,

1
my @files = glob(&quot;tmp*&quot;);
I prefer glob() to <> because glob()'s parameters can be more than just

Read the rest of this article »

Updated: June 24th, 2020

image Introduction

Clickjacking is a malicious technique of tricking web users into revealing confidential information or taking control of their computer while clicking on seemingly innocuous web pages. A vulnerability across a variety of browsers and platforms, a clickjacking takes the form of embedded code or script that can execute without the user's knowledge, such as clicking on a button that appears to perform another function (credit: Wikipedia).

Clickjacking is hard to combat. From a technical standpoint, the attack is executed using a combination of CSS and iFrames, which are both harmless web technologies, and relies mostly on tricking users by means of social engineering. Additionally, the only server side technique against clickjacking known to me is “frame breaking

Read the rest of this article »