How To Dynamically Increase Memory Limits When Interfacing With WordPress Using XML-RPC (Windows Live Writer, Etc)
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 …
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
The Problem
However, one thing about Eclipse Android development has bothered me for a while …
How To Make Your Site Lightning Fast* By Compressing (deflate/gzip) Your HTML, Javascript, CSS, XML, etc In Apache
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):
And here it is after compression:
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 …
Updated: July 8th, 2009
Today I was asked a question about defining custom extensions for vim syntax highlighting such that, for example, vim would know that example.lmx is actually of type xml and apply xml syntax highlighting to it. I know vim already automatically does it not just based on extension but by looking for certain strings inside the text, like <?xml but what if my file doesn't have such strings?
After digging around I found the solution. Add the following to ~/.vimrc (the vim configuration file):
1 2 3 |
syntax on filetype on au BufNewFile,BufRead *.lmx set filetype=xml |
After applying it, my .lmx file is highlighted:
Same principle works, for instance, for mysql dumps …