Change wBounce display status with a filter

wBounce is already an excellent powerful WordPress plugin. It is used to display popups on website, but do it smart: only bother visitor once he is about to leave anyway. When he moved mouse out of active window, probably aiming to (X) close it.

Here is how I use it, quite successfully: (watch live example here)

wbounce how to use

It have brought me 500% more email subscribers than a sidebar widget. While wBounce is highly effective, it’s not as hateful as other effective marketing methods. For my own sites, I choose wBounce. Highly recommend it!

 

But sometimes you don’t want to show a popup. It can be disabled manually for each post, and after this pull request it can also be disabled (or enabled, if that's what you want) dynamically with a filter.

If it’s hidden, keep it hidden. If post has hide_metrika meta set to true, then hide wBounce as well.

Now you can dynamically hide/show wBounce on your pages with any conditions you like!

RegisterClient overview

This is an overview of RegisterClient software I wrote for SMP.

Interface is in Russian. Descriptions and snapshots are stored in XML files.

There is also RegisterServer, runs on the camera hardware itself: pretty simple program in C, using sockets. Not worth mentioning.

 

Add post meta to AnsPress with Add Meta Tags plugin

For better SEO, you want to have proper meta description , open graph tags on every page of your site. That includes AnsPress Q&A pages.

It doesn’t work out of the box, but it’s easy to implement.

  1. Install AnsPress, this tutorial is about it.
  2. Install Add Meta Tags, a great plugin that can generate almost any meta schema there is.
  3. (optional) Install Code Snippets and you won’t have to edit your functions.php. Any piece of code you can just save in wordpress backend.
  4. Set Add Meta Tag the way you like
    add meta tags anspress meta configuration
    and so on, there are many more options.
  5. Add the following snippet to your functions.php or Code Snippets:

    (details on why this snippet is required here)
  6. It works, congratulations!
    See a live example here: http://dima.stefantsov.com/qa/.

Tools

UPD: this list is outdated. For the new up-to-date version use this link (russian descriptions).


Here is a list of tools I’m using for work and fun. I hope it will be useful to you. If you think you know something even better, you are welcome to throw your links at me in the comments.

TOOLS I USE EVERY DAY

Total Commander – always opened fullscreen. Never ever using Explorer. If you want to be a power user, you must use some file manager. Total Commander is, like, the best.

Google Chrome – best web browser. Fastest. Does not need to be introduced.

  • AdBlock – Google Chrome browser extension. No more ads. You are welcome.
  • Google Mail Checker – shows me when there’s new mail.
  • Pocket – formerly Read It Later. This extension allows me to “bookmark” pages to read them later. They are automatically downloaded to my cellphone, so I can read them in offline mode.

AutoHotkey – this thing is in my Startup folder. Whenever anything need to be automated, AutoHotkey is the way to go. For example, right now it is in change of sounds volume binds, taking screenshots, auto-replacing certain clipboard strings etc.

CommandLineTimer – my own project. Whenever I need to do something later, I use this command line timer.

SlickRun – I would not be able to use my PC without it. Pressing a hotkey brings up a “command line”, which can also execute additional smart commands. For example, when I enter “l table”, it will open translation of this word to Russian; and vice versa. If I type “timer 2h”, it starts CommandLineTimer that will pop up in 2 hours. And so on. A must have tool.

Skype – a network messenger, VoIP, video calls. Even though this software itself is not very good, it is very popular, and it have really great quality sound engine in it.

AIMP – good audio player. I have been using Winamp for more than 10 years. Now that it’s no longer being developed (and I believe I had some problems with it), AIMP is great replacement. Everything works right out of the box.

Notepad2 – the best notepad. I use it for everything text-related. It also have syntax highlighting. Very lightweight, easy and powerful.

SmartGit/Hg – the best VCS client. Supports not just Git and Hg, but also Svn. It magically pulls entire SVN repository and allows you to work locally with it as it was Git. And then you can commit it back to Svn. It’s compare tool is also the best I have seen, but that’s probably a matter of taste. I strongly recommend it!

Visual Studio – I think you have already heard about this one. If you are coding .NET, this is the IDE to use.

  • ReSharper – empowers Visual Studio. Adds powerful refactorings, navigation, on-the-fly decompilation etc. A must have.
  • VSGesture – a nice addon to have. I usually use it’s multiple strikes gesture to close all opened windows.

SQL Server Management Studio – a little sister of Visual Studio. I run SQL code there.

Punto Switcher – a keylogger, a tool to convert texts typed in wrong keyboard layout. Program have it’s bad sides, but I don’t see good alternatives at the moment.

ACDSee 3.1 – I’m using same old version I was running during win95/98 times. It’s blazing fast, and does everything one can want from image viewer. Even have some basic editing/resizing built in.

Open Office – a free alternative to MS Office. It just works. I don’t care.

KeePass – a safe place to keep your strong passwords.

TrueCrypt – encrypt your PC.

WinRAR – great archiver. Have been using it for about 15 years already, it was always invaluable and perfect.

SITUATIONAL TOOLS

.NET Reflector – this one is not free, but it worth it. Shows you the source code of any .net library or application. You can also change it on the fly as well.

Ildasm – IL disassembler by Microsoft.

WebMatrix – another IDE from Microsoft. I use it to publish my CMS sites. It’s publishing capabilities are excellent.

CPU-Z – shows detailed info about your current hardware.

fping – a better ping tool.

KiTTY – a fork of PuTTY. Best telnet client. Now with transparency and other useful features.

LINQPad – quickly run some C# code, query database with LINQ or Lambda methods, look at the resulting SQL query, and much much more. Lightweight application, paid version have intellisense.

WriteMonkey – I have found this program to be the best place to write text into. I mostly use it for SEO purposes, when I have to sit down and generate fixed amount of some text.

SPI Port Forward – it’s home site is not available, but this tool still works. I’ve used it to make local Visual Studio web server available over local network.

Process Explorer – powerful task manager from sysinternals.

Process Monitor – combines two legacy utilities: FileMon and RegMon. This program will show you EVERYTHING any application is doing in your system. What files it is accessing, what registry paths are being read or modified. Just make sure you are filtering out much enough, otherwise data will overwhelm you.

SQLite Database Browser – obviously, will browse SQLite databases. I wrote about using ithere.

VLC media player – whatever I want from a video player, this player have. Using different subtitles files, different audio tracks, running separate audio track synchronized with main video file, streaming video – it does everything. It just works. Check it out.

ZoomIt – one more excellent tool from sysinternals. Easy way to zoom into any part of screen, draw on your screen etc. Useful for presenting.

Universal USB Installer – whenever I have bootable image I want to put on a flash drive, I just run this program, feed it the image, and click the “go” button. So far, it always worked.

uTorrent – BitTorrent client. It have lots of ads lately, and each update it tries to install a crapware with it, so be careful. But once before it was the best torrent client. I’m still using it.

IP-Tools – collection of network tools.

Dropbox – your hard drive in the cloud. Sync through all your devices and computers. Microsoft SkyDrive sucks. Google Drive is nothing special. Some time ago I would say Wuala is the way to go, but it just have too many problems. If only Wuala was as smooth as Dropbox…

Photoshop – world famous graphical package. Can be useful to crop images from time to time 😉

Audition – powerful audio suite from Adobe. Record multiple tracks, apply filters, etc.

Camtasia Studio – capture screen video and audio. Like Fraps, but much better. Can edit video as well.

SnagIt – a powerful tool to take screenshots. For example, it can take a long single screenshot of multi-page document.

Derive 6 – mathematical software. Solve equations, draw graphics. Now discontinued, but I still occasionally use it.

AP Tuner – this program helps me tune my guitar.

VMware Workstation – virtual machines. Run any OS right inside your Windows. Useful for doing dangerous things, or for testing different operating systems.

WEB SERVICES

Gmail – ever since I first tried gmail, I’ve never looked back at TheBat and others. Gmail is simply The Best. It have beaten spam. UI is responsive, clean, easy to use. If you are still using other public email, like yahoo or hotmail, you should seriously give gmail a try. You will love it.

Workflowy – best (web) tool to make lists. I use it for my improvised GTD system. It suffer from lack of proper/any Android offline client, but otherwise it’s perfect.

Twitch.tv – live streams. Most of streams are PC games.

Cloudflare – great CDN. Plug your site into Cloudflare and it will automatically benefit from a dozen of improvements.

AddThis – best +1, Like, Share, etc. buttons provider. Not only it provide statistics, but it knows which social networks each of your visitors uses and can offer him to “like” your page with user’s favorite service. Offers lots of other features.

Feedburner – helps your visitors to subscribe to your RSS feed. Looks like it’s not developed anymore and may be discontinued any time, but it’s best free service out there I was able to find.

Google Analytics – let you know more about your visitors. Real-time analytics is nice.

Yandex.Metrika – I’m using russian version, and I like it more than Google Analytics. It’s free. This is my primary audience monitoring tool.

Google AdWords – advertise yourself on Google.

Yandex.Direct – Yandex have good advertising platform as well.

Pingdom – popular network availability monitoring tool and more. Have free plan.

Pingdom Pagetest – analyze a webpage by url.
WebPagetest – I like this one the most.
GTmetrix – but I always use all three of them. Get tips on how to improve your web page. Compare your page to popular websites.

ASafaWeb – scan your website, get tips on how to improve it and make it more secure.

Woorank – can give you some tips on improving your website.

User Agent String.Com – elaborates/explaines user agent string.

Yandex.Spellcheck – spell check a webpage.

json2csharp – paste in json text, get C# classes generated.

<machineKey> Generator – can generate you a machine key fro your web.config.

SimilarWeb – you will be surprised how much this service knows about your site. Or about a site of your competitor 😉

Disqus – best commenting solution out there. You can see it in action at the bottom of this page.

LIBRARIES

highlight.js – excellent source code highlighting engine, I’m using it on this site.
TinyMCE hljs – highlight.js implementation for TinyMCE. Using it on this site.

RequestReduce – put .dll in /bin/ folder of your asp.net website, add a line to web.config; your .css and .js files are automatically minified and bundled.

Entity Framework – MS ORM for .NET.

NLog – powerful, easy, up-to-date logging framework for .NET.

Json.NET – JSON framework for .NET.

DotNetOpenAuth – I had a few problems with it, but it still sounds like best OpenID/OAuth library for .net at the moment.

SignalR – allows you to not just call your server C# methods from JS, but to call client JS in real time from server C# code. A library for realtime communication between client and server.

Fixing ERR_CONTENT_DECODING_FAILED in Apache+PHP

Sometimes 3rd party PHP code just refuses to launch. Actually, it happens quite often. If you have just copied it and it worked – it’s a good sign. This time it wasn’t the case.

After going through all the initial steps, it looked like it should work, but instead of usual runtime errors this PHP application, running on Apache 2.4.9 & PHP 5.5.12, started showing this:

ERR_CONTENT_DECODING_FAILED

ERR_CONTENT_DECODING_FAILED
Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

Google Chrome’s Developer tools –> Network looked empty for quite some time, but after a really long wait here is what I’ve got:

google developer tools apache php 330 timeout compress gzip

Quick googling explains that this error is shown when HTTP response headers claim that the content is gzip encoded, but it isn’t. Other sources say that this may happen when plain-text content is added before/after encoded content. So proposed solution is to disable content compression.

There are different examples, it mostly involve writing something like

or

to your .htaccess file. I was still getting same error, it made no difference for me.

What helped

Adding zlib.output_compression = On to php.ini helped me. Issue was solved.

Likely source of issue

I am not certain where and how compression was forced to be enabled (this is a big black box legacy PHP sources), but I have noticed it only throws this ERR_CONTENT_DECODING_FAILED exception when there are debug errors on the page.

Literally, setting display_errors = Off in php.ini fixes the issue as well. In my case it was some E_STRICT messages, so setting error_reporting = E_ALL & ~E_STRICT there to disable displaying E_STRICT errors works too.

Now when this behavior doesn’t look like some random magic, I feel like I’m in control again, therefore I may sleep well. It works.