5

Follow-up To Loading CSS And JS Conditionally


Posted by Artem Russakovskii on January 15th, 2010 in Programming, Wordpress

First of all, I'd like to thank everyone who read and gave their 2 cents about the [Wordpress Plugin Development] How To Include CSS and JavaScript Conditionally And Only When Needed By The Posts post. The article was well received and will hopefully spark some optimizations around loading styles and scripts.

Here are some discussions and mentions around the web:

Sure, there are drawbacks to this method and it does require some more processing on the backend and it's not for everyone, which is why we should always strive for an even better solution.

I stand by my point of view that, for instance, my dedicated …

Share

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 …

Share

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 before Twitter introduced it.

It also allowed me to add a couple of words or rephrase the retweet to make it more relevant to my followers….

Share

What Is This All About?

imageIf you, like me, love StackOverflow, SuperUser, ServerFault – the community programming/software/sysadmin Q&A sites built by Joel Spolsky and Jeff Atwood and you are an active member of these sites, you owe it to yourself to install this underappreciated and unadvertised greasemonkey script: StackOverflow – User Info Aggregate. I really think it should get more attention. All credit goes to Jon Erickson.

(What? You've never heard of the sites mentioned above and you call yourself a programmer? Shame on you – go check them out immediately!)

Once you install the script, the top bar that normally shows only single site statistics, like so:

image

will turn into a multi-site bar, with all …

Share

Updated: October 6th, 2009

WTF

I don't know about you, but I'm incredibly sick of Facebook quizzes. Yeah, shit like this which occupies 90% of my news feed:

image

And to make matters worse, Facebook provides no means to block these quizzes and rid your profile of them forever. The only thing you can do is block each individual quiz. But just like weeds in your backyard, when you block one, three more rise up in its place. I know I am not alone here – there are literally billions of people searching for a solution to the plague.

So, what does the tech community do when it is not happy?

  1. Runs to mommy, crying.
  2. Drinks heavily, passes out, and comes to work with a
Share

Updated: September 16th, 2012

Recently I read an article on the Six Revisions blog that discussed 10 seemingly simple improvements to the twitter interface. They included such things as nick autocomplete, mentions, groups, and more.

You could only dream about such twitter improvements… that is until you use the Troys Twitter script. Just perform the following steps and you will have the features I describe in this article. Here we go:

  1. Install Firefox (you already have that, right?)
  2. Install the Firefox greasemonkey extension
  3. Install the Troys Twitter script

Greasemonkey is the most versatile extension available for Firefox, as it’s essentially a whole framework for scripts that can manipulate any aspect of any page. Head over to userscripts.org and take a look at the myriads

Share

Updated: June 9th, 2009

Problem

While writing a 1093985th Perl script the other day I was facing the following dilemma:

  • Let’s say there is a local library, called TheUberLib.pm. It is so uber that most of my scripts, located all over the machine, include it.
  • Now, let’s also say that there’s an even more uberly important binary called run_me_now_or_you_will_die but the only way to find it is by using a relative path to the aforementioned TheUberLib.pm, for example ../bin (RELATIVE TO TheUberLib.pm).
  • I don’t want to hardcode the path to run_me_now_or_you_will_die because it can be different on multiple machines and the code wouldn’t be robust enough – all I know is that the path is relative to an included library.

So …

Share
1

FTPRush Cleanup Script


Posted by Artem Russakovskii on October 28th, 2007 in Programming

Updated: May 23rd, 2009

Removes all ftprush queue items that don't download to localhost. It is useful to run if you FXP a lot of files back and forth and want to clean up the queues from time to time, but don't want to delete anything that is downloading. Feel free to make a shortcut to this script and run it any time you want.

Note that this script is only compatible with the ANSI FTPRush version. The Unicode version is not supported.

You need to have Activestate Perl installed in order to run this script. http://www.google.com/search?q=activestate+perl+download

Script source is available from SVN here.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

Share