<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8908829452516573489</id><updated>2024-10-06T21:54:21.567-07:00</updated><category term="Ruby"/><category term="WPF"/><category term="memory leak"/><category term="php"/><category term="rails"/><category term="C#"/><category term="Design"/><category term="Dynamic-languages"/><category term="Nhibernate"/><category term="Rubymine"/><category term="UnitTest"/><category term="asynctask"/><category term="heroku"/><category term="mongodb"/><category term="mongoid"/><category term="session"/><category term=".net"/><category term="Binding"/><category term="Fluent Nhibernate"/><category term="IEquatable"/><category term="OSX"/><category term="PropertyChanged"/><category term="Resources"/><category term="Rx"/><category term="SpineJS js javascript mvc"/><category term="Styles"/><category term="TDD"/><category term="TPL"/><category term="Utilities"/><category term="android"/><category term="cyber"/><category term="delayed job"/><category term="documentation"/><category term="ide"/><category term="javascript"/><category term="job"/><category term="language"/><category term="linq"/><category term="locale"/><category term="localization"/><category term="mock"/><category term="mvvm"/><category term="php async"/><category term="pragmatic"/><category term="queueing"/><category term="startup"/><category term="thread"/><category term="wcf"/><title type='text'>https://kinnrot.github.io - Chen Kinnrot - Keep it simple - go to kinnrot.github.io</title><subtitle type='html'>My new blog is at https://kinnrot.github.io</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-2160205927889625651</id><published>2017-07-18T04:42:00.003-07:00</published><updated>2017-07-18T04:49:45.290-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Watch out for reference duplication instead of instance duplication</title><content type='html'>&lt;br /&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #c7bab9; font-family: &#39;mononoki&#39;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;# This code will generate 96 instances&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #c7bab9; font-family: &#39;mononoki&#39;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: white;&quot;&gt;ViewStatData &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Struct&lt;/span&gt;.new(&lt;span style=&quot;color: #6d9cbe;&quot;&gt;:&lt;/span&gt;&lt;span style=&quot;background-color: #283b5e; color: #6d9cbe;&quot;&gt;total&lt;/span&gt;, &lt;span style=&quot;color: #6d9cbe;&quot;&gt;:target&lt;/span&gt;, &lt;span style=&quot;color: #6d9cbe;&quot;&gt;:ratio&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #c7bab9; font-family: &#39;mononoki&#39;; font-size: 11.3pt;&quot;&gt;&lt;pre style=&quot;font-family: mononoki; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;96&lt;/span&gt;.times.map {&lt;span style=&quot;color: #cc7833;&quot;&gt;|&lt;/span&gt;_&lt;span style=&quot;color: #cc7833;&quot;&gt;|&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;ViewStatData&lt;/span&gt;.new(&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;)}&lt;/pre&gt;
&lt;pre style=&quot;font-family: mononoki; font-size: 11.3pt;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;font-family: mononoki; font-size: 11.3pt;&quot;&gt;# And this will not, it&#39;ll generate 96 pointers&lt;/pre&gt;
&lt;pre style=&quot;font-family: mononoki; font-size: 11.3pt;&quot;&gt;&lt;pre style=&quot;font-family: mononoki; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;[ViewStatData&lt;/span&gt;.new(&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;, &lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;)] * 96&lt;/pre&gt;
&lt;pre style=&quot;font-family: mononoki; font-size: 11.3pt;&quot;&gt;# So Watch out!!!&lt;/pre&gt;
&lt;/pre&gt;
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/2160205927889625651/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2017/07/watch-out-for-reference-duplication.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2160205927889625651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2160205927889625651'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2017/07/watch-out-for-reference-duplication.html' title='Watch out for reference duplication instead of instance duplication'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-19882498198727742</id><published>2017-06-05T05:11:00.001-07:00</published><updated>2017-06-05T05:11:10.286-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Design"/><category scheme="http://www.blogger.com/atom/ns#" term="Dynamic-languages"/><category scheme="http://www.blogger.com/atom/ns#" term="memory leak"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Ruby Lazy chunked hash like behavior</title><content type='html'>&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;When we want to iterate a long list, we can simply write a query and get a cursor, ActiveRecord will do all the heavy lifting for us.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;What happens when we need to do some complicated computations on a set of data, which sometimes can be too big to be stored in memory for the entire computing process?&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;This is when we need to start being more creational.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;I&#39;d like to introduce what I came up with.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;The problem:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;- Complex calculation on time based data series for a period of 3 months.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;- Each calculation may depends on previous one and on future and past data.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;- Must be in order.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;- When fetching all data server crash on memory.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;The solution:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;I wanted to do the most minor code change possible, and currently the data was accessed via a hash.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;I decided to encapsulate the hash with something I called lazy chunked hash (tried google it see it as standard behavior in clojure).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;It looks like this:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #e6e1dc; font-family: &#39;mononoki&#39;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;class &lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;ValuesProvider&lt;/span&gt;&lt;span style=&quot;color: white;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;initialize&lt;/span&gt;()
    &lt;span style=&quot;color: #d0d0ff;&quot;&gt;@loaded_date &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;= nil&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #e6e1dc; font-family: &#39;mononoki&#39;; font-size: 11.3pt;&quot;&gt;&lt;pre style=&quot;font-family: mononoki; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;background-color: #3c3c57; color: #d0d0ff;&quot;&gt;    @hash&lt;/span&gt;&lt;span style=&quot;color: #d0d0ff;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Hash&lt;/span&gt;.new(&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;)&lt;/pre&gt;
&lt;span style=&quot;color: #cc7833;&quot;&gt;  end&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;  def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;[]&lt;/span&gt;(time_slot)
    get(time_slot)
  &lt;span style=&quot;color: #cc7833;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;  private&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;  def &lt;/span&gt;&lt;span style=&quot;color: #ffc66d;&quot;&gt;get&lt;/span&gt;(time_slot)
    &lt;span style=&quot;color: #d0d0ff;&quot;&gt;relevant_date &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;= &lt;/span&gt;time_slot.to_date
    &lt;span style=&quot;color: #cc7833;&quot;&gt;unless &lt;/span&gt;&lt;span style=&quot;color: #d0d0ff;&quot;&gt;relevant_date &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;== &lt;/span&gt;&lt;span style=&quot;color: #d0d0ff;&quot;&gt;@loaded_date&lt;/span&gt;&lt;span style=&quot;color: #d0d0ff;&quot;&gt;      &lt;/span&gt;load(&lt;span style=&quot;color: #d0d0ff;&quot;&gt;relevant_date&lt;/span&gt;)
    &lt;span style=&quot;color: #cc7833;&quot;&gt;end&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #d0d0ff;&quot;&gt;@hash&lt;/span&gt;[time_slot.to_i]
  &lt;span style=&quot;color: #cc7833;&quot;&gt;end&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; color: #e6e1dc; font-family: &#39;mononoki&#39;; font-size: 11.3pt;&quot;&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;end&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Pretty simple and does the work, instead of loading the data all at once, the data is being loaded for each day separately, this way we keep it chunky but not too chunky.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;And best part, my code that consume the data, didn&#39;t change because of the [] method, which makes my ValueProvider behave like an array.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;This solution is good when the consumer data request(call for[]) implies on what data should be loaded, which most of the times will, but in some cases it won&#39;t)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/19882498198727742/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2017/06/ruby-lazy-chunked-hash-like-behavior.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/19882498198727742'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/19882498198727742'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2017/06/ruby-lazy-chunked-hash-like-behavior.html' title='Ruby Lazy chunked hash like behavior'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-3878550271401009642</id><published>2015-01-06T13:32:00.001-08:00</published><updated>2015-01-06T13:32:50.639-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="memory leak"/><category scheme="http://www.blogger.com/atom/ns#" term="OSX"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><category scheme="http://www.blogger.com/atom/ns#" term="Rubymine"/><title type='text'>Rubymine on OSX memory issues</title><content type='html'>I found this only today, you should run Rubymine as 32 bit process.&lt;br /&gt;
It works much faster and consume half the memory.&lt;br /&gt;
&lt;br /&gt;
To set this got to the Applicaitons folder right click on rubymine-&amp;gt;get info and check the &quot;open in 32 bit mode&quot;&lt;br /&gt;
&lt;br /&gt;
Thats all!&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/3878550271401009642/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2015/01/rubymine-on-osx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3878550271401009642'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3878550271401009642'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2015/01/rubymine-on-osx.html' title='Rubymine on OSX memory issues'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-284502307179731303</id><published>2014-11-15T07:52:00.001-08:00</published><updated>2014-11-15T07:52:28.548-08:00</updated><title type='text'>Use FactoryGirl And Faker for easy data generation in unit testing (Part1)</title><content type='html'>The &amp;nbsp;most irritating thing in writing tests is the data generation preparation process, sometimes you want to create an object with 20 fields that 10 of them are mandatory but you only care about the value of 1, and you don&#39;t want to mock, cause you interact with other methods and object that fetch this model from db.&lt;br /&gt;
&lt;br /&gt;
To me it happens a lot so I found the FactoryGirl + Faker combination that made my life much more easy and now I can write tests in peace.&lt;br /&gt;
&lt;br /&gt;
To add them just put in Gemfile:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;gem &quot;factory_girl_rails&quot;, &quot;~&amp;gt; 4.0&quot;&lt;br /&gt;
&amp;nbsp; gem &quot;faker&quot;&lt;br /&gt;
&lt;br /&gt;
So lets take a complex sample to explain all there is to know.&lt;br /&gt;
&lt;br /&gt;
We have a User, the User belongs to a Company, User has many tasks.&lt;br /&gt;
&lt;br /&gt;
Company has many irritating mandatory fields&lt;br /&gt;
&lt;br /&gt;
Lets define the Company Factory:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #2b2b2b; border: 0.01mm solid rgb(0, 0, 0); font-size: 12pt; line-height: 100%;&quot;&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;FactoryGirl&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.define &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;do
&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;    factory &lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;:company&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;do
&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;      name {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Name&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.name}
      trp {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      grp {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      budget {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.number(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      cpm {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;70&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      trp_price {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;100&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;700&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      viewer {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;100000&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      total_viewer {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;200000&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      unique_viewer {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;50000&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
      spots {&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Faker&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #6d9cbe;&quot;&gt;Number&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;.between(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;,&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;1000&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;)}
    &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;end
&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;end&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
As you can see I define lots of fields with random values.&lt;br /&gt;
&lt;br /&gt;
Now we can create a company by writing&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
create(:company)&lt;/blockquote&gt;
Or just build one (without save to db) by calling&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
build(:company)&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
That&#39;s all for now, I&#39;ll continue in part2.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;/blockquote&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;/blockquote&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/284502307179731303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/11/use-factorygirl-and-faker-for-easy-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/284502307179731303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/284502307179731303'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/11/use-factorygirl-and-faker-for-easy-data.html' title='Use FactoryGirl And Faker for easy data generation in unit testing (Part1)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-7643080298344045009</id><published>2014-11-15T07:42:00.001-08:00</published><updated>2014-11-15T07:42:21.105-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="language"/><category scheme="http://www.blogger.com/atom/ns#" term="locale"/><category scheme="http://www.blogger.com/atom/ns#" term="localization"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Get the user locale from http headers</title><content type='html'>If you want to provide default localization support for guest user in your website yo can locate their browser locale by the following code:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #2b2b2b; border-color: #000000; border-style: solid; border-width: 0.01mm; font-family: monospace; font-size: 14pt; line-height: 100%; padding: 4px;&quot;&gt;&lt;pre style=&quot;border: 0.01mm solid rgb(0, 0, 0); font-size: 12pt; line-height: 100%;&quot;&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt; extract_locale_from_header
    &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;unless&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt; request.env[&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;&#39;HTTP_ACCEPT_LANGUAGE&#39;&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;].nil?
      &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;return&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt; request.env[&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;&#39;HTTP_ACCEPT_LANGUAGE&#39;&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;].scan(&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;^[a-z]{2}&lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;).first
    &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;end
&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;color: #a5c261;&quot;&gt;&#39;en&#39;
&lt;/span&gt;&lt;span style=&quot;color: #e6e1dc;&quot;&gt;  &lt;/span&gt;&lt;span style=&quot;color: #cc7833;&quot;&gt;end&lt;/span&gt;&lt;/pre&gt;
&lt;/pre&gt;
&lt;br /&gt;
This way you can determine on server side the locale of the user currently entered your site.</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/7643080298344045009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/11/get-user-locale-from-http-headers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7643080298344045009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7643080298344045009'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/11/get-user-locale-from-http-headers.html' title='Get the user locale from http headers'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-1948817847041071638</id><published>2014-11-15T07:34:00.002-08:00</published><updated>2014-11-15T07:35:37.413-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asynctask"/><category scheme="http://www.blogger.com/atom/ns#" term="delayed job"/><category scheme="http://www.blogger.com/atom/ns#" term="heroku"/><category scheme="http://www.blogger.com/atom/ns#" term="queueing"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Dedicating a DJ(Delayed job) worker to a specific queue in heroku.</title><content type='html'>Let&#39;s say you have a vey important procedure that takes a while, and you need to process it in background, but you still want to execute ASAP.&lt;br /&gt;
&lt;br /&gt;
I&#39;m using Delayed Job on Heroku, and could not find a lot of tutorials to do this simple task.&lt;br /&gt;
&lt;br /&gt;
So here is the simplest way to achieve this ability, you can raise a process/deamon &amp;nbsp;that will have only one queue to work on. (Dealyed job worker by default is queue agnostic, just process all jobs)&lt;br /&gt;
&lt;br /&gt;
In procfile:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
urgentworker: &amp;nbsp;QUEUE=urgent bundle exec rake jobs:work&lt;/blockquote&gt;
&lt;br /&gt;
You can call the worker in any name you want and even define multiple workers for multiple queues.&lt;br /&gt;
And in the &quot;urgent&quot; job just define the queue name to be &quot;urgent&quot; the worker will process only jobs in this queue.&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
handle_asynchronously :some_job, :queue =&amp;gt; &quot;urgent&#39;&lt;/blockquote&gt;
&lt;br /&gt;
This will also work for Resque.&lt;br /&gt;
&lt;br /&gt;
Notice that for rescue you can write QUEUE=* &lt;b&gt;but for delayed job you can&#39;t.&lt;/b&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/1948817847041071638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/11/dedicating-djdelayed-job-worker-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1948817847041071638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1948817847041071638'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/11/dedicating-djdelayed-job-worker-to.html' title='Dedicating a DJ(Delayed job) worker to a specific queue in heroku.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-4084665667764029032</id><published>2014-11-15T07:20:00.000-08:00</published><updated>2014-11-15T07:20:24.581-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="mongodb"/><category scheme="http://www.blogger.com/atom/ns#" term="mongoid"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Overriding default id in mongoid</title><content type='html'>This is an easy one, just want to make sure it&#39;s clear.&lt;br /&gt;
&lt;br /&gt;
Add the following field to your model:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #2b2b2b; border-color: #000000; border-style: solid; border-width: 0.01mm; font-family: monospace; font-size: 14pt; line-height: 100%; padding: 4px;&quot;&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; border-color: #000000; border-style: solid; border-width: 0.01mm; font-family: monospace; font-size: 14pt; line-height: 100%; padding: 4px;&quot;&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;field &lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #6d9cbe;&quot;&gt;:_id&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;, type: &lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #6d9cbe;&quot;&gt;Moped&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #6d9cbe;&quot;&gt;BSON&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #6d9cbe;&quot;&gt;ObjectId&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; border-color: #000000; border-style: solid; border-width: 0.01mm; font-family: monospace; font-size: 14pt; line-height: 100%; padding: 4px;&quot;&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #2b2b2b; border-color: #000000; border-style: solid; border-width: 0.01mm; font-family: monospace; font-size: 14pt; line-height: 100%; padding: 4px;&quot;&gt;&lt;/pre&gt;
&lt;br /&gt;
And to allow setting it:&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: #2b2b2b; border-color: #000000; border-style: solid; border-width: 0.01mm; font-family: monospace; font-size: 14pt; line-height: 100%; padding: 4px;&quot;&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;1 &lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #cc7833;&quot;&gt;def&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt; id=(id)
2   &lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #cc7833;&quot;&gt;self&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #6d9cbe;&quot;&gt;:_id&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt;] &lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #cc7833;&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #e6e1dc;&quot;&gt; id
3 &lt;/span&gt;&lt;span style=&quot;background-color: #2b2b2b; color: #cc7833;&quot;&gt;end&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Now you can just do obj.id=[Some ObjectId] and save the object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/4084665667764029032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/11/overriding-default-id-in-mongoid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/4084665667764029032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/4084665667764029032'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/11/overriding-default-id-in-mongoid.html' title='Overriding default id in mongoid'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-3496789401724251943</id><published>2014-10-05T00:42:00.001-07:00</published><updated>2014-10-05T00:42:04.610-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cyber"/><title type='text'>Nice post about cyber war</title><content type='html'>Popular Science: The War Of Zeros And Ones. http://google.com/newsstand/s/CBIwvZm5zho</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/3496789401724251943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/10/nice-post-about-cyber-war.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3496789401724251943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3496789401724251943'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/10/nice-post-about-cyber-war.html' title='Nice post about cyber war'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-1680674778490811235</id><published>2014-08-08T07:40:00.000-07:00</published><updated>2014-08-11T02:14:03.014-07:00</updated><title type='text'>ClusteTV is hiring</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;
&lt;div class=&quot;p1&quot;&gt;
Cluster TV is looking for it&#39;s next programmer/Superstar!&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
If you can:&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Write code like an Effin&#39; machine&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Test your OWN code&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Speak English like it&#39;s your mother&#39;s tongue&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Handle challenges&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Be self-driven &amp;amp; independent&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
We would also appreciate if you&#39;ll have:&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Great communications skills&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Independent thinking&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Passion to learn new things&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* RoR or Angular experience&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Coffee script knowledge&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* NOSQL understanding&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
Then we want you!&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
What we offer:&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Great and professional team.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Opportunity to become an integral part of an innovative TV solution.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* A chance to learn from the best in the industry.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Full time job in the Tel Aviv area.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Unlimited supply of food and beer. Really.&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
* Flexible work hours.&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;p1&quot;&gt;
If you like what you see and have da skillz, drop us an email at &lt;a href=&quot;mailto:chen@clustertv.com&quot;&gt;chen@clustertv.com&lt;/a&gt;&lt;br /&gt;
Or, call me&amp;nbsp;&lt;a href=&quot;tel: +972 542124335&quot; target=&quot;_blank&quot;&gt;tel: +972 542124335&lt;/a&gt;&lt;span style=&quot;line-height: 1.15;&quot;&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;p2&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;p1&quot;&gt;
Good luck!&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/1680674778490811235/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/08/clustetv-is-hiring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1680674778490811235'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1680674778490811235'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/08/clustetv-is-hiring.html' title='ClusteTV is hiring'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-1941971802959769475</id><published>2014-02-02T23:32:00.001-08:00</published><updated>2014-02-02T23:32:50.546-08:00</updated><title type='text'>Karma Rails Angular Jasmine testing - set up in 5 minutes</title><content type='html'>It took me about an hours and a half because google is not up to date, so here it is:&lt;br /&gt;
&lt;br /&gt;
First - as a rails developer, if you don&#39;t have node.js, this is the time to &lt;a href=&quot;http://nodejs.org/&quot;&gt;install&lt;/a&gt; it.&lt;br /&gt;
If you don&#39;t use RubyMine as you IDE, I recommend it as well, but whatever you prefer is fine by me.&lt;br /&gt;
&lt;a href=&quot;http://www.jetbrains.com/ruby/webhelp/preparing-to-use-karma-test-runner.html&quot;&gt;Here&lt;/a&gt;&amp;nbsp;you&#39;ll fins instructions about karma installation, follow them carefully.&lt;br /&gt;
&lt;br /&gt;
You&#39;ll see that you need to tell karma where is your sources and test sources.&lt;br /&gt;
&lt;br /&gt;
I&#39;m working with jasmine, and using angular as a gem, check my configuration:&lt;br /&gt;
&lt;br /&gt;
frameworks: [&#39;jasmine&#39;],&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // list of files / patterns to load in the browser&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; files: [&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //libs&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;http://0.0.0.0:3000/assets/application.js&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;span style=&quot;background-color: yellow;&quot;&gt;&#39;/Users/chen/.rvm/gems/ruby-1.9.3-p448/gems/angularjs-rails-1.2.9/vendor/assets/javascripts/angular-mocks.js&#39;,&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;spec/javascripts/controllers/sample.js&#39;,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;spec/javascripts/controllers/*/*_spec.js.coffee&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;spec/javascripts/controllers/**/*_spec.js.coffee&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;spec/javascripts/controllers/**/*_spec.coffee&#39;,&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &#39;spec/javascripts/controllers/**/*_spec.js&#39;&lt;br /&gt;
]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To things you should notice:&lt;br /&gt;
1. I use rails assets pipeline to give all my app code js, (just run your server before you test)&lt;br /&gt;
2. I add the angular mocks lib&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All other stuff are basic, I got code in coffee and js so needed a little more lines to find all my tests.&lt;br /&gt;
&lt;br /&gt;
this is the way to make this work pretty fast.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/1941971802959769475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/02/karma-rails-angular-jasmine-testing-set.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1941971802959769475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1941971802959769475'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/02/karma-rails-angular-jasmine-testing-set.html' title='Karma Rails Angular Jasmine testing - set up in 5 minutes'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-3564859091870931317</id><published>2014-01-12T14:09:00.002-08:00</published><updated>2014-01-12T14:09:52.550-08:00</updated><title type='text'>Export Hebrew (or any non english language) with php to excel</title><content type='html'>I found it very annoying that php data to excel is not so straight forward as one might think&amp;nbsp;&lt;a href=&quot;http://stackoverflow.com/questions/15699301/export-mysql-data-to-excel-in-php&quot;&gt;,lots of wrong stuff&lt;/a&gt;&amp;nbsp;here.&lt;br /&gt;
&lt;br /&gt;
The thing is, as a developer you don&#39;t know a lot about &lt;a href=&quot;http://www.joelonsoftware.com/articles/Unicode.html&quot;&gt;encoding&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
So you don&#39;t really think about it until you have bugs, than you start searching for a better solution, I found &lt;a href=&quot;http://stackoverflow.com/a/3466065/67505&quot;&gt;this&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Meaning you manually convert encoding to support excel, and add &lt;a href=&quot;http://en.wikipedia.org/wiki/Byte_order_mark&quot;&gt;BOM&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Just wanted to gather a few links together for future use.&lt;br /&gt;
&lt;br /&gt;
Enjoy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/3564859091870931317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2014/01/export-hebrew-or-any-non-english.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3564859091870931317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3564859091870931317'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2014/01/export-hebrew-or-any-non-english.html' title='Export Hebrew (or any non english language) with php to excel'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-1624055799806762460</id><published>2013-01-28T06:10:00.001-08:00</published><updated>2013-01-28T06:10:20.424-08:00</updated><title type='text'>Home Base SDK</title><content type='html'>As a developer@widdit&#39;s incredible android team, I decided to write a how to embed Widdit&#39;s home base sdk in 5 minutes guide, so here it is:&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 1:&lt;/b&gt;&lt;br /&gt;
go to widdit.com and create an account.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Step 2:&lt;/b&gt;&lt;br /&gt;
create your first home base in the home base section at widdit site.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;step 3:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;
go to sdk&#39;s tab and follow the installation instructions&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;step 4:&lt;/b&gt;&lt;br /&gt;
upload your new apk to the market&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;step 5:&lt;/b&gt;&lt;br /&gt;
make money!&lt;br /&gt;
&lt;br /&gt;
Good luck.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/1624055799806762460/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2013/01/home-base-sdk.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1624055799806762460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1624055799806762460'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2013/01/home-base-sdk.html' title='Home Base SDK'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-1849586949067503505</id><published>2012-12-05T06:02:00.003-08:00</published><updated>2013-05-11T22:05:31.688-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SpineJS js javascript mvc"/><title type='text'>SpineJS Tip</title><content type='html'>&lt;p dir=ltr&gt;Never create multiple instances of a controller that generates the same view, cause you&#39;re event&#39;s registrations will be duplicated over and over again!&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/1849586949067503505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/12/spinejs-tip.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1849586949067503505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1849586949067503505'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/12/spinejs-tip.html' title='SpineJS Tip'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-2405090066808229384</id><published>2012-09-26T09:40:00.001-07:00</published><updated>2012-10-03T10:47:33.393-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="asynctask"/><category scheme="http://www.blogger.com/atom/ns#" term="thread"/><title type='text'>Avoid usage of AsyncTask Class on android</title><content type='html'>&lt;div&gt;&lt;p&gt;Just noticed this method available from API 11 only,&amp;nbsp; so you should find another implementation to avoid unexpected behaviour.&lt;/p&gt;
&lt;p&gt;Or don&#39;t call the execute method,&amp;#160; why?&amp;#160; If you&#39;ll check documentation you&#39;ll see that in some versions of android all tasks will run synchronouslly on the same background thread and on some versions it&#39;ll run on a pool of threads. Always use the executeOnExecutor option for consistent behaviour between platform version and avoid unexpected behaviour.&lt;/p&gt;
&lt;p&gt;See &lt;a href=&quot;http://developer.android.com/reference/android/os/AsyncTask.html&quot;&gt;docs&lt;/a&gt;&lt;br&gt;&lt;/p&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/2405090066808229384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/09/avoid-usage-of-asynctask-class-on.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2405090066808229384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2405090066808229384'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/09/avoid-usage-of-asynctask-class-on.html' title='Avoid usage of AsyncTask Class on android'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-7469182324691294130</id><published>2012-08-31T01:05:00.001-07:00</published><updated>2012-08-31T01:05:18.809-07:00</updated><title type='text'>Nice idea for what&amp;#39;s new in my app</title><content type='html'>&lt;div&gt;&lt;p&gt;People probably don&#39;t read/understand what&#39;s new in an app when they update it.&amp;nbsp; Skype did a very nice screen that shows you that something did &lt;u&gt;change&lt;/u&gt;&lt;/p&gt;
&lt;br/&gt;&lt;img src=&#39;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghKeYIuwrhhJ44dGf9gEMy5hsSDLsZYqT5MXaR0XUN7kaI7ykl7oQT3NnazoT0CB2gimsmihqo9m2el0QhmSjQpUN-4Q0koOg-kqrr0RcGSkBeZZv5WtnrZ_P0ufqIr2pkMfij88lObc8/&#39; /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/7469182324691294130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/08/nice-idea-for-what-new-in-my-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7469182324691294130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7469182324691294130'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/08/nice-idea-for-what-new-in-my-app.html' title='Nice idea for what&amp;#39;s new in my app'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghKeYIuwrhhJ44dGf9gEMy5hsSDLsZYqT5MXaR0XUN7kaI7ykl7oQT3NnazoT0CB2gimsmihqo9m2el0QhmSjQpUN-4Q0koOg-kqrr0RcGSkBeZZv5WtnrZ_P0ufqIr2pkMfij88lObc8/s72-c" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Tel Aviv, Tel Aviv</georss:featurename><georss:point>32.06616 34.77782</georss:point></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-8956488587780437929</id><published>2012-07-08T15:18:00.004-07:00</published><updated>2012-07-08T15:18:46.983-07:00</updated><title type='text'>coffee-script is another piece of shit</title><content type='html'>Hi,&lt;br /&gt;
&lt;br /&gt;
A few months ago I discovered this new stuff called coffee script, and thought to myself, &quot;this is&amp;nbsp;awesome I&#39;ll write less and do more&quot; Today, I tried to continue a development of a pretty fat client side and tried to find myself in the 1000 lines of code I wrote so far (not so many). It was pretty hard, and I&#39;m the only programmer for now, can&#39;t&amp;nbsp;imagine&amp;nbsp;how a new programmer would enter to this project.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;So...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;coffee-script is&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;java-script that look better, no other benefits, and if you plan to write a little more than 200 lines of code, consider using some strongly typed language(that can generate&amp;nbsp;debugable&amp;nbsp;java script) with good IDE that&#39;ll help you maintain your code.&amp;nbsp;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/8956488587780437929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/07/coffee-script-is-another-piece-of-shit.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/8956488587780437929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/8956488587780437929'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/07/coffee-script-is-another-piece-of-shit.html' title='coffee-script is another piece of shit'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-2253349148529966880</id><published>2012-07-07T09:27:00.003-07:00</published><updated>2013-05-11T22:05:28.755-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php async"/><title type='text'>php post response script execution</title><content type='html'>I guess it&#39;s nice to have so here you go&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;lang-php prettyprint&quot; style=&quot;background-color: #eeeeee; border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; font-size: 14px; line-height: 18px; margin-bottom: 10px; max-height: 600px; overflow: auto; padding: 5px; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;code style=&quot;border: 0px; font-family: Consolas, Menlo, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;DejaVu Sans Mono&#39;, &#39;Bitstream Vera Sans Mono&#39;, &#39;Courier New&#39;, monospace, serif; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/*
&amp;nbsp;* basically allow a php script to return a response and continue with
&amp;nbsp;* code execution, good for statistics.
&amp;nbsp;* before echo anything to user call begin and after call end, than you can continue doing stuff
&amp;nbsp;*/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;typ&quot; style=&quot;background-color: transparent; border: 0px; color: #2b91af; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;ScriptContinuationManager&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/**
&amp;nbsp; &amp;nbsp; &amp;nbsp;* this is the point where we need to give a sign to this class
&amp;nbsp; &amp;nbsp; &amp;nbsp;* that we wanna write our response.
&amp;nbsp; &amp;nbsp; &amp;nbsp;* @return void
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; beginRespone&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ob_end_clean&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; header&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Connection: close&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ignore_user_abort&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// optional&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ob_start&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;/*
&amp;nbsp; &amp;nbsp; &amp;nbsp;* after this function execution the response will be sent to the
&amp;nbsp; &amp;nbsp; &amp;nbsp;* client, and code continue without client need to wait.
&amp;nbsp; &amp;nbsp; &amp;nbsp;*/&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;public&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kwd&quot; style=&quot;background-color: transparent; border: 0px; color: darkblue; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; endResponse&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;()&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; $size &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; ob_get_length&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; header&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;str&quot; style=&quot;background-color: transparent; border: 0px; color: maroon; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&quot;Content-Length: $size&quot;&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;);&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ob_end_flush&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// Strange behaviour, will not work&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; flush&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;();&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;com&quot; style=&quot;background-color: transparent; border: 0px; color: grey; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;// Unless both are called !&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;

&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;pln&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;pun&quot; style=&quot;background-color: transparent; border: 0px; margin: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/2253349148529966880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/07/php-post-response-script-execution.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2253349148529966880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2253349148529966880'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/07/php-post-response-script-execution.html' title='php post response script execution'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-9159844743502885534</id><published>2012-06-12T04:57:00.003-07:00</published><updated>2012-06-12T04:57:40.508-07:00</updated><title type='text'></title><content type='html'>For all you android developers, If you ever installed a new rom and didn&#39;t see any logs from your cat, just do this:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://stackoverflow.com/a/7272831/67505&quot;&gt;http://stackoverflow.com/a/7272831/67505&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/9159844743502885534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/06/for-all-you-android-developers-if-you.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/9159844743502885534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/9159844743502885534'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/06/for-all-you-android-developers-if-you.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-684520497440137810</id><published>2012-03-28T17:12:00.001-07:00</published><updated>2013-05-11T22:06:45.247-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="heroku"/><category scheme="http://www.blogger.com/atom/ns#" term="mongodb"/><category scheme="http://www.blogger.com/atom/ns#" term="mongoid"/><category scheme="http://www.blogger.com/atom/ns#" term="rails"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>Rails + Mongo + Heroku how?</title><content type='html'>&lt;p dir=ltr&gt;After a few hours of fighting with google I decided to write it all here:&lt;/p&gt;
&lt;p dir=ltr&gt;*This post is more relevant for windows users but can help others.&lt;/p&gt;
&lt;p dir=ltr&gt;What do you need to have:&lt;br&gt;
First you need to have ruby 1.9.2+&lt;br&gt;
Devkit&lt;br&gt;
then you need rails 3+&lt;br&gt;
then u need the bundler gem&lt;br&gt;
then go to getting started with mongoid &lt;br&gt;
then install mongo locally&lt;br&gt;
then check it all good&lt;br&gt;
then add acoount in heroku&lt;br&gt;
then create app&lt;br&gt;
then add your key&lt;br&gt;
then push&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/684520497440137810/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/03/rails-mongo-heroku-how.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/684520497440137810'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/684520497440137810'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/03/rails-mongo-heroku-how.html' title='Rails + Mongo + Heroku how?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-5676298201263384708</id><published>2012-02-18T06:30:00.000-08:00</published><updated>2012-02-18T06:30:54.153-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><title type='text'>CoffeeScript - language review</title><content type='html'>This weekend I learned a new programming language, called coffee script, It&#39;s not a real language it&#39;s actually compiled to&amp;nbsp;JavaScript, so it&#39;s a way to write&amp;nbsp;JavaScript&amp;nbsp;differently.&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;After a little hands-on and one &lt;a href=&quot;http://arcturo.github.com/library/coffeescript/index.html&quot;&gt;book&lt;/a&gt; read I can say that this is a good language for&amp;nbsp;experienced&amp;nbsp;and non&amp;nbsp;experienced&amp;nbsp;JavaScript programmers.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;What&#39;s&amp;nbsp;awesome about this&amp;nbsp;language is that is fills like&amp;nbsp;someone&amp;nbsp;took all the good stuff from ruby&amp;nbsp;python&amp;nbsp;and java, and put it in one language that eliminates all the crap you need to take form&amp;nbsp;JavaScript&amp;nbsp;programming.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div&gt;I can start writing all the good stuff about coffee but there is no need just dive into&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;a href=&quot;http://coffeescript.org/&quot;&gt;http://coffeescript.org/&lt;/a&gt;&amp;nbsp;and you&#39;ll understand all the benefits.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/5676298201263384708/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/02/coffeescript-language-review.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/5676298201263384708'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/5676298201263384708'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/02/coffeescript-language-review.html' title='CoffeeScript - language review'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-1012702867161297549</id><published>2012-01-07T14:42:00.000-08:00</published><updated>2012-01-07T14:42:55.351-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="session"/><title type='text'>PHP Sessions</title><content type='html'>One more thing,&lt;br /&gt;
&lt;br /&gt;
If you do stuff like put instances of classes inside a session and expect to call methods of this classes later, you must put the session start after you include the classes definitions.&lt;br /&gt;
&lt;br /&gt;
But I suggest not to do this kind of stuff.</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/1012702867161297549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/01/php-sessions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1012702867161297549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/1012702867161297549'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/01/php-sessions.html' title='PHP Sessions'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-2584057470069676858</id><published>2012-01-06T01:49:00.000-08:00</published><updated>2012-01-06T01:49:42.197-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="php"/><category scheme="http://www.blogger.com/atom/ns#" term="session"/><title type='text'>PHP sessions - stuff to check when things goes wrong.</title><content type='html'>&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;There is too much information about problems with sessions in PHP, every dude got it&#39;s own problem and it&#39;s own solution.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;The probability that the problem you experiencing is the same is very low.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;So here is what my little (and very annoying) google&amp;nbsp;journey&amp;nbsp;came up to:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;You must call session_start(); on each page&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;If you use the header(&#39;Location: blabla&#39;); you should use relative url to keep preserve session&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;some people say before using the header action you need to call&amp;nbsp; &lt;span class=&quot;methodname&quot; style=&quot;background-color: white;&quot;&gt;session_write_close();&amp;nbsp;- I&#39;m not using it.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class=&quot;methodname&quot; style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;session_write_close(); could be the reason to your problems, cause after calling it you can&#39;t modify the session (in the current http context), that was my problem.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;on php docs, they say that &quot;&lt;span style=&quot;background-color: white;&quot;&gt;Session ID is not passed with Location header even if&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;link&quot; href=&quot;http://www.php.net/manual/en/session.configuration.php#ini.session.use-trans-sid&quot; style=&quot;background-color: white; border-bottom-color: rgb(0, 0, 153); border-bottom-style: solid; border-bottom-width: 1px; color: #000099; text-decoration: none;&quot;&gt;session.use_trans_sid&lt;/a&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;is enabled. It must by passed manually using&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;tt&gt;SID&lt;/tt&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;constant.&quot;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;So first make sure you use session start, if you passed this search for voodoos like&amp;nbsp;&amp;nbsp;&lt;span class=&quot;methodname&quot; style=&quot;background-color: white;&quot;&gt;session_write_close() in the middle of your infrastructure and remove them.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;If I didn&#39;t help, continue the journey.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/2584057470069676858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2012/01/php-sessions-stuff-to-check-when-things.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2584057470069676858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/2584057470069676858'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2012/01/php-sessions-stuff-to-check-when-things.html' title='PHP sessions - stuff to check when things goes wrong.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-7134232964295778182</id><published>2011-11-16T00:30:00.000-08:00</published><updated>2011-11-16T00:30:43.396-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="pragmatic"/><title type='text'>End of job check list</title><content type='html'>&lt;div&gt;&lt;div&gt;I&#39;m about to end my first gig(already end! yay I&#39;m free!) as a programmer, and want to leave a clean desk. So here is a list of things I&#39;m doing and suggest you all do before you move to your next gig:&lt;br /&gt;
&lt;br /&gt;
1. Write about your major infrastructure developments on your wiki or any other system you got, in an easy to understand language.&lt;br /&gt;
2. Start lecturing your co-workers about complex parts you developed.&lt;br /&gt;
3. Make sure you got full code coverage with unit tests.&lt;br /&gt;
4. Search for to-do comments and make sure you do those todo&#39;s.&lt;br /&gt;
5. If you got unfinished work and think it&#39;s worth something make sure someone complete.&lt;br /&gt;
&lt;br /&gt;
And the most important: change your phone number :-) (Bazinga).&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/7134232964295778182/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2011/11/end-of-job-check-list.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7134232964295778182'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7134232964295778182'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2011/11/end-of-job-check-list.html' title='End of job check list'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-7678089028681047225</id><published>2011-10-28T02:00:00.001-07:00</published><updated>2011-10-28T02:00:29.235-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="startup"/><title type='text'>Startups: reshare very nice research</title><content type='html'>&lt;div&gt;&lt;p&gt;&lt;a href=&quot;http://dailyinfographic.com/the-startup-gamble-infographic?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed%3A+DailyInfographic+%28Daily+Infographic%29&quot;&gt;The Startup Gamble [infographic] | Daily Infographic&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/7678089028681047225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2011/10/startups-reshare-very-nice-research.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7678089028681047225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/7678089028681047225'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2011/10/startups-reshare-very-nice-research.html' title='Startups: reshare very nice research'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8908829452516573489.post-3022118503089303857</id><published>2011-09-27T06:43:00.000-07:00</published><updated>2011-09-27T06:43:40.113-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Rubymine"/><title type='text'>Rubymine recommended font for windows</title><content type='html'>Didn&#39;t find a lot about it on internet so:&lt;br /&gt;
&lt;br /&gt;
File-&amp;gt;Settings-&amp;gt;Editor-&amp;gt;colors &amp;amp; fonts-&amp;gt;Font&lt;br /&gt;
&amp;nbsp;first save as current schema&lt;br /&gt;
than click the &amp;nbsp;... button choose&amp;nbsp;Consolas&amp;nbsp;and set size to 14&lt;br /&gt;
&lt;br /&gt;
looks much better!</content><link rel='replies' type='application/atom+xml' href='http://kinnrot.blogspot.com/feeds/3022118503089303857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://kinnrot.blogspot.com/2011/09/rubymine-recommended-font-for-windows.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3022118503089303857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8908829452516573489/posts/default/3022118503089303857'/><link rel='alternate' type='text/html' href='http://kinnrot.blogspot.com/2011/09/rubymine-recommended-font-for-windows.html' title='Rubymine recommended font for windows'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08105846409079487588</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>