<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;Dk8NR3s7eCp7ImA9WxBWFUs.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733</id><updated>2010-02-07T19:48:16.500+02:00</updated><title>Coding Aloud</title><subtitle type="html">From The Brains of Gil Megidish</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.codingaloud.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://www.codingaloud.com/" /><link rel="hub" href="http://pubsubhubbub.appspot.com/" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/CodingAloud" /><feedburner:info uri="codingaloud" /><entry gd:etag="W/&quot;C04FQnk_fCp7ImA9WxNSFUg.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-7689301074037722698</id><published>2009-08-29T15:05:00.004+03:00</published><updated>2009-08-29T16:18:33.744+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-08-29T16:18:33.744+03:00</app:edited><title>Tony Robbins And A Gun To Your Head</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FRVMr9ja1bU/SpkbP7TDBjI/AAAAAAAAAlw/dc6U89zfcuk/s1600-h/anthony-robbins1.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 260px; height: 260px;" src="http://2.bp.blogspot.com/_FRVMr9ja1bU/SpkbP7TDBjI/AAAAAAAAAlw/dc6U89zfcuk/s320/anthony-robbins1.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5375357590672967218" /&gt;&lt;/a&gt;&lt;span style="font-weight:bold;"&gt;Frank Kern is my hero.&lt;/span&gt; If I were to line him up with the rest of the Übermensch, he'd be standing there between Batman and Bill Hicks, waving back. There are only a handful of people who can speak and behave like Kern and still get away with it. He's the surfer boy you just can't hate.&lt;br /&gt;&lt;br /&gt;I've been following Frank's work and talks over the years. Unlike his other colleagues in the make-money-online niche, his presentations are informative, helpful and really hilarious.&lt;br /&gt;&lt;br /&gt;A few days ago I bookmarked a link to &lt;a href="http://tonyrobbinstraining.com/320/interview-with-frank-kern-and-john-reese/"&gt;Tony Robbins' interview with Frank Kern and John Reese&lt;/a&gt;. I've heard of Tony Robbins' years ago, but never actually watched any lecture or listened to his talks. I must say (and he admits,) that his look is misleading. The guy is super inspirational, great motivational talker and very down to earth.&lt;br /&gt;&lt;br /&gt;Kern and Reese drove to Robbins' hotel, looking for an advice. The let-me-help-you-do-better niche is crumbling from the inside. I've heard it so many times that it so obvious: people buy self-help products, but never actually go through. It's proven that just the mere act of purchasing such an item makes you fell warm and fuzzy that you think you are half way there already. I don't know anybody who bought a Idiot's Guide to Piano and is playing well just because it's collecting dust on the shelf.&lt;br /&gt;&lt;br /&gt;My point is, during the talk both Reese and Kern agree that they started out making money online because they had &lt;span style="font-style:italic;"&gt;guns to their heads&lt;/span&gt;. They were poor and needed the money. From there to where there are now is a very long story, but it would never begin if they had proper day jobs and security.&lt;br /&gt;&lt;br /&gt;Most of my friends are making money online. Not enough to retire. It's a dream many people have, and it doesn't require relocating to Hollywood and look for acting gigs. But I think what we all miss is the gun to our heads. The point of make or break. If any of us doesn't work for a year, we'll still be fine. It won't be fun or easy, but I think we will get along. Comfort-zone has become a curse word. I intend to fight back.&lt;br /&gt;&lt;br /&gt;As this blog is about my journey in my online business, I would like to share some of the ideas I use to try and break my comfort zone (CZ). As stupid as it sounds, it feels great. Go through the list, if you think an idea is idiotic, then it means you are cozy there in your bubble. Try to burst it.&lt;br /&gt;&lt;br /&gt;* Live in another apartment/city/house for a month+. Bring only one backpack of stuff. Don't go living on the streets, but realize that you are not your stuff. You are not your guitar or your Playstation 3. I travel a lot in the world, and I feel great satisfaction that everything I need I can carry on my back.&lt;br /&gt;&lt;br /&gt;* Go broke. Don't give away your money, but try to see how it feels without a credit card. Take very little cash and try to live with that for a week. Suddenly shelling out $20 for a dinner looks strange; why did you ever do it in the first place?&lt;br /&gt;&lt;br /&gt;* Change your working environment completely: if you are working from home, try and work in a cubicle for a couple of works. If you are working from an office, try and work from home/cafe. How do you handle the new surrounding? Would you switch if you could?&lt;br /&gt;&lt;br /&gt;Again, the interview can be seen at &lt;a href="http://tonyrobbinstraining.com/320/interview-with-frank-kern-and-john-reese/"&gt;Tony Robbins Blog&lt;/a&gt;. I highly recommend it, and it's only 30 minutes long.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-7689301074037722698?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/Ab6HQf0Mi0A" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/7689301074037722698/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=7689301074037722698" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/7689301074037722698?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/7689301074037722698?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/Ab6HQf0Mi0A/tony-robbins-and-gun-to-your-head.html" title="Tony Robbins And A Gun To Your Head" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_FRVMr9ja1bU/SpkbP7TDBjI/AAAAAAAAAlw/dc6U89zfcuk/s72-c/anthony-robbins1.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2009/08/tony-robbins-and-gun-to-your-head.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A04BQ3Y8fCp7ImA9WxJbGU8.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-7659196372077811704</id><published>2009-07-29T21:00:00.000+03:00</published><updated>2009-07-30T07:59:12.874+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-07-30T07:59:12.874+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="productivity" /><category scheme="http://www.blogger.com/atom/ns#" term="tips" /><title>5 Tips For Boosting Up Productivity or: How Cheezburgers Killed The Productivity Star</title><content type="html">&lt;a href="http://www.flickr.com/photos/nickbilton/2709378784/"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 240px; height: 136px;" src="http://farm4.static.flickr.com/3187/2709378784_9f99efdee6_m.jpg" border="0" alt="" /&gt;&lt;/a&gt;Productivity is the name of the game and I am losing. Back in the day, when I started &lt;a href="http://www.dumpr.net"&gt;Dumpr&lt;/a&gt;, I recall developing the habit of &lt;a href="http://en.wikipedia.org/wiki/Obsessive-compulsive_disorder"&gt;OCD&lt;/a&gt; by "tail -f"'ing my access log and just waiting for a visitor to come by. &lt;i&gt;If you build it, they will come&lt;/i&gt;. Fast-forward a couple of years: I check &lt;a href="http://www.icanhasdoublecheezburger.com"&gt;icanhasdoublecheezburger.com&lt;/a&gt; for new lolcats 27 times a day, refresh my inbox 53 times an hour and just hang around tweetdeck, flickr, mobwars and youtube enough to rebuild the pyramids myself.&lt;br /&gt;&lt;br /&gt;No more!&lt;br /&gt;&lt;br /&gt;Starting &lt;strike&gt;today&lt;/strike&gt; tomorrow, I am limiting my hours and planning my time as I see fit. Earlier this year, I did an experiment: using Google's SMS service, I configured Google Calendar to txt me every day at 7pm a single sentence: &lt;b&gt;"Shut down the computer"&lt;/b&gt;. I have to admit that it worked pretty well. My life evolves around computers. I've been sitting in front of a crt since the age of 6. Forcing myself to not use a computer (not even for watching movies) made other activities more available. Watch a movie with friends, read a book, spend hours on the guitar, learn a new language, or the best of all: go to sleep early!&lt;br /&gt;&lt;br /&gt;This post is turning into a Seinfeld's &lt;em&gt;Post About Nothing&lt;/em&gt; kind of deal. So I'll make it educational. Here are &lt;b&gt;5 tips guaranteed to increase your productivity&lt;/b&gt;. Learned the hard way:&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Define Productivity&lt;/b&gt; - what is that you want to achieve? YouTubing 18 hours a day is considered productive if your goal is to watch each and every movie on the internets. My goals in life are learning Japanese and practicing guitar enough to be able to perform in front of friends.&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Make Daily Timetables&lt;/b&gt;. Each morning, sit down for 5-10 minutes and write your schedule for today. I find it very difficult to plan a whole week ahead, so I'm always planning the night before. Allocate in granularity of 30-minutes, to allow tasks to be executed in a worry-free zone. In other words: when you know you have 30 minutes to complete a task, there is nothing to worry about missing other opportunities; don't waste brain cycles worries, you have planned your day already.&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Leave Meetups For After Work&lt;/b&gt; - business at day, pleasure at night. Fun is harder to cap in hours. What if your breakfast buddy is very interesting today, will you part early or postpone all the other tasks? Plan meetups, dinners, beers after workhours.&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Cheezburgers Before The Zone&lt;/b&gt; - getting into the productivity zone is difficult. There are plenty of interruptions: blogs, emails, twitter. Part of my day includes a visit to &lt;a href="http://www.icanhasdoublecheezburger.com"&gt;I Can Has Double Cheezburger&lt;/a&gt; for some lolcats to brighten my day. I won't fight this, so I might as well accept it. If I finish my emails/funny-cats early, then I don't need to stop my work later to check up on them. Pleasure before business, I always say.&lt;br /&gt;&lt;br /&gt;* &lt;b&gt;Make Daily/Weekly Audits&lt;/b&gt; - check up on yourself, sit for a few minutes to review how your week worked out. What did you do right, what would you like to improve? Don't punish yourself and feel down if something is out of order. Just be honest with yourself.&lt;br /&gt;&lt;br /&gt;Got tips that work for you? Care to share?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/nickbilton/2709378784/"&gt;I murdered the Fail Whale!&lt;/a&gt; by &lt;a href="http://www.flickr.com/photos/nickbilton/"&gt;nickbilton&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-7659196372077811704?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/lca-uI640Gk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/7659196372077811704/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=7659196372077811704" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/7659196372077811704?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/7659196372077811704?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/lca-uI640Gk/5-tips-for-boosting-up-productivity-or.html" title="5 Tips For Boosting Up Productivity or: How Cheezburgers Killed The Productivity Star" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://www.codingaloud.com/2009/04/5-tips-for-boosting-up-productivity-or.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8NSXc6cSp7ImA9WxVRGEw.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-5224786151909766617</id><published>2009-01-24T17:14:00.000+02:00</published><updated>2009-01-24T19:41:38.919+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-24T19:41:38.919+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="framework" /><category scheme="http://www.blogger.com/atom/ns#" term="i18n" /><title>Вы запах смешно - The Pain of Website Internationalization</title><content type="html">&lt;img style="float:right; margin:0 0 10px 10px; width: 240px; height: 181px;" src="http://4.bp.blogspot.com/_FRVMr9ja1bU/SXtNKKYupEI/AAAAAAAAAcY/EzP2Zao5a_c/s320/3210086353_87818a1be5_m.jpg" border="0" /&gt;Let's face it, internationalization is a pain in the ass. Zero fun. Often termed i18n and l10n, these two are God's punishment for &lt;a href="http://wiki.answers.com/Q/How_and_why_did_Babylon_collapse"&gt;trying to reach for the heavens&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I have recently started an effort of translating one of my sites &lt;a href="http://www.dumpr.net"&gt;http://www.dumpr.net&lt;/a&gt; to a range of languages, while maintaining a clean and loose code that can be later be put in use for other projects.&lt;br /&gt;&lt;br /&gt;My plan is to make a 3-parts post. First, I will talk about what are my goals from the translation system. In a later post, we will review how technically other websites managed to both internationalizate &lt;span style="font-style:italic;"&gt;and&lt;/span&gt; keep sanity. Third and last post will conclude: pitfalls you should know about, pains I've been going through and some tips for a better life.&lt;br /&gt;&lt;br /&gt;As a rule of thumb, when I face with such a tremendous problem, I first head out and seek who has already achieved this goal. While there are plenty of websites that manage to translate several keywords a page (&lt;a href="http://zooomr.com"&gt;zooomr&lt;/a&gt;, &lt;a href="http://www.photofunia.com"&gt;photofunia&lt;/a&gt;,) there are two distinct websites I look up to: &lt;a href="http://www.flickr.com"&gt;flickr&lt;/a&gt; und &lt;a href="http://www.facebook.com"&gt;facebook&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;I consider Flickr as the mother of all website architectures. In his &lt;span style="font-style:italic;"&gt;bible book:&lt;/span&gt; "&lt;a href="http://www.amazon.com/Building-Scalable-Web-Sites-applications/dp/0596102356/ref=pd_bbs_sr_1?ie=UTF8&amp;s=books&amp;qid=1232818568&amp;sr=8-1"&gt;Building Scalable Websites&lt;/a&gt;", &lt;a href="http://iamcal.com"&gt;Cal Henderson&lt;/a&gt; explains lots of the architectural redesign and growing pains they had with Flickr. Nowadays Flickr supports a wide range of 8 languages, all left-to-right. &lt;br /&gt;&lt;br /&gt;Facebook, on the other hand, has always impressed me with their amazing development framework and ability to adapt fast. They make sure their effort can then be helpful for other programmers. Their Translation application is so powerful and easy to use, that 20,000 people from France localized the entire website within 24 hours. (wow!) Also, Facebook supports right-to-left languages as well (ie, hebrew and arabic,) which also affect the website layout (completely mirrored.)&lt;br /&gt;&lt;br /&gt;Drilling down, the following bullet points make up the bigger picture:&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;Translating is done online&lt;/span&gt;. I have tried to maintain a csv or a google document for translating, it's just unbearable. Being a man-in-the-middle and transferring strings back and forth to translators is absolutely a no-no and can result in a brain damage.&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;Strings list generated automatically&lt;/span&gt;. The gettext approach demands that the person in charge updates a list of translatable strings. Rapid development will be hurt and wounded if I have to update the same string in two places.&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;No keywords or tagging, see what you are translating&lt;/span&gt;. It's hard to write and design an html with placeholders and copywriting is strictly impossible. &lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;No translation goes online without approval&lt;/span&gt;. Some authorization and permission-levels are required. Whether you are crowd-translating or using a hired professional, you still can't trust every person you meet on the internet. Facebook breaks this problem into finding the most fit translation (via voting,) and publishing the selected translation online. &lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;Person translating might not know html&lt;/span&gt;. Strings should not contain any markup text. Don't rely a 3rd party not to break your html compatibility.&lt;br /&gt;&lt;br /&gt;* &lt;span style="font-weight:bold;"&gt;Rapid-translation (tm)&lt;/span&gt;. Translators must find this task easy and fun. They should be able to see results in real-time, and not be dependent on anybody else.&lt;br /&gt;&lt;br /&gt;Have you ever made your website appeal to other locales? Got tips to share? What problems did you face? I want to hear all about them! efterlade en kommentar!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/fimoculous/3210086353/"&gt;Tower of Babel&lt;/a&gt; by fimoculous (cc).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-5224786151909766617?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/FojBB1x8PKM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/5224786151909766617/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=5224786151909766617" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/5224786151909766617?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/5224786151909766617?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/FojBB1x8PKM/pain-of-website-internationalization.html" title="Вы запах смешно - The Pain of Website Internationalization" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_FRVMr9ja1bU/SXtNKKYupEI/AAAAAAAAAcY/EzP2Zao5a_c/s72-c/3210086353_87818a1be5_m.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2009/01/pain-of-website-internationalization.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EBQXw7cCp7ImA9WxVREU0.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-4273490491821607599</id><published>2009-01-16T12:36:00.010+02:00</published><updated>2009-01-16T13:34:10.208+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-01-16T13:34:10.208+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="entrepreneurship" /><category scheme="http://www.blogger.com/atom/ns#" term="eclub" /><category scheme="http://www.blogger.com/atom/ns#" term="talk" /><title>Get Your Gig Going: Social Media For Entrepreneurs</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm4.static.flickr.com/3468/3200516082_bfed94fbec_m.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 240px; height: 180px;" src="http://farm4.static.flickr.com/3468/3200516082_bfed94fbec_m.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;a href="http://www.facebook.com/group.php?gid=11745796141"&gt;eClub HUJI&lt;/a&gt; had a great speaker last night. &lt;a href="http://twitter.com/kfirpravda"&gt;Kfir Pravda&lt;/a&gt; of &lt;a href="http://www.pravdam.com/"&gt;Pravda Media&lt;/a&gt; presented a kickass lecture titled "Social Media For Entrepreneurs".&lt;br /&gt;&lt;br /&gt;Pravda laid out a list of dos and don'ts for using the latest buzz bingo term "Social Media" for your own gain. From using the available services to network with people in your field, through being accepted as an expert in the subject. This media can make or break your business, and it's very important for us entrepreneurs (and more importantly, solo-entrepreneurs) to learn how to utilize this for our needs.&lt;br /&gt;&lt;br /&gt;The talk was taped, thanks to our friends at &lt;a href="http://www.israelhightech.tv/"&gt;israelhightech.tv&lt;/a&gt;. I will post a link to the video when it's up online and narrated in English.&lt;br /&gt;&lt;br /&gt;So what have I learned from this. Have you ever been in a situation when somebody tells you something, and it seems so goddamn obvious to you, and yet, you haven't done it yourself? This is how it felt. There is some kind of enlightenment when a respectable person not only reawaken your dead cells, but also gives proofs (again and again) and real life examples how these tricks have changed his business and life.&lt;br /&gt;&lt;br /&gt;1. &lt;span style="font-weight: bold;"&gt;A Business Card Is Just The Beginning of a Relationship&lt;/span&gt;&lt;br /&gt;More often than not, I'd visit a conference or a lecture, network with a bunch of interesting people, exchange cards and then shelf them for a time in need. Now, why would you do that? A person gave you his business card, she has done so because she is interested in hearing more from you. Go home now, take all of your business cards, and add each one to your Facebook friends, LinkedIn connections and Twitter friends. Cause you know what? A week after meeting her, she had probably forgotten and there goes a valuable contact.&lt;br /&gt;&lt;br /&gt;And here is an example from my life: a while ago I was at the &lt;a href="http://www.codingaloud.com/2008/12/amazon-aws-meetup-in-tel-aviv.html"&gt;Amazon AWS Meetup In Tel Aviv&lt;/a&gt;. After the meetup, I started talking to this guy. Now, I consider myself a great listener, but I just couldn't get the guy to talk much. Eventually we parted after exchanging business cards. That same night, he added me on Facebook and LinkedIn.&lt;br /&gt;&lt;br /&gt;A while later, I attended the Facebook Developer Garage meetup, and there he was again. Just this time, he was accompanied with other important people from the field. Having me as his friend on these platforms, he checked my cv, updated on what I'm doing and realized the potential. He introduced me (now he did all the talking) to his partners in such an enthusiastic manner, that I was blushing immediately. Now I'm friends with important contacts closer to what I am doing.&lt;br /&gt;&lt;br /&gt;2. &lt;span style="font-weight: bold;"&gt;LinkedIn Answers Is Your Greatest Tool&lt;/span&gt;&lt;br /&gt;LinkedIn Answers has been there for quite a while. From time to time, I'd get these questions on my email. Basically, it's a platform for LinkedIn users to ask their peers a question. The question is published publicly, and other people can participate. I always answer the questions that I receive.&lt;br /&gt;&lt;br /&gt;After Kfir's talk (and again, proving how important it is for his business,) I decided to give it a try. I asked a &lt;a href="http://www.linkedin.com/answers/startups-small-businesses/small-business/STR_SMB/400591-215947?browseCategory=STR"&gt;question in Startups And Small Businesses&lt;/a&gt; category. I have to admit I was stunned. It took 45 seconds for the first answer to arrive, and from a person I have never known before. It has been less than 12 hours, than I already got 15 different replies. It is really an amazing tool, not only to get help with decisions, but also to find people who are interesting and influential in your field of expertise.&lt;br /&gt;&lt;br /&gt;3. &lt;span style="font-weight: bold;"&gt;Get Your Story Straight, Kiddo&lt;/span&gt;&lt;br /&gt;There is a distinct different between, "what's your story" and "what's your job". I have learned this the hard way. If you were to ask me 5 years ago, who are you, I would reply "Gil Megidish: Programmer". Ask me the same question today, and I would tell you "I'm an entrepreneur filled with motivation and creative ideas. I am a proud owner of dumpr.net, a hobby that turned into a successful business. I am very open about my work, I share my knowledge with others and help other startups get on their feet".&lt;br /&gt;&lt;br /&gt;With all modesty, I must say that the later answer invokes more questions and interested.&lt;br /&gt;&lt;br /&gt;Kfir lectures quite often (and all over the world), so make sure you &lt;a href="http://twitter.com/kfirpravda"&gt;follow him on twitter&lt;/a&gt; and maybe attend his upcoming talks.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-4273490491821607599?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/OKzLe2tNR3g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/4273490491821607599/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=4273490491821607599" title="4 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4273490491821607599?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4273490491821607599?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/OKzLe2tNR3g/eclub-huji-had-great-speaker-last-night.html" title="Get Your Gig Going: Social Media For Entrepreneurs" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">4</thr:total><feedburner:origLink>http://www.codingaloud.com/2009/01/eclub-huji-had-great-speaker-last-night.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkANSHw9fyp7ImA9WxRaEUQ.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-8650402787328195030</id><published>2008-12-13T18:19:00.010+02:00</published><updated>2008-12-13T20:59:59.267+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-13T20:59:59.267+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="outsourcing" /><title>A Programmers Guide to Outsourcing</title><content type="html">&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 320px; height: 225px;" src="http://3.bp.blogspot.com/_FRVMr9ja1bU/SUQELeKTUdI/AAAAAAAAAZ4/6bp1rKh4PA8/s320/Homework.gif" border="0" alt=""id="BLOGGER_PHOTO_ID_5279349258306408914" /&gt;Outsourcing needs no introduction -- it has been covered by news media extensively for the past couple of years. Everybody's doing it, and at some point in life, you figured it's worth a try.&lt;br /&gt;&lt;br /&gt;But it's not all shine and glamor. Outsourcing your programming tasks can be a real headache and even a burden. This guide is here to help you identify the pitfalls before you're even making the first step. It's all based on experience and I'm sure many of the readers will agree what what is said here.&lt;br /&gt;&lt;br /&gt;There are two types of outsourcing: one-shot (projects) and continual (semi-hired programmer.) Projects are posted on sites such as &lt;a href="http://www.elance.com"&gt;Elance&lt;/a&gt;, where freelancers send you quote for your consideration. Semi-hiring programmers can be done through &lt;a href="http://www.odesk.com"&gt;oDesk&lt;/a&gt;, where you get to interview programmers and share svn access.&lt;br /&gt;&lt;br /&gt;1. &lt;span style="font-weight:bold;"&gt;It might take 3 hours to explain a 10 minutes task&lt;/span&gt;&lt;br /&gt;When you figure it would take you several hours to explain, listen, pack sources and then merge back the results, ask yourself this question: is it worth it?. When you're outsourcing a single task with no further interaction with that specific programmer, then the answer is simply: &lt;span style="font-weight:bold;"&gt;no&lt;/span&gt;. The only reason that you would do such a thing, is to educate your programmer (semi-hiring freelancers.) Add task, send bug reports, review code, integrate. The more you iterate this, the shorter it will become, so don't lose your head prematurely.&lt;br /&gt;&lt;br /&gt;2. &lt;span style="font-weight:bold;"&gt;It's mentally difficult if you can do it yourself&lt;/span&gt;&lt;br /&gt;The person who knows my framework and setup best is me. Moreover, I love my coding conventions, my automatic tests and how well my new code fits with the existing code base. It's awfully hard to look at somebody else's code and not go "I would have done this better." I'm sure you would. The easiest tasks I have outsourced are translating and copywriting. Why? Because I know I'm weak there and I can easily assess other's work. Learn to accept other people's code or shape them as needed.&lt;br /&gt;&lt;br /&gt;3. &lt;span style="font-weight:bold;"&gt;Language barrier is no fun&lt;/span&gt;&lt;br /&gt;Not everybody speaks English, and not everybody speak the &lt;span style="font-style:italic;"&gt;same English&lt;/span&gt;. During my trial-and-error period, I have hired East Asians (India and China) programmers. I know I'm making a bad generalization here, but all of my projects failed. I received code that was either useless or had absolutely nothing to do with my requirements. Bouncing emails back and forth for a long time concluded this as hopeless and as awful as it sounds, I choose not to work with programmers from these countries again. It goes without saying that the same problem might happen with people from other nations as well. It helps to talk to the person, ask her questions about the weather or sports, just to get an idea how well you two communicate.&lt;br /&gt;&lt;br /&gt;Here are a few tips I have picked up along the way. They help me calm down and do this process (more) smoothly:&lt;br /&gt;&lt;br /&gt;1. When posting a project, make sure the &lt;span style="font-weight:bold;"&gt;price offers are sealed&lt;/span&gt; (hidden from the eyes of other freelancers.) I have noticed the second bidder base their price by the first bidder. Sealing it will make freelancers think and bid as they see fit, without the competition against other programmers.&lt;br /&gt;&lt;br /&gt;2. &lt;span style="font-weight:bold;"&gt;Start small&lt;/span&gt;. It's easy to get hooked with the infinite opportunities. Don't shell out more than you can afford, and don't handle more than one task at the time. Use the first few projects for learning from mistakes. They will happen, there is no way around it.&lt;br /&gt;&lt;br /&gt;3. &lt;span style="font-weight:bold;"&gt;Remember why you are outsourcing in the first place&lt;/span&gt;. The reason why you are reading this article is because you are not scalable. You are a very talent and creative person, but there is only one of you. Your to-do list is 10 pages long, but you only have one pair of hands. &lt;span style="font-weight:bold;"&gt;The sooner you realize this&lt;/span&gt;, the faster you will get around all of the above and start getting productive.&lt;br /&gt;&lt;br /&gt;Got something to tell? I am very interested in your opinion and story. Learning from other people's mistakes is definitely a bonus. I'd be more than happy if you could share your experience. What worked and what didn't.&lt;br /&gt;&lt;br /&gt;Good luck!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-8650402787328195030?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/pPQzrsPIZ38" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/8650402787328195030/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=8650402787328195030" title="8 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8650402787328195030?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8650402787328195030?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/pPQzrsPIZ38/programmers-guide-to-outsourcing.html" title="A Programmers Guide to Outsourcing" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_FRVMr9ja1bU/SUQELeKTUdI/AAAAAAAAAZ4/6bp1rKh4PA8/s72-c/Homework.gif" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">8</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/12/programmers-guide-to-outsourcing.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEEGSX88eCp7ImA9WxRaEUs.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-8398625058909557079</id><published>2008-12-04T13:42:00.003+02:00</published><updated>2008-12-13T13:10:28.170+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-13T13:10:28.170+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="meetup" /><category scheme="http://www.blogger.com/atom/ns#" term="amazon aws" /><title>Amazon AWS Meetup in Tel Aviv</title><content type="html">Boy, was that awesome or what! &lt;a href="http://aws.amazon.com/"&gt;Amazon AWS&lt;/a&gt; team from &lt;a href="http://aws.amazon.com/"&gt;Luxembourg&lt;/a&gt; invited us tiny start-ups to an introduction (and networking) meet-up in &lt;a href="http://www.flickr.com/photos/miwo76/120735433/"&gt;Tel Aviv&lt;/a&gt;. Prior to that, there was a 2-day convention about grid computing with folks from AWS, eBay, Yahoo! and others.&lt;br /&gt;&lt;br /&gt;After socializing for over an hour with plenty of new upcoming startups (lots of interesting things are going on right now!,) we were gathered for an evangelistic talk with Martin Buhr (@tallmartin) and Simone Brunozzi (@simon). When asked, almost everybody in the room raised hands for already trying out/working with Amazon's web services. It's quite amazing that it has become a common use among startups and based companies.&lt;br /&gt;&lt;br /&gt;Following their talk, Guy Nirpaz of &lt;a href="http://www.gigaspaces.com"&gt;Gigaspaces&lt;/a&gt; introduced their incredible framework over EC2, and handed out free try-out coupons for everybody who was interested in hands-on trial of their service. &lt;br /&gt;&lt;br /&gt;Were you there?&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/gawd0r/3082239934/" title="Martin Buhr at AWS Meetup TLV by gawd, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3120/3082239934_186df565a6.jpg" alt="Martin Buhr at AWS Meetup TLV" height="375" width="500" /&gt;&lt;/a&gt;&lt;br /&gt;Martin is explaining about AWS EMEA&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/gawd0r/3081405271/" title="Simone Brunozzi at AWS Meetup TLV by gawd, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3137/3081405271_49305d3ed5.jpg" alt="Simone Brunozzi at AWS Meetup TLV" height="375" width="500" /&gt;&lt;/a&gt;&lt;br /&gt;Simone is answering a million and one questions&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-8398625058909557079?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/tffSRsaLR5o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/8398625058909557079/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=8398625058909557079" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8398625058909557079?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8398625058909557079?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/tffSRsaLR5o/amazon-aws-meetup-in-tel-aviv.html" title="Amazon AWS Meetup in Tel Aviv" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/12/amazon-aws-meetup-in-tel-aviv.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0MBQH44cCp7ImA9WxRWE00.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-966617665335423466</id><published>2008-10-29T20:24:00.005+02:00</published><updated>2008-10-29T20:37:31.038+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-29T20:37:31.038+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="discount" /><category scheme="http://www.blogger.com/atom/ns#" term="pingdom" /><category scheme="http://www.blogger.com/atom/ns#" term="administration" /><title>$83.58 Discount on Pingdom!</title><content type="html">&lt;div align="center"&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/gawd0r/2984054067/" title="Saving $83.58 on Pingdom! by gawd, on Flickr"&gt;&lt;img src="http://farm4.static.flickr.com/3039/2984054067_57f16c8ea9_o.png" width="500" height="167" alt="Saving $83.58 on Pingdom!" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;My server just got to 100% iowait again. Luckily I have friends who are constantly visiting &lt;a href="http://www.dumpr.net"&gt;dumpr&lt;/a&gt; to see what's new, so I got a cellphone notification (ie- phone call) that the site isn't working.&lt;br /&gt;&lt;br /&gt;Those manual human techniques, time for an upgrade!&lt;br /&gt;&lt;br /&gt;I just signed up for &lt;a href="http://pingdom.com"&gt;pingdom&lt;/a&gt;. It's a pretty sweet service. They have tons of servers scattered all over the planet, and they ping your configured server every few minutes to see that it's alive. You define what alive means. For me, it's a special php on my server that returns OK or FAIL. In case of FAIL, I get an SMS to my cellphone, telling me to rush into the nearest public telephone booth and change to my Superman costume -&gt; website is down.&lt;br /&gt;&lt;br /&gt;One thing I noticed just now on &lt;a href="http://pingdom.com"&gt;pingdom&lt;/a&gt;, is that you can save $83.58 (yearly) easily! I'm not affiliated with them, I'm just bootstrapping like most of you guys. On the index page, if you start immediately with a Pingdom Basic package, it costs you $119.40 (yearly.) It's a good price for such a terrific service, but if I can have it for less, why not. I discovered by mistake, that if you start with a 30-days Free Basic plan, you get a 70% discount if you upgrade within that month. The new upgrade plan box shows a yearly use of pingdom will now cost $35.82, that's $83.58 in pure savings!&lt;br /&gt;&lt;br /&gt;Now, that's an upgrade!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-966617665335423466?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/qK8bpADLn8I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/966617665335423466/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=966617665335423466" title="5 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/966617665335423466?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/966617665335423466?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/qK8bpADLn8I/8358-discount-on-pingdom.html" title="$83.58 Discount on Pingdom!" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">5</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/10/8358-discount-on-pingdom.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYGSHsyfCp7ImA9WxRXFEQ.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-8415988443877647142</id><published>2008-10-20T11:28:00.009+02:00</published><updated>2008-10-20T12:05:29.594+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-20T12:05:29.594+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="csrf" /><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>All This CSRF Nonsense</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FRVMr9ja1bU/SPxXsZ-4r8I/AAAAAAAAASQ/jQJZt3mUdZ0/s1600-h/2653495500_ac63723f61_m.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_FRVMr9ja1bU/SPxXsZ-4r8I/AAAAAAAAASQ/jQJZt3mUdZ0/s320/2653495500_ac63723f61_m.jpg" border="0" alt="" id="BLOGGER_PHOTO_ID_5259174885262405570" /&gt;&lt;/a&gt;There is a lot of discussion lately about &lt;a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery"&gt;Cross-Site Request Forgery&lt;/a&gt;. Honestly, it's just an old and well known problem getting some media attention.&lt;br /&gt;&lt;br /&gt;Consider the following example. It's known that YouTube uses ajax to add a video to the currently-logged-in-user's favorites. For the sake of simplicity, say the endpoint url is: &lt;span style="font-family:courier;"&gt;http://www.youtube.com/fave?id=1&lt;/span&gt;. Now let's say I'm an underdog director with a killer new indie movie that I want to promote. I go through flickr's explore pages and shove &lt;span style="font-family:courier;"&gt;&amp;lt;img src="http://www.youtube.com/fave?id=1" width="1" height="1" /&amp;gt;&lt;/span&gt; as a comment to all popular photos. The next day I'm on YouTube's top directors, and the road to Hollywood is shorter than ever.&lt;br /&gt;&lt;br /&gt;Of course the example above can be put to banking transactions, election votes and befriending strangers on social networks.&lt;br /&gt;&lt;br /&gt;Working with POST instead of GET does not fix the problem, as javascript can create a form and submit it without user interaction.&lt;br /&gt;&lt;br /&gt;So, how do you solve it?&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="php"&gt;&lt;br /&gt;global $user_id;    # currently logged in user&lt;br /&gt;global $video_id;   # currently watched video&lt;br /&gt;&lt;br /&gt;# a secret that is not shared outside the server&lt;br /&gt;$secret = "here-be-a-secret-nobody-knows";&lt;br /&gt;&lt;br /&gt;# url to be sent to browser&lt;br /&gt;$auth = base64(sha1($secret . $user_id . $video_id));&lt;br /&gt;$add_fave_url = "/fave?id=" . $video_id . "&amp;amp;uid=" . $user_id . "&amp;amp;auth= " . $auth;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;When processing the ''fave'' request itself, just check that the auth signature matches the string you reconstruct from the parameters $user_id, $video_id and the server $secret. If they don't match, you have encountered an attempt of forgery.&lt;br /&gt;&lt;br /&gt;By adding the id of the user that this url will affect, you are eliminating the possibility that Bob will add his video to other users' favorites but his own. You might also consider adding expiration (such as time()+86400) to your request, making it void after a certain period.&lt;br /&gt;&lt;br /&gt;And an apology for all rising indie movie directors. You will just have to work harder. :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-8415988443877647142?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/4BYcgvsuX18" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/8415988443877647142/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=8415988443877647142" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8415988443877647142?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8415988443877647142?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/4BYcgvsuX18/all-this-csrf-nonsense.html" title="All This CSRF Nonsense" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_FRVMr9ja1bU/SPxXsZ-4r8I/AAAAAAAAASQ/jQJZt3mUdZ0/s72-c/2653495500_ac63723f61_m.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/10/all-this-csrf-nonsense.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFSH0yfip7ImA9WxRQEU4.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-3518591612208846358</id><published>2008-10-04T17:50:00.003+03:00</published><updated>2008-10-04T18:28:39.396+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-10-04T18:28:39.396+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="iphone" /><title>Apple Lifting Strict NDA Restrictions!</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.flickr.com/photos/jarod_uses_film/2576845129/"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 320px;" src="http://farm4.static.flickr.com/3272/2576845129_6aa8309b3b.jpg?v=0" alt="" border="0" /&gt;&lt;/a&gt;In an anti-big-brotherish act, Apple has finally &lt;a href="http://blogs.pcworld.com/staffblog/archives/007848.html"&gt;lifted&lt;/a&gt; the why-was-it-there-in-the-first-place strict &lt;a href="http://en.wikipedia.org/wiki/Non-disclosure_agreement"&gt;NDA&lt;/a&gt; restrictions preventing from iPhone developers in discussing about the SDK, App Store approval process, and to participate in forums. &lt;br /&gt;&lt;br /&gt;What seemed like a silly code of silence has now been removed when tight competition from &lt;a href="http://en.wikipedia.org/wiki/Google_Android"&gt;Google&lt;/a&gt; and &lt;a href="http://www.informationweek.com/news/software/operatingsystems/showArticle.jhtml?articleID=210605701"&gt;Nokia&lt;/a&gt; arrived. God bless them.&lt;br /&gt;&lt;br /&gt;iPhone developers rejoice! Now, I need help with AudioQueue..&lt;br /&gt;&lt;br /&gt;"&lt;a href="http://www.flickr.com/photos/jarod_uses_film/2576845129/"&gt;Buy this new thing, suckers&lt;/a&gt;" photo by &lt;a href="http://www.flickr.com/photos/jarod_uses_film/"&gt;Jarod_Uses_Film&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-3518591612208846358?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/lhq8Ht2aYtQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/3518591612208846358/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=3518591612208846358" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3518591612208846358?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3518591612208846358?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/lhq8Ht2aYtQ/apple-lifting-strict-nda-restrictions.html" title="Apple Lifting Strict NDA Restrictions!" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/10/apple-lifting-strict-nda-restrictions.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8NSHo6eSp7ImA9WxRREEw.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-3825135090897551396</id><published>2008-09-21T11:53:00.006+03:00</published><updated>2008-09-21T18:28:19.411+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-09-21T18:28:19.411+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="mailchimp" /><category scheme="http://www.blogger.com/atom/ns#" term="sendmail" /><category scheme="http://www.blogger.com/atom/ns#" term="newsletter" /><category scheme="http://www.blogger.com/atom/ns#" term="dada" /><title>Stripping Dada Mail</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FRVMr9ja1bU/SNYL0E5bKCI/AAAAAAAAAQw/PM7QAIdyK3g/s1600-h/smiley-postman.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_FRVMr9ja1bU/SNYL0E5bKCI/AAAAAAAAAQw/PM7QAIdyK3g/s400/smiley-postman.jpg" alt="" id="BLOGGER_PHOTO_ID_5248395405042591778" border="0" /&gt;&lt;/a&gt;&lt;a href="dadamailproject.com/"&gt;DaDa Mail&lt;/a&gt; is a great mailer program for Unix. I use it to send newsletters to over 50,000 subscribers and it's doing it's job very well. A while ago I gave &lt;a href="http://www.mailchimp.com"&gt;MailChimp&lt;/a&gt; a go. Why? Because administering sendmail and MX-records is pretty nasty task. Cross mail agent compatibility? Pfft. SpamAssassin scores? Ugh! MailChimp delivers it all, using their own templates, they create emails that are both readable by all (major) agents AND with a very low possibility of false-positive spam detection. With that said, having 50,000 subscribers with a weekly newsletter would have cost me $2,000 a month. I decided to sit down, learn SpamAssassin and Sendmail, and make my Dada look more like my &lt;a href="http://www.flickr.com/photos/wmphoto/134191963/"&gt;Chimp&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Removing the "&lt;i&gt;Mailing List Powered by Dada Mail&lt;/i&gt;" banner&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Whenever you're sending out an email, Dada adds a banner with a link back to their site. One way to remove it, is to pay $50 (per year) and get a new set of scripts. Another is just to change configuration and get it done today.&lt;br /&gt;&lt;br /&gt;Edit DADA/Config.pm, and update these 4 variables to zero:&lt;br /&gt;&lt;br /&gt;&lt;div style="padding: 8px; font-family: courier; font-size: 10px; padding: 8px; overflow: scroll; border: 1px solid #ccc;"&gt;&lt;br /&gt;$GIVE_PROPS_IN_EMAIL = 0;&lt;br /&gt;$GIVE_PROPS_IN_HTML = 0;&lt;br /&gt;$GIVE_PROPS_IN_ADMIN = 0;&lt;br /&gt;$GIVE_PROPS_IN_SUBSCRIBE_FORM = 0;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Having your own Subscribe and Unsubscribe pages&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;By default, Dada configures the subscribe and unsubscribe headers (List-Subscribe and List-Unsubscribe) to point to the mail.cgi script. I suggest that mail.cgi will be blocked behind a password protected directory. There is no reason for others to know which version you have installed, or to even to brute force their way in.&lt;br /&gt;&lt;br /&gt;For &lt;a href="http://www.dumpr.net/"&gt;dumpr&lt;/a&gt;, I have a nicer subscribe and unsubscribe pages than Dada offers. It knows the logged-in user, and if it has been subscribed before.&lt;br /&gt;&lt;br /&gt;To configure the List-Subscribe/List-Unsubcribe and List-URL headers, first edit DADA/Config.pm again. Scroll all the way down to %EMAIL_HEADERS and change the undef default to your liking. For example, my List-Subscribe now has the value of "http://www.dumpr.net/subscribe.php".&lt;br /&gt;&lt;br /&gt;For some reason these values are never referenced when sending out emails. So, now edit DADA/Mail/Send.pm and change these lines:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 8px; overflow: scroll; font-family: courier; font-size: 10px; width: 500px; white-space: nowrap;"&gt;&lt;br /&gt;$lh{'List-URL'} = '&lt;' . $DADA::Config::PROGRAM_URL . '/list/'.$self-&gt;{list}  . '/&gt;';&lt;br /&gt;$lh{'List-Unsubscribe'} = '&lt;' . $DADA::Config::PROGRAM_URL . '/u/' . $self-&gt;{list} . '/&gt;';&lt;br /&gt;$lh{'List-Subscribe'} = '&lt;' . $DADA::Config::PROGRAM_URL . '/s/' . $self-&gt;{list} . '/&gt;';&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;To:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 8px; overflow: scroll; font-family: courier; font-size: 10px; width: 500px; white-space: nowrap;"&gt;&lt;br /&gt;$lh{'List-URL'} = '&lt;'.$DADA::Config::EMAIL_HEADERS{'List-URL'}.'&gt;';&lt;br /&gt;$lh{'List-Unsubscribe'} = '&lt;'.$DADA::Config::EMAIL_HEADERS{'List-Unsubscribe'}.'&gt;';&lt;br /&gt;$lh{'List-Subscribe'} = '&lt;'.$DADA::Config::EMAIL_HEADERS{'List-Subscribe'}.'&gt;';&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;The problem with this method, is that it will use one set of urls for all of your newsletters. So if you have more than one on the same dada instance, you'll have to get more creative.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Creating your own html template&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;When Dada sends out mail, it wraps it with some bad copy about the server and the owner of the list. This information is important for &lt;a href="http://en.wikipedia.org/wiki/CAN-SPAM_Act_of_2003"&gt;CAN-SPAM&lt;/a&gt; and I don't encourage you to just remove it. But when it comes down to it, it's just purely ugly. Dada lets you change the layout of emails, if you want your email to be identical to the html page you're sending, just Manage Copy -&gt; Email Templates and change both Plain Text Message and HTML Message to this single line:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid rgb(204, 204, 204); padding: 8px; overflow: scroll; font-family: courier; font-size: 10px; width: 500px; white-space: nowrap;"&gt;&lt;br /&gt;[message_body]&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Controlling the Subscriber List Yourself&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Dada's admin page allows you to easily add and remove subscribers. You can modify the list without transmitting an opt-in email (but be nice, don't abuse this.) I like to keep a single copy of my subscribers list. Under &lt;span style="font-style: italic;"&gt;dada_files&lt;/span&gt;  you will find a file suffixed with .list, mine is newsletter.list. It's a simple one-email-per-line flat database of your subscribers list. To make things easier for me, I have a short shell scripts that runs once a day and creates this list-file, to contain only valid emails of subscribed users.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Additional Changes: Tracking Bounces &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Since Dada is a mailer that interfaces with sendmail or with a SMTP server, it cannot be notified back when an email it just sent has bounced or found invalid. I still haven't patched Dada to handle these cases, but I'll be working on it, and when I get it done I will post the sources here.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Additional Changes&lt;/span&gt;: &lt;span style="font-weight: bold;"&gt;Tracking Opens &amp;amp; Clicks&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Another thing I'm interested in when it comes to my newsletter, is tracking and better understanding how my readers get my newsletter.&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span&gt;Will my readers click more if I post 5 images or 3? Will my open rate be higher if I choose this rather than that. MailChimp has A/B testing feature that I haven't played with yet, but as I said, MailChimp is way expensive if you have over 50,000 subscribers. I am going to use Google Analytics for this, and use Urchin Tracker to create a custom channel per each image and copy. Then I will be able to better understand which copy and layout is better than the other, and see the Goal Funnel through email clicks. I will post sources when I'm done.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Image by &lt;a href="http://www.flickr.com/photos/warmnfuzzy/464491973/"&gt;Warm 'n Fuzzy&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-3825135090897551396?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/yV9Mn8kWkUk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/3825135090897551396/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=3825135090897551396" title="6 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3825135090897551396?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3825135090897551396?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/yV9Mn8kWkUk/stripping-dada-mail.html" title="Stripping Dada Mail" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_FRVMr9ja1bU/SNYL0E5bKCI/AAAAAAAAAQw/PM7QAIdyK3g/s72-c/smiley-postman.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">6</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/09/stripping-dada-mail.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkIGSX8-eSp7ImA9WxdXEks.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-8271266523788530283</id><published>2008-06-24T02:26:00.006+03:00</published><updated>2008-06-24T02:42:08.151+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-24T02:42:08.151+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="stories" /><title>A Hacker Goes to a Restaurant</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm4.static.flickr.com/3101/2605865346_8e2bf1e787_m.jpg"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 240px;" src="http://farm4.static.flickr.com/3101/2605865346_8e2bf1e787_m.jpg" border="0" alt="" /&gt;&lt;/a&gt;This is a short story about the time when a hacker (me) walked into a restaurant. See, I'm on vacation now in Australia. I took the time off, and traveled to the other end of Earth, to visit the lovely city of &lt;a href="http://en.wikipedia.org/wiki/Katoomba"&gt;Katoomba&lt;/a&gt; (at the &lt;a href="http://en.wikipedia.org/wiki/Blue_Mountains_%28Australia%29"&gt;Blue Mountains&lt;/a&gt;.) My friend and I stepped into Papa Dino's place for some Italian food. Running through the menu, I was looking for something to feed my huge appetite. At the very bottom, I saw these glyphs. Immediately recognized as being part of the same &lt;a href="http://en.wikipedia.org/wiki/Wingdings"&gt;Wingdings&lt;/a&gt; family of fonts. With what feels as all eyes on me, I quickly scribbled a copy onto a piece of unused napkin and shoved it into my pocket as if a part of national security secret. &lt;br /&gt;&lt;br /&gt;Thousands of miles and some days afterwards, I re-united with my preciousss laptop. I took out the napkin from my coat and fired up Word. Running through the As to Zs, I was hoping to find the exact of neighboring planet, the secret to zero gravity or at least the answer for ''why did the chicken cross the road''.&lt;br /&gt;&lt;br /&gt;Finally, I got the code deciphered. I looked and it and hit with shame. It said "May 2003" written in the wrong font. Damn you Irony! You win again!&lt;br /&gt;&lt;br /&gt;And that what happens when a hacker goes to a restaurant (true story!).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-8271266523788530283?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/sG28fO9U3J8" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/8271266523788530283/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=8271266523788530283" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8271266523788530283?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/8271266523788530283?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/sG28fO9U3J8/hacker-goes-to-restaurant.html" title="A Hacker Goes to a Restaurant" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/06/hacker-goes-to-restaurant.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEQARnc8cSp7ImA9WxZbEUo.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-3106622600274540307</id><published>2008-04-14T14:06:00.004+03:00</published><updated>2008-04-14T14:25:47.979+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-14T14:25:47.979+03:00</app:edited><title>Amazon EC2, 97% Complete!</title><content type="html">Amazon AWS just fired up a private beta of persistent storage for EC2. After the public announcement of &lt;a href="http://developer.amazonwebservices.com/connect/ann.jspa?annID=295"&gt;Elastic IP Addresses&lt;/a&gt; a couple of weeks ago, Amazon does it again with a feature we have all been crying for.&lt;br /&gt;&lt;br /&gt;I've been intending on writing a post about EC2 web-hosting for quite a while. I'm a grumpy programmer (but I stay optimistic!), and usually my comparisons contain more &lt;span style="font-style:italic;"&gt;CON &lt;/span&gt;and less &lt;span style="font-style:italic;"&gt;PRO&lt;/span&gt;. &lt;br /&gt;&lt;br /&gt;With that being said, I barely hold any case against /not/ hosting at Amazon. Where a month ago I could have shouted about dns annoyances, now we have elastic addresses. When I screamed about volatile disks, we &lt;del&gt;now&lt;/del&gt; will soon have persistent storage.&lt;br /&gt;&lt;br /&gt;So why am I still not kicking my dedicated server and getting 5 xen boxes for the same price? &lt;strong&gt;Support.&lt;/strong&gt; Take a minute to review the most used keywords on the Amazon ec2 developers' forums, it's people crying for help. Mostly it's when their instance is inaccessible. I, for one, have been emailing support when an Amazon bug hit and &lt;a href="http://coding-aloud.blogspot.com/2008/02/that-amazon-aws-bug-again.html"&gt;disabled my account&lt;/a&gt; (3 times). Amazon _does_ have a form where you can email in a support ticket, but it takes days to get a reply (which is still better than freaking Paypal!.)&lt;br /&gt;&lt;br /&gt;Support is the most important thing when you're putting your eggs in one basket. Many startups now completely rely on AWS, and when their instance is down, so is their business.&lt;br /&gt;&lt;br /&gt;I'm not worried at all though. I've been a loyal Amazon buyer since 1998, and when panic hit and I needed help with my shipment, they provided immediate response. Amazon is terrific, and I'm sure AWS support phone is just a matter of time.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_FRVMr9ja1bU/SAM8wqcd3wI/AAAAAAAAAM8/ML9EbzWyYoM/s1600-h/tech-support-funny-cat-pic.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_FRVMr9ja1bU/SAM8wqcd3wI/AAAAAAAAAM8/ML9EbzWyYoM/s400/tech-support-funny-cat-pic.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5189058002386018050" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-3106622600274540307?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/HR75uUM_lfc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/3106622600274540307/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=3106622600274540307" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3106622600274540307?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3106622600274540307?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/HR75uUM_lfc/amazon-ec2-97-complete.html" title="Amazon EC2, 97% Complete!" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/_FRVMr9ja1bU/SAM8wqcd3wI/AAAAAAAAAM8/ML9EbzWyYoM/s72-c/tech-support-funny-cat-pic.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/04/amazon-ec2-97-complete.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkcFQn05fCp7ImA9WxZUEUo.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-3924088646143019737</id><published>2008-04-02T02:32:00.002+03:00</published><updated>2008-04-03T02:13:33.324+03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-04-03T02:13:33.324+03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="unittest" /><category scheme="http://www.blogger.com/atom/ns#" term="facebook" /><category scheme="http://www.blogger.com/atom/ns#" term="phpunit" /><title>Regression Testing A Facebook Application</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://farm4.static.flickr.com/3092/2384037788_26608d49b6_o.png"&gt;&lt;img style="float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 200px;" src="http://farm4.static.flickr.com/3092/2384037788_26608d49b6_o.png" border="0" alt="" /&gt;&lt;/a&gt;You know how it feels like when you launch a facebook app, and it breaks the minute you hit the 50,000 users mark? Well, I do. Facebook applications are hard to keep because they require constant maintenance. With an ever-changing API, and users from all over the world and every thinkable configuration accessing your code, it's just a matter of time till it collapses under. and. slowly. dies.&lt;br /&gt;&lt;br /&gt;Luckily! You don't have to repeat the same mistakes and run a daily black box test using this nifty PHP class I wrote. Simply put, it's a class that extends PHPUnit_Framework_TestCase for use with PHPUnit toolkit. First, make a new testcase that extends FacebookTestBase. You will have to initialize it with your API_KEY, an email and a password of a test user (on facebook).&lt;br /&gt;&lt;br /&gt;All FaceookTestBase.class.php does is to login into the configured Facebook user's account before fetching any pages from urls prefixed with http://apps.facebook.com. Call $this-&gt;loginFacebook() once, and subsequently to $this-&gt;fetchFacebook($url). Note that if loginFacebook() fails, the testcase fails as well. You are here to debug your application, not facebook.&lt;br /&gt;&lt;br /&gt;Another minor note, I chose to use wget as it has a nice working session cookies and a cookie jar. Feel free to change the implementation to PEAR or Zend_Framework if you see a need. It works for me, so I'm quite happy with it :)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/p/fbphpunittest/source/browse/trunk/FacebookTestBase.class.php"&gt;FacebookTestBase.class.php&lt;/a&gt; source at &lt;a href="http://code.google.com/"&gt;code.google.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-3924088646143019737?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/i1dIKzrQe2E" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/3924088646143019737/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=3924088646143019737" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3924088646143019737?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3924088646143019737?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/i1dIKzrQe2E/regression-testing-facebook-application.html" title="Regression Testing A Facebook Application" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/04/regression-testing-facebook-application.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EAQnYyeip7ImA9WxZWFk8.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-189419922131170534</id><published>2008-03-15T23:14:00.018+02:00</published><updated>2008-03-16T00:54:03.892+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-16T00:54:03.892+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="ruby" /><category scheme="http://www.blogger.com/atom/ns#" term="framework" /><category scheme="http://www.blogger.com/atom/ns#" term="zend" /><title>How Zend_Framework Is Losing The Wrong War</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_FRVMr9ja1bU/R9xIj0RiVGI/AAAAAAAAAK0/3jbTTshk-Jg/s1600-h/ruby-zend-fight.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_FRVMr9ja1bU/R9xIj0RiVGI/AAAAAAAAAK0/3jbTTshk-Jg/s400/ruby-zend-fight.jpg" alt="" id="BLOGGER_PHOTO_ID_5178093451734045794" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;Unless you have been living under a rock for the past year, you have surely heard of the war between Rails and PHP. There are no casualties, no land mines and no tv coverage. Zend_Framework is fighting back with full power, but shooting in the wrong direction.&lt;br /&gt;&lt;br /&gt;I've been a bystander and just minding my own business. You see, I'm fairly comfortable with php; Over the years I have built up a nice framework of my own, with my own tools and my own reusable classes. Idea converts into a prototype in 60 seconds.&lt;br /&gt;&lt;br /&gt;I am subscribed to Zend's rss feed, and I just grab my head and scream (silently) "what is wrong with them" with every new post. Zend is clearly trying to impress everybody with their new toolkit. After all, it has millions of lines, thousands of unit tests, and enough documentation to put insomniac to sleep. Framework talks to Flickr, Google and whatnotapi. Screencasts, conferences, hey, team with us, we're perfect!&lt;br /&gt;&lt;br /&gt;But this is where they get it all wrong. People who were enlightened by Ruby don't care for all of this. There's one and only reason why they moved from one language and framework to another. Forget screencasts and forget about 3rd party apis. Ruby'kers are after one thing, how long it takes them to get an app up and running, from scratch to full implementation.&lt;br /&gt;&lt;br /&gt;Although I'm not Rails user myself, I've always been stunned by their great propaganda. When visiting their &lt;a href="http://www.rubyonrails.org/"&gt;homebase&lt;/a&gt;, you are welcome with a peaceful slogna &lt;b&gt;&lt;i&gt;Web development that doesn't hurt&lt;/i&gt;&lt;/b&gt;. Pan left across the border, and you have Zend's read-documentation-and-attent-webinars front.&lt;br /&gt;&lt;br /&gt;(sorry, blogspot killed my &amp;lt;table&amp;gt;)&lt;br /&gt;&lt;dl style="margin: 0px; padding: 0px;"&gt;&lt;br /&gt;   &lt;dt&gt;&lt;b&gt;&lt;i&gt;Zend_Framework&lt;/i&gt;&lt;/b&gt;&lt;/dt&gt;&lt;br /&gt;   &lt;dd&gt;Can do anything but make coffee&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Strongest point: RSS, 3rd Party api&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Super flexible code&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Step 1: download or read documentation&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Used in projects you never heard of&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Quite techie&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Monolithic package&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;LAMP&lt;/dd&gt;&lt;br /&gt;   &lt;dt&gt;&lt;b&gt;&lt;i&gt;Ruby on Rails&lt;/i&gt;&lt;/b&gt;&lt;/dt&gt;&lt;br /&gt;   &lt;dd&gt;Minimal framework, core with database&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Strongest point: ActiveRecord&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Let's write the shortest code possible, okay?&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Step 1: hey, see how I write a weblog in 58 lines!&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Riding the whole 37 Signals / "Getting Real" success story&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;(it matters!) All samples are sexy with great webdesign&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Install additional gems at will&lt;/dd&gt;&lt;br /&gt;   &lt;dd&gt;Err, nothing out of the box?&lt;/dd&gt;&lt;br /&gt;&lt;/dl&gt;&lt;br /&gt;While Ruby on Rails converts web developers to their religion, Zend is fighting with Zend_Framework against PHP+PEAR. PEAR has great classes, why did you have to reinvent the wheel?&lt;br /&gt;&lt;br /&gt;Can't there ever be peace?&lt;br /&gt;:)&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;digg_url = 'http://digg.com/programming/How_Zend_Framework_Is_Losing_The_Wrong_War';&lt;/script&gt;&lt;br /&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-189419922131170534?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/jj3_ac1xm0U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/189419922131170534/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=189419922131170534" title="22 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/189419922131170534?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/189419922131170534?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/jj3_ac1xm0U/how-zendframework-is-losing-wrong-war.html" title="How Zend_Framework Is Losing The Wrong War" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/_FRVMr9ja1bU/R9xIj0RiVGI/AAAAAAAAAK0/3jbTTshk-Jg/s72-c/ruby-zend-fight.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">22</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/03/how-zendframework-is-losing-wrong-war.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ak8CRns9eSp7ImA9WxZQFE4.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-4556969408412718280</id><published>2008-02-19T18:20:00.003+02:00</published><updated>2008-02-19T18:34:27.561+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-02-19T18:34:27.561+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="amazon s3" /><title>THAT Amazon AWS Bug Again!</title><content type="html">&lt;a href="http://www.flickr.com/photos/gawd0r/2276796519/" title="Amazon AWS bug! by gawd, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2374/2276796519_643222e331_o.jpg" width="485" height="133" alt="Amazon AWS bug!" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;OMFG. I shrieked like the &lt;a href="http://www.youtube.com/watch?v=pFlcqWQVVuU"&gt;Nintendo-64-Kid&lt;/a&gt; when it first happened (and those weren't tears of happiness, I tell ya.) It's a big slap in the face when you upload hundreds of GBs to S3, and then see a "You Do Not Have an Amazon Web Services Account" message. &lt;br /&gt;&lt;br /&gt;Third time around, I capable of keeping calm and going through this safely. One of the things that most scared me about AWS (and the reason why I will never host my httpd at ec2,) is that there's no phone contact. There's a single email address that you can dig up on aws homepage for all your support needs. &lt;br /&gt;&lt;br /&gt;So, what really happened here? Amazon denies me access to my aws account, &lt;span style="font-weight:bold;"&gt;while my api credentials work fine!&lt;/span&gt;. My webserver is operational, new files are being uploaded every minute. I get monthly bills and all is well, but the web is inaccessible.&lt;br /&gt;&lt;br /&gt;A couple of months ago, I had the same problem. A nice Amazon support techie sent me an email that he heard from a co-worker, that if you have an Associates account by the same email, then aws dashboard breaks. Being the lazy person that I am, I don't wish to move my aws account to a different user (and mess around with custom user privileges on S3,) nor do I wish to claim my check from Associates and change all my links. &lt;br /&gt;&lt;br /&gt;Wish I had a rabbit to pull from a hat and tell you how to get around it. But there isn't. So until Amazon fixes this bug, or at least restores my account, remember you have been warned. Don't mix business (aws) with pleasure (associates.) :D&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-4556969408412718280?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/YZBq4lg5MdI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/4556969408412718280/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=4556969408412718280" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4556969408412718280?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4556969408412718280?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/YZBq4lg5MdI/that-amazon-aws-bug-again.html" title="THAT Amazon AWS Bug Again!" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/02/that-amazon-aws-bug-again.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0IAQX47eCp7ImA9WxZXFEo.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-4804047005043069880</id><published>2008-02-10T13:51:00.002+02:00</published><updated>2008-03-02T19:39:00.000+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-03-02T19:39:00.000+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="administration" /><title>Moving To My New Server in 6 Steps (and 0 mistakes)</title><content type="html">(or, how to move hosting and servers without your users noticing..)&lt;br /&gt;&lt;br /&gt;I am writing this post during an ongoing server upgrade. You would assume I can do this blindfolded by now, after all, this is my 6th server move in 2 years. I attract bad hosting programs like flies to a banana. It's really a touchy subject, I don't want to talk about it. I said, I don't want to talk about it!&lt;br /&gt;&lt;br /&gt;Moving servers always gets my hands sweaty. My server hosts several websites with hundreds of thousands of daily page views. I will be quoted on this, but "&lt;span style="font-weight: bold;"&gt;downtime is money&lt;/span&gt;". Every second your website is down, it is driving your users away. In this post I will cover how to move to a new server with as short period of downtime as possible.&lt;br /&gt;&lt;br /&gt;The straightforward procedure would be:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Take webserver A offline&lt;/li&gt;&lt;li&gt;Copy files and backup database (snapshot)&lt;/li&gt;&lt;li&gt;Deploy files and database onto server B&lt;/li&gt;&lt;li&gt;Start server B&lt;/li&gt;&lt;li&gt;Make dns record point to B&lt;/li&gt;&lt;li&gt;(wait 24-48 hours for dns to update)&lt;/li&gt;&lt;/ol&gt;It's not going to work. Twenty-four hours of downtime? Better make a farewell party and say byebye to your userbase. You don't want that, so let's get down to business:&lt;br /&gt;&lt;br /&gt;Prerequisites:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Regression test&lt;/span&gt;: prepare a sanity check script. I know you can do this manually, but it is a lot of work to check that new server handles the load, has SpamAssassin score that is less or equal to original server, has sendmail configured and working properly, that pages render successfully, database is secure, server is firewalled. I can go on forever with this.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Seperate servers access&lt;/span&gt;: make sure you are able to access both servers at the same time. You can use ip address or server alias. I name the old server www1. and the new server www. That way, I can always access the old server if I'm missing files or something went wrong.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Backup backup backup: &lt;/span&gt;better safe than sorry. If you are an administrator, you probably have a backup script that creates a restore-point. This is a good time to run it.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Server-is-being-upgraded copy&lt;/span&gt;: let your users know that you are currently upgrading and apologize in advance for the inconvenience.&lt;/li&gt;&lt;/ul&gt;Now that you have the ingredients, you are ready to begin cooking. Here is the procedure I use myself, and it goes something like this:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Copy files from A to B&lt;/li&gt;&lt;li&gt;Redirect all traffic to a static page (server is being upgraded)&lt;/li&gt;&lt;li&gt;Make server read only (nothing is written to database, no new files are created)&lt;/li&gt;&lt;li&gt;Export database on A and import onto database on B&lt;/li&gt;&lt;li&gt;Change www to point to B&lt;/li&gt;&lt;li&gt;Change .htaccess on A to redirect properly to&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;After 24-48 hours, all traffic to A will slow down to a halt, and it is safe to turn the server down (which is now only hosting an .htaccess with one redirect.)&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/kt/120468504/" title=""&gt;&lt;img src="http://farm1.static.flickr.com/43/120468504_c68075f6d7.jpg" alt="" height="419" width="500" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;digg_url = 'http://digg.com/programming/Ole_Server_Hosting_Switch_er_Roo_2';&lt;/script&gt;&lt;br /&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-4804047005043069880?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/iQMqOJ5QQ3s" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/4804047005043069880/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=4804047005043069880" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4804047005043069880?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4804047005043069880?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/iQMqOJ5QQ3s/ole-server-hosting-switch-er-roo.html" title="Moving To My New Server in 6 Steps (and 0 mistakes)" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/02/ole-server-hosting-switch-er-roo.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE8MQXo9eip7ImA9WxZSFEs.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-5910615559826639397</id><published>2008-01-27T22:22:00.000+02:00</published><updated>2008-01-27T22:48:00.462+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-27T22:48:00.462+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="security" /><title>How Logwatch Saved My Life</title><content type="html">&lt;a href="http://www.logwatch.org"&gt;Logwatch&lt;/a&gt; is an uber little collection of scripts for unix which can really save your life. It dodges bullets and stops a speeding train. It slows down global warming, and it can simply tell you what has been going on with your server.&lt;br /&gt;&lt;br /&gt;Day by day, logwatch is sending me an email. I love getting emails, and mail from a daemon are no different. Logwatch's scripts run through my system logs and tell me who logged in from where, fresh installed packages, free disk space and other goodies like that -- the stuff that go behind the scenes and normally goes uninformed.&lt;br /&gt;&lt;br /&gt;Yesterday I installed a bittorrent client package using yum; Just thought I'd try &lt;a href="http://docs.amazonwebservices.com/AmazonS3/2006-03-01/S3Torrent.html"&gt;Amazon S3's bittorrent support&lt;/a&gt;, see how it works. I usually trust yum if were my dog. But today I got me a nice report:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;--------------------- Connections (secure-log) Begin ------------------------&lt;br /&gt;&lt;br /&gt;New Users:&lt;br /&gt;  torrent (101)&lt;br /&gt;&lt;br /&gt;New Groups:&lt;br /&gt;  torrent (102)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;---------------------- Connections (secure-log) End -------------------------&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;What's this? I have a new user on my server? That's odd, I don't remember inviting anybody! Luckily, there were no logins using this user. But this is how logwatch saved the day (no speeding locomotion required). Clearly the user was removed and threat level is down to White.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-5910615559826639397?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/ESQ5Uzg56c0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/5910615559826639397/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=5910615559826639397" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/5910615559826639397?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/5910615559826639397?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/ESQ5Uzg56c0/how-logwatch-saved-my-life.html" title="How Logwatch Saved My Life" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/01/how-logwatch-saved-my-life.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0EGR3Y_fip7ImA9WxZTE04.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-6728233582868817835</id><published>2008-01-13T22:40:00.000+02:00</published><updated>2008-01-14T19:27:06.846+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-14T19:27:06.846+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="amazon s3" /><title>Going Bankrupt With Amazon S3</title><content type="html">You had everything planned out: your new video hosting service rocks and people love you from day one. You chose S3 for its cheap traffic and figured ads would cover all expenses. Your traffic grows rapidly and every day more sites link in, bringing swarms of new visitors. Life is just great. Your TV set has just been repossessed by the bank. Hold on, what the hell just happened?&lt;br /&gt;&lt;br /&gt;Let's rewind and replay slowly.&lt;br /&gt;&lt;br /&gt;Since its introduction, S3 has been used widely by new players for file storage and hosting due its cheap costs and no upfront payments. But not taking AWS Pirates into consideration, S3 can end up very expensive and hazardous to your health.&lt;br /&gt;&lt;br /&gt;5 Rules of Thumb: ignore at your peril.&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;1. Never give anonymous access to your files on S3&lt;br /&gt;&lt;/span&gt;&lt;span&gt;There is never a reason to, is there? This directly translates to letting people &lt;span style="font-style: italic;"&gt;you don't know &lt;/span&gt;consume bandwidth you pay for, without being able to defend yourself. It's not worth it&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;. &lt;/span&gt;&lt;span&gt;(Scary thought: what if a competitor wants to drive you broke?)&lt;/span&gt;&lt;span style="font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;2. Enable access-logs on your S3 bucket&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span&gt;Track down leechers as soon as possible. Amazon's access log are similar to apache's and are on best-effort only. Keep a record of bandwidth used by each file you are hosting. Block those that go over-quota.&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;3. When possible, pass Expires to S3&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;Limit access to S3 storage by signing url and appending an Expires parameter. This will require users to request files through your servers, and not directly from S3; and will give you more control of who gets what and when.&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;span style="font-style: italic;"&gt;4. Serve files from your own servers&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;Most hosting packages are equipped with a large bandwidth quota, which can also be expanded later if required. GoDaddy offers additional 500gb traffic for $20 (traffic is calculated as rx and tx combined), that's $0.04/gb, instead of $0.18/gb out.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;&lt;img src="http://www.tqlkg.com/3e81fz2rxvGJPHJJOMGIHKOPLHN" border="0" height="1" width="1" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. Use reverse-proxy against S3&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Harness the power of S3 as a secondary storage platform. Configure a reverse-proxy to download locally unavailable files from S3, and serve locally. Squid has a killer solution with lru caching. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/gawd0r/2180456847/" title="Amazon S3 Bankruptcy by gawd, on Flickr"&gt;&lt;img src="http://farm3.static.flickr.com/2156/2180456847_a661d01184_o.png" alt="Amazon S3 Bankrupcy" border="0" height="72" width="496" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;digg_url = 'http://digg.com/programming/Going_Bankrupt_With_Amazon_S3';&lt;/script&gt;&lt;br /&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-6728233582868817835?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/7iX_fCG172I" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/6728233582868817835/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=6728233582868817835" title="9 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/6728233582868817835?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/6728233582868817835?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/7iX_fCG172I/going-bankrupt-with-amazon-s3.html" title="Going Bankrupt With Amazon S3" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">9</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/01/going-bankrupt-with-amazon-s3.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck8EQXc-eyp7ImA9WB9aGUs.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-977320835358889483</id><published>2008-01-10T11:50:00.001+02:00</published><updated>2008-01-10T12:26:40.953+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-10T12:26:40.953+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="sexy" /><title>Vote For Leah Culver!</title><content type="html">Wired is having their annual Sexiest Geek contest again. It's not a newsflash or anything, just wanted to make sure you voted for the Übersexy &lt;a href="http://leahculver.com/"&gt;Leah Culver&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Have a better afterlife, vote for &lt;a href="http://www.wired.com/culture/lifestyle/news/2007/12/YE_sexy_geeks"&gt;The Sexiest Geek of 2007&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_FRVMr9ja1bU/R4Xt6ldYW9I/AAAAAAAAAHw/o0TBZRG6b2s/s1600-h/1163965441_70f9947e6f.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_FRVMr9ja1bU/R4Xt6ldYW9I/AAAAAAAAAHw/o0TBZRG6b2s/s400/1163965441_70f9947e6f.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5153786939338939346" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-977320835358889483?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/-VVv5Entqtw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/977320835358889483/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=977320835358889483" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/977320835358889483?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/977320835358889483?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/-VVv5Entqtw/vote-for-leah-culver.html" title="Vote For Leah Culver!" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_FRVMr9ja1bU/R4Xt6ldYW9I/AAAAAAAAAHw/o0TBZRG6b2s/s72-c/1163965441_70f9947e6f.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/01/vote-for-leah-culver.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkAGR3s6cCp7ImA9WB9aFUs.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-5763005214745974985</id><published>2008-01-05T20:49:00.000+02:00</published><updated>2008-01-05T21:18:46.518+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-05T21:18:46.518+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="atime" /><category scheme="http://www.blogger.com/atom/ns#" term="linux" /><title>Atime in No Time</title><content type="html">Consider the following for example:&lt;br /&gt;&lt;br /&gt;I created an empty file called "tempfile" by running:&lt;br /&gt;&lt;pre    style="border: 1px solid rgb(204, 204, 204); padding: 4px; overflow: auto; width: 600px;font-family:Courier;font-size:11px;color:black;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[root@ec2-fx1 tmp]# touch tempfile&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;I checked the ext3 filesystem status by running:&lt;br /&gt;&lt;pre    style="border: 1px solid rgb(204, 204, 204); padding: 4px; overflow: auto; width: 600px;font-family:Courier;font-size:11px;color:black;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[root@ec2-fx1 tmp]# stat tempfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;File: `tempfile'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Device: 801h/2049d      Inode: 340709      Links: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 0, 102);"&gt;Access: 2008-01-05 07:54:38.000000000 -0500&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Modify: 2008-01-05 07:54:38.000000000 -0500&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Change: 2008-01-05 07:54:38.000000000 -0500&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Notice the line marked in blue. It indicates the file's &lt;span style="font-style: italic;"&gt;access time&lt;/span&gt;, known also as &lt;span style="font-style: italic;"&gt;atime&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;A few moments later, I attempted to read that empty file by running:&lt;br /&gt;&lt;pre    style="border: 1px solid rgb(204, 204, 204); padding: 4px; overflow: auto; width: 600px;font-family:Courier;font-size:11px;color:black;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[root@ec2-fx1 tmp]# cat tempfile&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;When I ran stat again, this is what was shown:&lt;br /&gt;&lt;pre    style="border: 1px solid rgb(204, 204, 204); padding: 4px; overflow: auto; width: 600px;font-family:Courier;font-size:11px;color:black;"&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;[root@ec2-fx1 tmp]# stat tempfile&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  File: `tempfile'&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;  Size: 0               Blocks: 0          IO Block: 4096   regular empty file&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Device: 801h/2049d      Inode: 340709      Links: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 102); font-weight: bold;"&gt;Access: 2008-01-05 07:55:53.000000000 -0500&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Modify: 2008-01-05 07:54:38.000000000 -0500&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 0, 0);"&gt;Change: 2008-01-05 07:54:38.000000000 -0500&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Oh oh, reading a file results in writing to disk. Yeah, but that can't be much, right? &lt;span style="font-style: italic; font-weight: bold;"&gt;Wrong! &lt;/span&gt;For 100,000 http requests, your webserver will cause (at least) 100,000 disk io writes. Multiply that by io-wait penalty and (possibly) raid mirror lag. A lot!&lt;br /&gt;&lt;br /&gt;No worries, ext3 has a mount flag to disable this feature. Luckily there are two ways to remove this annoyance. One is at boot time (when kernel mounts the filesystem,) and the second is via command line.&lt;br /&gt;&lt;br /&gt;To disable this feature for the next boot, edit your /etc/fstab and append ",noatime" to the 4th field of the ext3 mounting point of your choice. Change will not take effect until filesystem is mounted on the next reboot.&lt;br /&gt;&lt;br /&gt;You can also disable this right now by running (e.g. for root file system):&lt;br /&gt;&lt;pre face="Courier" size="11px" color="black" style="border: 1px solid rgb(204, 204, 204); padding: 4px; overflow: auto; width: 600px; color: rgb(0, 0, 0);"&gt;mount / -o remount,noatime&lt;/pre&gt;Happy Serving!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-5763005214745974985?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/BchRP6ZEvW4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/5763005214745974985/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=5763005214745974985" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/5763005214745974985?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/5763005214745974985?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/BchRP6ZEvW4/atime-in-no-time.html" title="Atime in No Time" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/01/atime-in-no-time.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0QCRXk-eip7ImA9WB9aGEQ.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-7288288764335792662</id><published>2008-01-04T12:04:00.000+02:00</published><updated>2008-01-09T17:09:24.752+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-09T17:09:24.752+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="analytics" /><title>Faster Google Analytics For A Better Life</title><content type="html">I love &lt;a href="http://www.google.com/analytics/"&gt;Google Analytics&lt;/a&gt;, I really do. It provides me vital information about my service: where are people coming from and what are they doing on my website.&lt;br /&gt;&lt;br /&gt;Recently I worked on optimizing my site: the faster I make the service available for its users, the happier they are. While at process, I realized that some of my javascript code depended on a callback of &lt;a href="http://www.w3schools.com/jsref/jsref_onload.asp"&gt;onload&lt;/a&gt;. Only when the dom document is ready, the event is fired. And the most disturbing thing was that I realized that the bottleneck is urchin.js, the file served by Google!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Why is it slow?&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;As fast as Google's servers are, they still need to process &lt;span style="font-style: italic;"&gt;millions &lt;/span&gt;of requests&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;urchin.js is hosted at www.google-analytics.com, which requires a dns lookup by client&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Client is required to open a new tcp connection&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Why local serving is faster?&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Clients already have an established connection with you (you enabled &lt;span style="font-style: italic;"&gt;keepalive &lt;/span&gt;in apache, right?)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;One less dns lookup&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;How is it done?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It would seem a lot of work, but the solution is rather simple and consists of two things:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Get a daily version of urchin.js&lt;/li&gt;&lt;li&gt;Change tracker code to serve local copy instead of one from Google&lt;/li&gt;&lt;/ol&gt;For your own sake, I hope you have a single point of change for the second item.&lt;br /&gt;&lt;br /&gt;Getting a daily update of urchin.js requires a scheduled task. If you are using a dedicated or a vps hosting, the straightforward solution would be via crontab. Most cPanel users have access to their crontab, but if not, do not despair, I have a solution for you as well.&lt;br /&gt;&lt;br /&gt;Step 1: Log in onto your shell account, and edit your crontab file. This is done either by running "crontab -e" or by editing /etc/crontab.&lt;br /&gt;&lt;br /&gt;Step 2: In your crontab file, append this line:&lt;br /&gt;&lt;pre style="border: 1px solid rgb(204, 204, 204); padding: 4px; overflow: auto; font-family: Courier; font-size: 11px; color: black; width: 600px;"&gt;0 0 * * * apache (sh /usr/local/bin/fetch-urchin.sh) &gt;/dev/null 2&gt;&amp;amp;1&lt;br /&gt;&lt;/pre&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;Note: if you are using a different user for apache, be sure to replace that value. I use /usr/local/bin for my scripts, but feel free to change this as you see fit.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Step 3: Create a file called /usr/local/bin/fetch-urchin.sh with this content:&lt;br /&gt;&lt;br /&gt;&lt;pre style="border: 1px solid rgb(204, 204, 204); padding: 4px; overflow: auto; font-family: Courier; font-size: 11px; color: black; width: 600px;"&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;wget --quiet --output-document /tmp/.urchin.js "http://www.google-analytics.com/urchin.js"&lt;br /&gt;if [ "$?" -eq "0" ]; then&lt;br /&gt;    chmod 0644 /tmp/.urchin.js&lt;br /&gt;    mv /tmp/.urchin.js /var/www/html/urchin.js&lt;br /&gt;fi&lt;br /&gt;&lt;/pre&gt;&lt;span style=";font-family:arial;font-size:85%;"  &gt;Again, if you're hosting your files from a different path, make sure you change it.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;After creating that file, change permissions by typing "&lt;span style="font-family:courier new;"&gt;chmod 0755 /usr/local/bin/fetch-urchin.sh&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;Step 4: Run this script manually, to get a copy of the latest urchin.js.&lt;br /&gt;&lt;br /&gt;Step 5: Reload crond (daemon that runs the jobs) by running "&lt;span style="font-family:courier new;"&gt;/etc/init.d/crond reload&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;Alternative solution: shared-hosting users, and users who don't have write access to crontab can use this trick: in one of your scripts, check the modification date of "urchin.js", if it's more than 24 hours ago, use &lt;span style="font-family:courier new;"&gt;file_get_contents&lt;/span&gt; and then &lt;span style="font-family:courier new;"&gt;file_put_contents&lt;/span&gt; to fetch and store the new version.&lt;br /&gt;&lt;br /&gt;Fast &amp;amp; Happy Serving, Everyone!&lt;br /&gt;&lt;script type="text/javascript"&gt;digg_url = 'http://www.digg.com/programming/Faster_Google_Analytics_For_A_Better_Life';&lt;/script&gt;&lt;br /&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-7288288764335792662?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/624s5aHJwjo" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/7288288764335792662/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=7288288764335792662" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/7288288764335792662?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/7288288764335792662?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/624s5aHJwjo/faster-google-analytics-for-better-life.html" title="Faster Google Analytics For A Better Life" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/01/faster-google-analytics-for-better-life.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUEHRXY7eip7ImA9WB9aGEo.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-3994651604553447526</id><published>2008-01-03T17:54:00.000+02:00</published><updated>2008-01-09T13:20:34.802+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-09T13:20:34.802+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="security" /><category scheme="http://www.blogger.com/atom/ns#" term="lib_filter" /><title>Sanitazing User Generated Content With lib_filter</title><content type="html">Your new killer webapp has spawned millions of followers, TechCrunch has blogged you, and Google loves you. Now spammers worldwide got you on their radar. Oh OH.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/"&gt;Flickr&lt;/a&gt;'s uberhacker &lt;a href="http://www.iamcal.com/"&gt;Cal Henderson&lt;/a&gt; has published &lt;a href="http://code.iamcal.com/php/lib_filter/"&gt;lib_filter&lt;/a&gt;, a php library for keeping user submitted text friendly and clean. Taking care of:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Tag Balancing&lt;/span&gt; (e.g. &amp;lt;b&amp;gt;&amp;lt;i&amp;gt;oops!&amp;lt;/b&amp;gt;)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Tag Formation&lt;/span&gt; (e.g. &amp;lt;&amp;lt;script&amp;gt;script&amp;lt;script&amp;gt;&amp;gt;, what happens if you strip &amp;lt;script&amp;gt;?)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Allowed Protocols&lt;/span&gt; (e.g. remove all "javascript:" href references)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;Allowed Attributes &lt;/span&gt;(e.g. strict &amp;lt;a&amp;gt; to contain only href and target attributes)&lt;/li&gt;&lt;/ul&gt;Sources are very friendly and are distributed with a thorough harness test. I strongly recommend spending the hour it takes to implement it on your website. It has saved my life already.&lt;br /&gt;&lt;br /&gt;Anybody wants to share a success story?&lt;br /&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;digg_url = 'http://www.digg.com/programming/Sanitazing_User_Generated_Content_With_lib_filter';&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;script src="http://digg.com/tools/diggthis.js" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-3994651604553447526?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/aqEkCWHdUmg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/3994651604553447526/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=3994651604553447526" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3994651604553447526?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/3994651604553447526?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/aqEkCWHdUmg/sanitazing-user-generated-content-with.html" title="Sanitazing User Generated Content With lib_filter" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/01/sanitazing-user-generated-content-with.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0cDSHkyeip7ImA9WB9aEk8.&quot;"><id>tag:blogger.com,1999:blog-218735987047187733.post-4672803984397660466</id><published>2008-01-01T23:35:00.000+02:00</published><updated>2008-01-02T00:04:39.792+02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-01-02T00:04:39.792+02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="introduction" /><title>Hello World \n</title><content type="html">I guess there is no easier way to start a blog. For the past few days, I have been firing up a new browser window and stare at a blank page wondering what counts as a good &lt;span style="font-style: italic;"&gt;first-post&lt;/span&gt;?&lt;span style="font-style: italic;"&gt; &lt;/span&gt;Next to my monitor I keep a handwritten list of articles to write and items to discuss. It's quite long, so lots of fun ahead. Now that I broke the ice, I can just dive right in.&lt;br /&gt;&lt;br /&gt;Before we depart, let me introduce myself. My name is Gil Megidish, and I'm the guy behind numerous projects, such as &lt;a href="http://www.dumpr.net/"&gt;dumpr.net&lt;/a&gt;, &lt;a href="http://www.shokolada.com/"&gt;shokolada.com&lt;/a&gt;, four facebook applications, three game rewrites, several unix projects, and many project contributions. I have been coding for most processors, and believe programming is a way of modern religion. My &lt;span style="font-style: italic;"&gt;other&lt;/span&gt; blog is &lt;a href="http://www.megidish.net/"&gt;megidish dot net&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This weblog is where I will share my experiences with designing, maintaining, programming, optimizing, and networking websites and projects. Feel free to introduce yourself; Let be the first to greet: "&lt;span style="font-weight: bold; font-style: italic;"&gt;Nice to meet you&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.flickr.com/photos/gawd0r/702042404/" title="Me and My XBOX360 by gawd, on Flickr"&gt;&lt;img src="http://farm2.static.flickr.com/1122/702042404_233c47b694.jpg" width="500" height="375" alt="Me and My XBOX360" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/218735987047187733-4672803984397660466?l=www.codingaloud.com' alt='' /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CodingAloud/~4/k78JbAnQyRQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://www.codingaloud.com/feeds/4672803984397660466/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=218735987047187733&amp;postID=4672803984397660466" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4672803984397660466?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/218735987047187733/posts/default/4672803984397660466?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/CodingAloud/~3/k78JbAnQyRQ/hello-world-n.html" title="Hello World \n" /><author><name>Gil Megidish</name><uri>http://www.blogger.com/profile/09524229802942306597</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="13632129748259532622" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://www.codingaloud.com/2008/01/hello-world-n.html</feedburner:origLink></entry></feed>
