<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>kovshenin.com</title>
	
	<link>http://kovshenin.com</link>
	<description>Thinking about WordPress, PHP, MySQL, jQuery, Web 2.0, PR and Social Media</description>
	<lastBuildDate>Thu, 24 Dec 2009 14:49:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=3.0-alpha</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/kovshenin_com" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Amazon Web Services: Moving to a New Region</title>
		<link>http://kovshenin.com/archives/amazon-web-services-moving-to-a-new-region/</link>
		<comments>http://kovshenin.com/archives/amazon-web-services-moving-to-a-new-region/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:49:11 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[cloud tips]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1914</guid>
		<description><![CDATA[I wrote about Optimizing Your Amazon Web Services Costs back in November, where I mentioned some of the upsides of Reserved Instances at Amazon, but haven&#8217;t mentioned any downsides, and here we are. Two weeks later Amazon announced the Northern California Region opening. I thought it wouldn&#8217;t differ from the Virginia data center, but still [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/' rel='bookmark' title='Permanent Link: Optimizing Your Amazon Web Services Costs'>Optimizing Your Amazon Web Services Costs</a></li>
<li><a href='http://kovshenin.com/archives/amazon-web-services/' rel='bookmark' title='Permanent Link: Have You Tried the Amazon Web Services?'>Have You Tried the Amazon Web Services?</a></li>
<li><a href='http://kovshenin.com/archives/amazon-ec2-tips-tricks/' rel='bookmark' title='Permanent Link: Working With Amazon EC2: Tips &#038; Tricks'>Working With Amazon EC2: Tips &#038; Tricks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I wrote about <a href="http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/">Optimizing Your Amazon Web Services Costs</a> back in November, where I mentioned some of the upsides of Reserved Instances at Amazon, but haven&#8217;t mentioned any downsides, and here we are. Two weeks later Amazon announced the <a href="http://aws.amazon.com/about-aws/whats-new/2009/12/03/aws-launches-the-northern-california-region/">Northern California Region</a> opening. I thought it wouldn&#8217;t differ from the Virginia data center, but still decided to give it a shot for a few hours.</p>
<div class="kimage"><h2>Happy Holidays from Amazon Web Services</h2><img src="http://s.kovshenin.com/core/wp-content/uploads/2009/08/aws.png" alt="Happy Holidays from Amazon Web Services" /></div><div class="clearfloat"></div>
<p>I didn&#8217;t do much benchmarking but hey, I&#8217;m running a Twitter app.. <a href="http://foller.me">Foller.me</a>, remember? This means that access times to the Twitter API are crucial, so I started off with some basic pinging, and the pings from California seemed to be a few times faster than the ones from Virginia. Next, I ran Xdebug and analyzed the cache grind sheets for a few requests to different profile pages. Sweet to know that 95% of the time taken to load a page is curl accessing the Twitter API ;) this means that my code is well optimized. The overall results in the California region was ~40% better than Virginia, so I thought of moving there. The problem was that I already had a 1 year contract with Amazon for an instance in the Virginia region.</p>
<p>I wrote to Amazon via their contact form and asked about reservation transfers from one region to another, of course with additional charges (the California region is slightly more expensive) and soon got a negative reply. They mentioned that reserved instances are not transferrable from one region to another but I can always cancel my reservation in one region and open up a new one in the other. They didn&#8217;t mention any refunds so I decided to ask, but soon, scrolling through their FAQ I found this:</p>
<blockquote><p>
Q: Can I move a Reserved Instance from one Region or Availability Zone to another?<br />
A: No. Each Reserved Instance is associated with a specific Region and Availability Zone, which is fixed for the lifetime of the Reserved Instance and cannot be changed.</p>
<p>Q: Can I cancel a Reserved Instance?<br />
A: The one-time payment for a Reserved Instances <strong>is not refundable</strong>. However, you can choose not to run or entirely stop using your Reserved Instance at any time, at which point you will not incur any further usage charges.
</p></blockquote>
<p>So I asked myself, why the heck would anybody want to cancel a reserved instance if they don&#8217;t get refunded? The conversation kept going on Twitter. Friends mentioned that I could purchase an additional reserved instance in the California region and then sell computing time on the one I have in Virginia, but that sounded too sarcastic. I felt unlucky and sad, and thought I thought should stick to the instance I had in Virginia. If only I had waited a few more weeks before making the purchase&#8230;</p>
<p>This morning I received another email from Amazon, stating that although they don&#8217;t usually do this sort of stuff, they got approval to process the cancellation with a refund just this one time, so now I&#8217;m free to reserve an instance in Northern California, happy holidays! Well, on Christmas Eve, this feels like a gift and I&#8217;m very excited about launching all my stuff in the new region, hopefully in January. So, thank you Amazon and Happy Holidays to all of you.</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/' rel='bookmark' title='Permanent Link: Optimizing Your Amazon Web Services Costs'>Optimizing Your Amazon Web Services Costs</a></li>
<li><a href='http://kovshenin.com/archives/amazon-web-services/' rel='bookmark' title='Permanent Link: Have You Tried the Amazon Web Services?'>Have You Tried the Amazon Web Services?</a></li>
<li><a href='http://kovshenin.com/archives/amazon-ec2-tips-tricks/' rel='bookmark' title='Permanent Link: Working With Amazon EC2: Tips &#038; Tricks'>Working With Amazon EC2: Tips &#038; Tricks</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/amazon-web-services-moving-to-a-new-region/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress 2.9: From a Developer’s Point of View</title>
		<link>http://kovshenin.com/archives/wordpress-2-9-from-a-developers-point-of-view/</link>
		<comments>http://kovshenin.com/archives/wordpress-2-9-from-a-developers-point-of-view/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 10:11:43 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[metabox]]></category>
		<category><![CDATA[plugins]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1715</guid>
		<description><![CDATA[Yup, WordPress 2.9 is finally out and I&#8217;ve seen a lot of people upgrade immediately &#8211; sweet thing to do, I did so too and hadn&#8217;t had any problems here (I&#8217;m not using too much plugins), then I switched over to the 3.0 branch, all good! The semi-square buttons in the admin interface are fixed [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/google-developer-day-2009-moscow-conclusion/' rel='bookmark' title='Permanent Link: Google Developer Day 2009 Moscow &#8211; Conclusion'>Google Developer Day 2009 Moscow &#8211; Conclusion</a></li>
<li><a href='http://kovshenin.com/archives/google-developer-day-moscow-2009/' rel='bookmark' title='Permanent Link: Google Developer Day Moscow 2009'>Google Developer Day Moscow 2009</a></li>
<li><a href='http://kovshenin.com/archives/video-google-developer-day-2009-moscow/' rel='bookmark' title='Permanent Link: Video: Google Developer Day 2009 Moscow'>Video: Google Developer Day 2009 Moscow</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Yup, <a href="http://codex.wordpress.org/Version_2.9">WordPress 2.9</a> is finally out and I&#8217;ve seen a lot of people upgrade immediately &#8211; sweet thing to do, I did so too and hadn&#8217;t had any problems here (I&#8217;m not using too much plugins), then I switched over to the 3.0 branch, all good! The semi-square buttons in the admin interface are fixed by the way ;) Anyways, this post is not about my blog, but about something I&#8217;m working on locally in the intranet of a company. And here&#8217;s a quick reminder: do not upgrade the running instance before you checked everything on a duplicate testing one, especially if a bunch of plugins there are handwritten ;)</p>
<div class="kimage"><h2>Upgrade to WordPress 2.9: Plugins Gone Bad</h2><img src="http://s.kovshenin.com/core/wp-content/uploads/2009/12/wordpress.png" alt="Upgrade to WordPress 2.9: Plugins Gone Bad" /></div><div class="clearfloat"></div>
<blockquote><p>
A <strong>Handwritten</strong> WordPress Plugin is a huge set of files, with hundreds of duplicate lines of code and tonnes of commented code. The MVC/MVP models are usually transformed into the AIO (All-In-One) model. The only version control systems used are the &#8220;Copy &#038; Paste&#8221; and &#8220;Undo &#038; Redo&#8221;. The Core Upgrade process does not involve reading the changelog, backing up, etc.
</p></blockquote>
<p>Okay this is not a very smart thing to do, but sometimes you just need to, especially when you&#8217;re in a hurry (duh!). I&#8217;m not going to go in detail about the plugins, because you wouldn&#8217;t understand it anyway (no offence, I don&#8217;t understand most of it either), but let&#8217;s just say that I was using the Post Tags interface that you see in your &#8220;Edit Posts&#8221; admin interface. The sweet little box where you can type some tags or choose from the most used ones. All I did was copy the HTML contents of that little box onto my page, and it used to work (in 2.7 and 2.8), but as soon as I upgraded to 2.9, bang! It suddenly stopped. The javascript bindings were gone!</p>
<p>I figured out that the bindings were all made in the post.js so I took a look at the diff between 2.8 and 2.9 &#8211; completely different. The major change was the jQuery selector from span#ajaxtag to div.ajaxtag (line 99 in post.dev.js) which prevented all the other bindings. A few more ids have changed to include the tax name, and some other minor changes which I didn&#8217;t figure out yet. Although what&#8217;s the point in figuring it out? Wait until 3.0 is released and rewrite the plugin again, meh!</p>
<p>I did a lot of thinking here. This was not the only interface that broke, and rewriting everything on every core upgrade would be pretty difficult. People talk a lot about WordPress upgrades, plugins compatibility, etc. But most of the time they refer to plugins developed by other people, which sooner or later will get an upgrade. So waiting for a few weeks before launching the core upgrade generally does the job. But what if it&#8217;s a completely different page with a completely customized admin interface?</p>
<p>I worked a lot with <a href="http://codex.wordpress.org/Function_Reference/add_meta_box">WordPress metaboxes</a> a few weeks before the upgrade and today I figured out that the best and easiest way of building WordPress admin interfaces would be, that&#8217;s right, metaboxing. The standard components used in the edit posts/pages interface (tags, publishing, categories, custom fields, etc) are simple metaboxes. So why copy HTML if you could simply use the predefined ones? And when a change is on its way, you&#8217;d sleep tight. Unless of course you&#8217;re interacting with the standard components from your customized ones, which involves using certain selectors for ids and classes. In that case you&#8217;ll just have to read the changelog, tickets (over 500 for WordPress 2.9) and of course code diffs.</p>
<p>Creating your own custom metaboxes is not as difficult as it is at first sight (yet I still haven&#8217;t figured out how to save their positions via AJAX, but I will). You will get the hang of it after your third or fourth metabox ;)</p>
<p>P.S. Have you noticed the new post thumbnails here? They used to be wide images, now they&#8217;re h2 text and small thumbnail. I love WordPress shortcodes ;)</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/google-developer-day-2009-moscow-conclusion/' rel='bookmark' title='Permanent Link: Google Developer Day 2009 Moscow &#8211; Conclusion'>Google Developer Day 2009 Moscow &#8211; Conclusion</a></li>
<li><a href='http://kovshenin.com/archives/google-developer-day-moscow-2009/' rel='bookmark' title='Permanent Link: Google Developer Day Moscow 2009'>Google Developer Day Moscow 2009</a></li>
<li><a href='http://kovshenin.com/archives/video-google-developer-day-2009-moscow/' rel='bookmark' title='Permanent Link: Video: Google Developer Day 2009 Moscow'>Video: Google Developer Day 2009 Moscow</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/wordpress-2-9-from-a-developers-point-of-view/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Twitter API v2 Transition</title>
		<link>http://kovshenin.com/archives/the-twitter-api-v2-transition/</link>
		<comments>http://kovshenin.com/archives/the-twitter-api-v2-transition/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 13:38:26 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[twitter]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitterapi]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1700</guid>
		<description><![CDATA[It&#8217;s a mess around the current working copy of the Twitter API, there are more issues than functionality and the whole naming and renaming is a total disaster. Today for instance I tried a simple search query to the API and kept receiving &#8220;400 Bad Request&#8221; errors without any further explenation. As soon as I [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/twitter-api-basic-auth-to-oauth/' rel='bookmark' title='Permanent Link: Twitter API: Moving From Basic Auth to OAuth'>Twitter API: Moving From Basic Auth to OAuth</a></li>
<li><a href='http://kovshenin.com/archives/twitter-oauth-api-important/' rel='bookmark' title='Permanent Link: The Importance of Using Twitter API via OAuth'>The Importance of Using Twitter API via OAuth</a></li>
<li><a href='http://kovshenin.com/archives/create-your-own-automated-twitter-robot-in-php/' rel='bookmark' title='Permanent Link: Create Your Own Automated Twitter Robot in PHP'>Create Your Own Automated Twitter Robot in PHP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s a mess around the current working copy of the Twitter API, there are more issues than functionality and the whole naming and renaming is a total disaster. Today for instance I tried a simple search query to the API and kept receiving &#8220;400 Bad Request&#8221; errors without any further explenation. As soon as I changed the address from search.twitter.com to api.twitter.com/1 (I got this from Abraham Williams&#8217; php code), which is not clearly mentioned anywhere in the <a href="http://apiwiki.twitter.com/">Twitter docs</a>, everything started working fine.</p>
<div class="kimage"><h2>Twitter API: Solving Compatibility Issues</h2><img src="http://s.kovshenin.com/core/wp-content/uploads/2009/09/twitter.png" alt="Twitter API: Solving Compatibility Issues" /></div><div class="clearfloat"></div>
<p>But then I realised that the from_user_id field that&#8217;s being returned is far from the correct user ID. People in the <a href="http://groups.google.com/group/twitter-development-talk?pli=1">Twitter Development Talk</a> Google group stated this problem a few times (since March 2009 I believe). It seems that the &#8220;wrong&#8221; user IDs are meant for the second version of the Twitter API, thus cannot be used before it&#8217;s released. But wait! What the hack should I do with my app now? It&#8217;s not working y&#8217;know! Here you go:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$oauth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'search'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'q'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$search_query</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">results</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$result</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$text</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">text</span><span style="color: #339933;">;</span> 
	<span style="color: #000088;">$user_name</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$result</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">from_user</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000088;">$user</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$oauth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;users/show&quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;screen_name&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$user_name</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$user_id</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">id</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;font-style:normal;">// Get the old-style user ID</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>Yeah, that&#8217;s one extra API call, but it solves things temporarily ;)</p>
<p>I guess there&#8217;s nothing that we could really do right now, and it&#8217;s probably true that we&#8217;ll have to rewrite some parts of our code as soon as <a href="http://apiwiki.twitter.com/V2-Roadmap">Twitter API v2</a> is released, but then again, what about the apps which stopped development? Will they stop working? Tonnes of Twitter clients and web apps still use basic authentication. Twitter mentioned that everybody must use OAuth these days, and that basic auth will be closed sooner or later.</p>
<p>Oh well, software comes, software goes. The best thing to do right now would be sign up to <a href="http://groups.google.com/group/twitter-api-announce">Twitter API Announce</a> Google group and follow <a href="http://twitter.com/twitterapi">@twitterapi</a>. By the way, <a href="http://twitter.com/web2feed">@web2feed</a> can now use the new features of the API to retweet messages based on hashtags and build user lists ;)</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/twitter-api-basic-auth-to-oauth/' rel='bookmark' title='Permanent Link: Twitter API: Moving From Basic Auth to OAuth'>Twitter API: Moving From Basic Auth to OAuth</a></li>
<li><a href='http://kovshenin.com/archives/twitter-oauth-api-important/' rel='bookmark' title='Permanent Link: The Importance of Using Twitter API via OAuth'>The Importance of Using Twitter API via OAuth</a></li>
<li><a href='http://kovshenin.com/archives/create-your-own-automated-twitter-robot-in-php/' rel='bookmark' title='Permanent Link: Create Your Own Automated Twitter Robot in PHP'>Create Your Own Automated Twitter Robot in PHP</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/the-twitter-api-v2-transition/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cloud Tips: Amazon EC2 &amp; Rejected Email</title>
		<link>http://kovshenin.com/archives/cloud-tips-amazon-ec2-rejected-email/</link>
		<comments>http://kovshenin.com/archives/cloud-tips-amazon-ec2-rejected-email/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 11:43:06 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[cloud tips]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1695</guid>
		<description><![CDATA[A few weeks ago I&#8217;ve setup my email in the /etc/aliases for user root (and the others) and started to actually read my root email from time to time (I wonder why I never did that before). Anyways, what bugged me straight away is that I had some rejected emails that were not being delivered, [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/cloud-tips-amazon-ec2-email-s3-cname-issues/' rel='bookmark' title='Permanent Link: Cloud Tips: Amazon EC2 Email &#038; S3 CNAME Issues'>Cloud Tips: Amazon EC2 Email &#038; S3 CNAME Issues</a></li>
<li><a href='http://kovshenin.com/archives/cloud-tips-rediscovering-amazon-cloudfront/' rel='bookmark' title='Permanent Link: Cloud Tips: Rediscovering Amazon CloudFront'>Cloud Tips: Rediscovering Amazon CloudFront</a></li>
<li><a href='http://kovshenin.com/archives/backing-up-mysql-on-amazon-ec2-to-s3/' rel='bookmark' title='Permanent Link: Cloud Tips: Backing Up MySQL on Amazon EC2 to S3'>Cloud Tips: Backing Up MySQL on Amazon EC2 to S3</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A few weeks ago I&#8217;ve setup my email in the /etc/aliases for user root (and the others) and started to actually read my root email from time to time (I wonder why I never did that before). Anyways, what bugged me straight away is that I had some rejected emails that were not being delivered, yielding the following errors (I removed some numbers):</p>
<div class="kimage"><h2>Cloud Computing with Amazon Web Services</h2><img src="http://kovshenin.com/core/wp-content/uploads/2009/08/aws.png" alt="Cloud Computing with Amazon Web Services" /></div><div class="clearfloat"></div>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Deferred: <span style="color: #000000;">450</span> 4.7.1 <span style="color: #000000; font-weight: bold;">&lt;</span>domU.compute-1.internal<span style="color: #000000; font-weight: bold;">&gt;</span>: Helo <span style="color: #7a0874; font-weight: bold;">command</span> rejected: Host not found
<span style="color: #000000;">421</span> invalid sender domain <span style="color: #ff0000;">'domU.compute-1.internal'</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>misconfigured dns?<span style="color: #7a0874; font-weight: bold;">&#41;</span></pre></div></div>

<p>And some others that looked alike. Tonnes of them, every four hours! The emails to other addresses were delivered fine though. I had WordPress notification messages delivered to my email, never lost a message. I also tried sending out a few using the mail command via SSH, everything okay. For a second I thought that maybe those addresses were simply invalid, but wouldn&#8217;t the server reply with an &#8220;Invalid recepient&#8221; error? Probably.. Here&#8217;s what I got from the Amazon Web Services support forums:</p>
<blockquote><p>
It seems that some remote mail servers complain about your server identifying itself in the SMTP dialogue as domU.compute-1.internal, while its external name is ec2.compute-1.amazonaws.com
</p></blockquote>
<p>Makes total sense. Perhaps some servers do try to see where the e-mail is coming from and of course the .internal domain is unresolvable (thus the &#8220;dns&#8221; misconfiguration error). I had to identify myself with an external, resolvable name. So I copied the external name into the /etc/mailname file and hmm.. Well, it&#8217;s been a week now and I haven&#8217;t received anymore delivery errors, so that must have worked.</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/cloud-tips-amazon-ec2-email-s3-cname-issues/' rel='bookmark' title='Permanent Link: Cloud Tips: Amazon EC2 Email &#038; S3 CNAME Issues'>Cloud Tips: Amazon EC2 Email &#038; S3 CNAME Issues</a></li>
<li><a href='http://kovshenin.com/archives/cloud-tips-rediscovering-amazon-cloudfront/' rel='bookmark' title='Permanent Link: Cloud Tips: Rediscovering Amazon CloudFront'>Cloud Tips: Rediscovering Amazon CloudFront</a></li>
<li><a href='http://kovshenin.com/archives/backing-up-mysql-on-amazon-ec2-to-s3/' rel='bookmark' title='Permanent Link: Cloud Tips: Backing Up MySQL on Amazon EC2 to S3'>Cloud Tips: Backing Up MySQL on Amazon EC2 to S3</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/cloud-tips-amazon-ec2-rejected-email/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>The Twitter OAuth PHP Class Gets Even Better</title>
		<link>http://kovshenin.com/archives/the-twitter-oauth-php-class-gets-even-better/</link>
		<comments>http://kovshenin.com/archives/the-twitter-oauth-php-class-gets-even-better/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 11:55:54 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[robotics]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitterapi]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1688</guid>
		<description><![CDATA[Or perhaps simpler?.. Together with the Twitter API itself, the TwitterOAuth PHP class (the one by Abraham Williams) is being updated too! According to GitHub the latest changeset was commited on December 3rd so yeah, I tried to take a look at what&#8217;s going on there a few days ago and was quite disapointed. Disappointed [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/twitter-api-pin-based-oauth-php/' rel='bookmark' title='Permanent Link: Twitter API: PIN-based OAuth Using PHP'>Twitter API: PIN-based OAuth Using PHP</a></li>
<li><a href='http://kovshenin.com/archives/twitter-api-basic-auth-to-oauth/' rel='bookmark' title='Permanent Link: Twitter API: Moving From Basic Auth to OAuth'>Twitter API: Moving From Basic Auth to OAuth</a></li>
<li><a href='http://kovshenin.com/archives/twitter-oauth-api-important/' rel='bookmark' title='Permanent Link: The Importance of Using Twitter API via OAuth'>The Importance of Using Twitter API via OAuth</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Or perhaps simpler?.. Together with the Twitter API itself, the <a href="http://github.com/abraham/twitteroauth">TwitterOAuth PHP class</a> (the one by Abraham Williams) is being updated too! According to GitHub the latest changeset was commited on December 3rd so yeah, I tried to take a look at what&#8217;s going on there a few days ago and was quite disapointed. Disappointed with the fact that all my previous code was broken without giving any reason.</p>
<p>Just like everybody else, I never read the readme or other documentation files so I dug straight into the class code and examples. Soon after I realized that the new changes were not that bad, so instead of the usual 5 lines of code, I shortened it up to only one. I stopped worrying about parsing XML or JSON, converting them to objects, and I stopped typing in the full address for Twitter API calls. Abraham did all that for us, so all we have left is:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$credentials</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$oauth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;account/verify_credentials&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$oauth</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">http_code</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">200</span><span style="color: #009900;">&#41;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hey there, <span style="color: #006699; font-weight: bold;">{$credentials-&gt;screen_name}</span>!&quot;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>I&#8217;m not going to publish all the new features and stuff (read about them at GitHub), but hey, this is quite sweet isn&#8217;t it? The only drawback was having to rewrite some parts of the code I wrote for the past few months (the Twitter Robots stuff), but I guess that&#8217;s partly my bad as it&#8217;s not as organized as it should be. That&#8217;s the main reason why I&#8217;m not publishing the whole code here yet, have a lot of cleaning up to do ;) </p>
<p>Meanwhile you may take a look at this buddy: <a href="http://twitter.com/web2feed">@web2feed</a>. I turned off the auto-replies because they were getting quite annoying, and I&#8217;ve added a couple of feeds to the big list, oh and it&#8217;s DM controlled too!</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/twitter-api-pin-based-oauth-php/' rel='bookmark' title='Permanent Link: Twitter API: PIN-based OAuth Using PHP'>Twitter API: PIN-based OAuth Using PHP</a></li>
<li><a href='http://kovshenin.com/archives/twitter-api-basic-auth-to-oauth/' rel='bookmark' title='Permanent Link: Twitter API: Moving From Basic Auth to OAuth'>Twitter API: Moving From Basic Auth to OAuth</a></li>
<li><a href='http://kovshenin.com/archives/twitter-oauth-api-important/' rel='bookmark' title='Permanent Link: The Importance of Using Twitter API via OAuth'>The Importance of Using Twitter API via OAuth</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/the-twitter-oauth-php-class-gets-even-better/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Inspired: Javascript &amp; jQuery Love</title>
		<link>http://kovshenin.com/archives/inspired-javascript-jquery-love/</link>
		<comments>http://kovshenin.com/archives/inspired-javascript-jquery-love/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 11:07:55 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[inspired]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[links]]></category>
		<category><![CDATA[resources]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1675</guid>
		<description><![CDATA[Remember the &#8220;inspired&#8221; blog posts series I started back in November? Well, let&#8217;s keep playing that game and today&#8217;s topic is jQuery and Javascript. The things you can do with javascript today are pretty impressive and sometimes unbelievable. Starting from simple AJAX calls and ending up with complete rich user interfaces with sweet animation (poke [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/jquery-in-wordpress-wp_enqueue_script/' rel='bookmark' title='Permanent Link: jQuery in WordPress: wp_enqueue_script'>jQuery in WordPress: wp_enqueue_script</a></li>
<li><a href='http://kovshenin.com/archives/extending-the-jquery-lightbox-plugin-custom-link/' rel='bookmark' title='Permanent Link: Extending the jQuery Lightbox Plugin: Custom Link'>Extending the jQuery Lightbox Plugin: Custom Link</a></li>
<li><a href='http://kovshenin.com/archives/javascript-wordpress-functions/' rel='bookmark' title='Permanent Link: Javascript in WordPress: 2 Functions 2 Save Your Day'>Javascript in WordPress: 2 Functions 2 Save Your Day</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Remember the &#8220;inspired&#8221; blog posts series I started back in November? Well, let&#8217;s keep playing that game and today&#8217;s topic is jQuery and Javascript. The things you can do with javascript today are pretty impressive and sometimes unbelievable. Starting from simple AJAX calls and ending up with complete rich user interfaces with sweet animation (poke Facebook for instance).</p>
<div class="kimage"><h2>Who Needs Flash When You Have Javascript?</h2><img src="http://s.kovshenin.com/core/wp-content/uploads/2009/12/jquery.png" alt="Who Needs Flash When You Have Javascript?" /></div><div class="clearfloat"></div>
<p>You know I browse the web a lot &#8211; StumbleUpon, Digg, Twitter, etc. I go through tonnes of content, so today I made a short list of a few interesting jQuery and Javascript links that made my day! For rookies and for pros, check them out (ordered randomly):</p>
<ul>
<li><a href="http://www.jquery.wisdomplug.com/jquery-plugins/facebook-jquery-plugins/23-best-jquery-facebook-style-plugins/">23 Best jQuery Facebook Style Plugins</a></li>
<li><a href="http://www.ibm.com/developerworks/web/library/x-feedjquery/index.html">Process XML in the browser using jQuery</a></li>
<li><a href="http://davidwalsh.name/jquery-flot">Dynamically Create Charts Using jQuery Flot and Google Analytics</a></li>
<li><a href="http://www.w3avenue.com/2009/12/01/jquery-sticky-tooltip-script/">jQuery Sticky Tooltip Script</a></li>
<li><a href="http://tutsvalley.com/tutorials/making-a-cool-spotlight-effect-with-jquery/">Making a Cool Spotlight Effect with jQuery</a></li>
<li><a href="http://www.cssnewbie.com/how-to-create-simple-stylish-and-swappable-image-captions/">How To Create Simple, Stylish and Swappable Image Captions</a></li>
<li><a href="http://www.jtutorials.co.cc/featured/creating-a-simple-tagging-system-part-1/">Creating a Simple Photo Tagging System</a></li>
<li><a href="http://tympanus.net/codrops/2009/11/30/beautiful-slide-out-navigation-a-css-and-jquery-tutorial/">Beautiful Slide Out Navigation: A CSS and jQuery Tutorial</a></li>
<li><a href="http://www.bloggingdeveloper.com/post/iPhone-Scrolling-Experience-in-Your-Browser-with-jQuery-Plugin.aspx">iPhone Scrolling Experience in Your Browser with jQuery Plugin</a></li>
</ul>
<p>Now you tell me &#8211; who needs Flash when you have Javascript? ;) Oh and by the way, if you&#8217;ve anything to add to the list (preferably articles published in late 2009) feel free to suggest via comments. If you&#8217;re looking for even more jQuery love, follow the real-time search results for the <a href="http://twitter.com/search?q=%23jquery">#jQuery tag on Twitter</a>. Cheers!</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/jquery-in-wordpress-wp_enqueue_script/' rel='bookmark' title='Permanent Link: jQuery in WordPress: wp_enqueue_script'>jQuery in WordPress: wp_enqueue_script</a></li>
<li><a href='http://kovshenin.com/archives/extending-the-jquery-lightbox-plugin-custom-link/' rel='bookmark' title='Permanent Link: Extending the jQuery Lightbox Plugin: Custom Link'>Extending the jQuery Lightbox Plugin: Custom Link</a></li>
<li><a href='http://kovshenin.com/archives/javascript-wordpress-functions/' rel='bookmark' title='Permanent Link: Javascript in WordPress: 2 Functions 2 Save Your Day'>Javascript in WordPress: 2 Functions 2 Save Your Day</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/inspired-javascript-jquery-love/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>W3 Total Cache with Amazon S3 and CloudFront</title>
		<link>http://kovshenin.com/archives/w3-total-cache-with-amazon-s3-and-cloudfront/</link>
		<comments>http://kovshenin.com/archives/w3-total-cache-with-amazon-s3-and-cloudfront/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 10:54:48 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[google]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[cloudfront]]></category>
		<category><![CDATA[page speed]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1669</guid>
		<description><![CDATA[A few days ago Frederick Townes, author of the W3 Total Cache for WordPress has released an update to this wonderful plugin, and yes, it now fully supports Amazon S3 and CloudFront as the Content Delivery Network! This is a major one for me as I manually upload most of the static assets to my [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/cloud-tips-rediscovering-amazon-cloudfront/' rel='bookmark' title='Permanent Link: Cloud Tips: Rediscovering Amazon CloudFront'>Cloud Tips: Rediscovering Amazon CloudFront</a></li>
<li><a href='http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/' rel='bookmark' title='Permanent Link: Optimizing Your Amazon Web Services Costs'>Optimizing Your Amazon Web Services Costs</a></li>
<li><a href='http://kovshenin.com/archives/every-millisecond-counts-page-speed-for-firebug/' rel='bookmark' title='Permanent Link: Every Millisecond Counts: Page Speed for Firebug'>Every Millisecond Counts: Page Speed for Firebug</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A few days ago <a href="http://twitter.com/w3edge">Frederick Townes</a>, author of the <a href="http://wordpress.org/extend/plugins/w3-total-cache/">W3 Total Cache</a> for WordPress has released an update to this wonderful plugin, and yes, it now fully supports Amazon S3 and CloudFront as the Content Delivery Network! This is a major one for me as I manually upload most of the static assets to my CloudFront account which may take quite a lot of time. The W3 Total Cache plugin does that for you in seconds! Post attachments, images, javascript, css.. All those could go to CloudFront in just 4 clicks. Frederick also mentioned that the upcoming update will also be surprising, which keeps me wondering.</p>
<div class="kimage"><h2>WordPress: Now with Amazon S3 &#038; CloudFront!</h2><img src="http://kovshenin.com/core/wp-content/uploads/2009/12/wordpress.png" alt="WordPress: Now with Amazon S3 &#038; CloudFront!" /></div><div class="clearfloat"></div>
<p>I also tried out the other options for page and database caching. A few tests showed up that memcache is faster than APC, so that&#8217;s where I stopped at database caching. Page caching was switched to enhanced, which I believe is a new option. The site performance graph at <a href="http://www.google.com/webmasters/tools/">Google Webmaster Tools</a> shows pretty good performance for Novermber and December (very close to 1.5 seconds) although the overall average is still up at 3.5 seconds, which in terms of Google is slower than 59% of sites. This is probably caused by the force majeures in September and October. Page load time peaked at over 7 seconds there.</p>
<p>One more funny fact about Google&#8217;s Site performance and <a href="http://code.google.com/speed/page-speed/">Page Speed</a> tools is the &#8220;Minimize DNS lookups&#8221; section, which most of the time shows up a single entry:</p>
<blockquote><p>
The domains of the following URLs only serve one resource each. If possible, avoid the extra DNS lookups by serving these resources from existing domains: http://www.google-analytics.com/ga.js
</p></blockquote>
<p>Interesting. Perhaps I should copy that javascript file and serve it from my CDN, I wonder if that will work. Oh and then I&#8217;ll be missing all the nifty updates to Google Analytics, like the most recent one called <a href="http://code.google.com/apis/analytics/docs/tracking/asyncTracking.html">Asynchronous Tracking</a> &#8211; very neat by the way!</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/cloud-tips-rediscovering-amazon-cloudfront/' rel='bookmark' title='Permanent Link: Cloud Tips: Rediscovering Amazon CloudFront'>Cloud Tips: Rediscovering Amazon CloudFront</a></li>
<li><a href='http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/' rel='bookmark' title='Permanent Link: Optimizing Your Amazon Web Services Costs'>Optimizing Your Amazon Web Services Costs</a></li>
<li><a href='http://kovshenin.com/archives/every-millisecond-counts-page-speed-for-firebug/' rel='bookmark' title='Permanent Link: Every Millisecond Counts: Page Speed for Firebug'>Every Millisecond Counts: Page Speed for Firebug</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/w3-total-cache-with-amazon-s3-and-cloudfront/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Creating Mockups with Mockingbird</title>
		<link>http://kovshenin.com/archives/creating-mockups-with-mockingbird/</link>
		<comments>http://kovshenin.com/archives/creating-mockups-with-mockingbird/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 10:47:03 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[web design]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[mocukps]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1663</guid>
		<description><![CDATA[Everyone these days knows that creating any user interface should start with a mockup. Whether it&#8217;s something drawn on a piece of paper or almost designed in Photoshop. When speaking about application UI, software like Borland Delphi or Microsoft Visual Basic would be just fine, especially if you need to create some simple click events. [...]


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Everyone these days knows that creating any user interface should start with a mockup. Whether it&#8217;s something drawn on a piece of paper or almost designed in Photoshop. When speaking about application UI, software like Borland Delphi or Microsoft Visual Basic would be just fine, especially if you need to create some simple click events. The web though is slightly different, and creating mockups with online web applications is way cooler (and faster too) than VB.</p>
<p>Take a look at <a href="http://mockflow.com">Mockflow</a>. It&#8217;s driven by Adobe Flash, the interface is sweet, but meh.. You have to pay if you&#8217;d like to use it for more than 4 slides. And here&#8217;s an alternative that comes to rescue &#8211; <a href="http://gomockingbird.com">Mockingbird</a>! Totally awesome, free of charge, javascript driven, no limitations. Here&#8217;s something I managed to do based on my previous post. It took me about 1 minute and 50 seconds, sweet huh?</p>

<div class="ngg-galleryoverview" id="ngg-gallery-17-1663">


	
	<!-- Thumbnails -->
		
	<div id="ngg-image-189" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://kovshenin.com/core/wp-content/gallery/gomockingbird/01.png" title=" " rel="lightbox[set_17]" >
								<img title="Mockups with Mockingbird" alt="Mockups with Mockingbird" src="http://kovshenin.com/core/wp-content/gallery/gomockingbird/thumbs/thumbs_01.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-190" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://kovshenin.com/core/wp-content/gallery/gomockingbird/02.png" title=" " rel="lightbox[set_17]" >
								<img title="Mockups with Mockingbird" alt="Mockups with Mockingbird" src="http://kovshenin.com/core/wp-content/gallery/gomockingbird/thumbs/thumbs_02.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-191" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://kovshenin.com/core/wp-content/gallery/gomockingbird/03.png" title=" " rel="lightbox[set_17]" >
								<img title="Mockups with Mockingbird" alt="Mockups with Mockingbird" src="http://kovshenin.com/core/wp-content/gallery/gomockingbird/thumbs/thumbs_03.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-192" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://kovshenin.com/core/wp-content/gallery/gomockingbird/04.png" title=" " rel="lightbox[set_17]" >
								<img title="Mockups with Mockingbird" alt="Mockups with Mockingbird" src="http://kovshenin.com/core/wp-content/gallery/gomockingbird/thumbs/thumbs_04.png" width="99" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-193" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://kovshenin.com/core/wp-content/gallery/gomockingbird/05.png" title=" " rel="lightbox[set_17]" >
								<img title="Mockups with Mockingbird" alt="Mockups with Mockingbird" src="http://kovshenin.com/core/wp-content/gallery/gomockingbird/thumbs/thumbs_05.png" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class="ngg-clear">&nbsp;</div> 	
</div>


<p>By the way there&#8217;s also an option to share you mockup. Both in Mockflow and Mockingbird, so you wouldn&#8217;t have to print screen your slides like I did ;)</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/creating-mockups-with-mockingbird/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WordPress: The wp_update_post Dates in Drafts</title>
		<link>http://kovshenin.com/archives/wordpress-the-wp_update_post-dates-in-drafts/</link>
		<comments>http://kovshenin.com/archives/wordpress-the-wp_update_post-dates-in-drafts/#comments</comments>
		<pubDate>Tue, 01 Dec 2009 06:00:49 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[wordpress]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1649</guid>
		<description><![CDATA[This one&#8217;s pretty tricky. If you&#8217;ve ever tried to update a post using the wp_update_post function with drafts or pending posts, you might have noticed that the post_date argument is ignored, instead the current date/time comes up. The post_date argument works only for published posts or during the publishing process. I looked into the WordPress [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/thickbox-and-jquery-in-wordpress-2-8/' rel='bookmark' title='Permanent Link: Thickbox and jQuery in WordPress 2.8'>Thickbox and jQuery in WordPress 2.8</a></li>
<li><a href='http://kovshenin.com/archives/customize-posts-order-in-wordpress-via-custom-fields/' rel='bookmark' title='Permanent Link: Customize Posts Order in WordPress via Custom Fields'>Customize Posts Order in WordPress via Custom Fields</a></li>
<li><a href='http://kovshenin.com/archives/adding-mod_rewrite-rules-to-htaccess-in-wordpress/' rel='bookmark' title='Permanent Link: Adding mod_rewrite Rules to .htaccess in WordPress'>Adding mod_rewrite Rules to .htaccess in WordPress</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>This one&#8217;s pretty tricky. If you&#8217;ve ever tried to update a post using the wp_update_post function with drafts or pending posts, you might have noticed that the post_date argument is ignored, instead the current date/time comes up. The post_date argument works only for published posts or during the publishing process. I looked into the WordPress core code, the wp_update_post function has an additional argument called edit_date, which is not mentioned in the codex, so if you&#8217;re trying to update an existing post which is a draft or a pending one, use the following method:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$post_data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
	<span style="color: #0000ff;">&quot;ID&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">123</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;post_date&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$post_date</span><span style="color: #339933;">,</span>
	<span style="color: #0000ff;">&quot;edit_date&quot;</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">true</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$post_id</span> <span style="color: #339933;">=</span> wp_update_post<span style="color: #009900;">&#40;</span><span style="color: #000088;">$post_data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>This will update the post 123 and set it&#8217;s time to $post_date (which is in format Y-d-m H:i:s if you know what I mean ;). The other possible parameters for wp_update_post are described in the docs for <a href="http://codex.wordpress.org/Function_Reference/wp_insert_post">wp_insert_post</a> in the Codex.</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/thickbox-and-jquery-in-wordpress-2-8/' rel='bookmark' title='Permanent Link: Thickbox and jQuery in WordPress 2.8'>Thickbox and jQuery in WordPress 2.8</a></li>
<li><a href='http://kovshenin.com/archives/customize-posts-order-in-wordpress-via-custom-fields/' rel='bookmark' title='Permanent Link: Customize Posts Order in WordPress via Custom Fields'>Customize Posts Order in WordPress via Custom Fields</a></li>
<li><a href='http://kovshenin.com/archives/adding-mod_rewrite-rules-to-htaccess-in-wordpress/' rel='bookmark' title='Permanent Link: Adding mod_rewrite Rules to .htaccess in WordPress'>Adding mod_rewrite Rules to .htaccess in WordPress</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/wordpress-the-wp_update_post-dates-in-drafts/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Optimizing Your Amazon Web Services Costs</title>
		<link>http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/</link>
		<comments>http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 13:38:39 +0000</pubDate>
		<dc:creator>kovshenin</dc:creator>
				<category><![CDATA[cloud tips]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[cloudfront]]></category>
		<category><![CDATA[ebs]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[s3]]></category>

		<guid isPermaLink="false">http://kovshenin.com/?p=1624</guid>
		<description><![CDATA[I&#8217;ve been with Amazon for quite a long time now and you must have heard that their web hosting services aren&#8217;t very cheap. The average total of one instance per month (including EBS, S3 and all the others) was around $120 at the start. That was back in July 2009 when I had no idea [...]


Related posts:<ol><li><a href='http://kovshenin.com/archives/amazon-web-services-moving-to-a-new-region/' rel='bookmark' title='Permanent Link: Amazon Web Services: Moving to a New Region'>Amazon Web Services: Moving to a New Region</a></li>
<li><a href='http://kovshenin.com/archives/amazon-web-services/' rel='bookmark' title='Permanent Link: Have You Tried the Amazon Web Services?'>Have You Tried the Amazon Web Services?</a></li>
<li><a href='http://kovshenin.com/archives/cloud-tips-rediscovering-amazon-cloudfront/' rel='bookmark' title='Permanent Link: Cloud Tips: Rediscovering Amazon CloudFront'>Cloud Tips: Rediscovering Amazon CloudFront</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been with Amazon for quite a long time now and you must have heard that their web hosting services aren&#8217;t very cheap. The average total of one instance per month (including EBS, S3 and all the others) was around $120 at the start. That was back in July 2009 when I had no idea about how all this stuff works. With a lot of experimenting I managed to drop my instance per month costs down by around 40%. Below are a few tips that can help you lower your Amazon Web Services charges:</p>
<div class="kimage"><h2>Cloud Tips: Spare Those Extra Dollars</h2><img src="http://kovshenin.com/core/wp-content/uploads/2009/08/aws.png" alt="Cloud Tips: Spare Those Extra Dollars" /></div><div class="clearfloat"></div>
<ul>
<li>Use reserved EC2 Instances where possible. Amazon charges $0.085 per hour for an m1.small Linux instance in the US, that&#8217;s around $61 per month and $734 per year. A reserved instance costs me $227 for one year, plus $0.03 per running hour, that makes it around $490 per year for an m1.small instance. Use reserved instances only if you&#8217;re sure that you&#8217;ll be using it for a whole year. You can save even more if you purchase a reserved instance for three years.</li>
<li>Storage: EBS vs EC2. Pick EC2! That&#8217;s right, EC2! EBS charges you for provisioned storage, IO requests and snapshots. These may rise pretty quickly if you&#8217;re running MySQL on an EBS block &#8211; very risky! Run your MySQL on EC2. The php files and everything else should preferably be on EC2 aswell. You can use your EBS block for tiny backups of core PHP files if you&#8217;re running more than one EC2 instance.</li>
<li>EBS is cheaper than S3. S3 should only be used in cases where you have to serve your static content from different servers (perhaps through CloudFront), and maybe store some backups there too (don&#8217;t forget to remove the old ones!), but EBS is cheaper, even with snapshots.</li>
<li>CloudFront is okay. It does speed up your website, but you have to know that it&#8217;s more expensive for requests to Japan and Hong Kong</li>
</ul>
<p>There you go. With these tips you should be able to get the Amazon hosting services for around $90/month, unless of course you have a 3 million visitors per day website ;) Also, for those of you wondering.. I haven&#8217;t used RackSpace, but I did compare their prices to Amazon&#8217;s and they&#8217;re more expensive.</p>


<p>Related posts:<ol><li><a href='http://kovshenin.com/archives/amazon-web-services-moving-to-a-new-region/' rel='bookmark' title='Permanent Link: Amazon Web Services: Moving to a New Region'>Amazon Web Services: Moving to a New Region</a></li>
<li><a href='http://kovshenin.com/archives/amazon-web-services/' rel='bookmark' title='Permanent Link: Have You Tried the Amazon Web Services?'>Have You Tried the Amazon Web Services?</a></li>
<li><a href='http://kovshenin.com/archives/cloud-tips-rediscovering-amazon-cloudfront/' rel='bookmark' title='Permanent Link: Cloud Tips: Rediscovering Amazon CloudFront'>Cloud Tips: Rediscovering Amazon CloudFront</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://kovshenin.com/archives/optimizing-your-amazon-web-services-costs/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss><!-- This site's performance optimized by W3 Total Cache. Dramatically improve the speed and reliability of your blog!

Learn more about our WordPress Plugins: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enchanced)
Database Caching using memcached
Content Delivery Network via Amazon Web Services: CloudFront: s.kovshenin.com

Served from: ip-10-160-23-131.us-west-1.compute.internal @ 2010-01-03 03:41:43 -->
