May 2012
3 posts
Solving problem with 502 Bad Gateway in HAProxy
Lately I get 502 Bad Gateway coming from HAProxy A LOT. After activating the log, you can see this message:
May 2 02:49:43 localhost haproxy[14092]: 178.255.154.2:41408 [02/May/2012:02:49:25.801] HTTP HTTP/http_02 0/0/0/-1/17463 502 21924 - - PHNN 2/2/2/1/0 0/0 “GET / HTTP/1.0”
Looking at this...
April 2012
10 posts
[eAccelerator] This build of "eAccelerator" was...
If you ever found this message:
[eAccelerator] This build of “eAccelerator” was compiled for PHP version 5.3.8. Rebuild it for your PHP version (5.3.10) or download precompiled binaries.
Then all you have to do is run the following commands (I include downloading eaccelerator just in case):
# mkdir /usr/src/eaccelerator/ # cd /usr/src/eaccelerator/ # wget -O...
Jay Robinson: Quick note on why you should always... →
jayrobinson:
Lately I’ve been doing a ton of reading on decreasing website load time, image optimization techniques, responsive loading for different devices, and every detail I can find in between. One quick takeaway is that I will always tick the “progressive” checkbox in Photoshop’s Save for Web dialog…
1 tag
Koprol dua tahun yang lalu
Saya ingat sekali ketika kami sedang menghadiri #StartupLokal Meetup v.1 (ya! Yang pertama), saat itu Satya hadir di meetup itu. Dia pendiam sekali saat itu.
Tidak berapa lama kemudian, berita akuisisi Koprol beredar dimana-mana. Ternyata dia sedang menahan diri supaya berita tentang proses akuisisi tidak kemana-mana.
Saya pikir, Koprol menjadi awal dari domino industri startup di Indonesia.
...
If you want to make something similar to Silicon Valley, what should we do?
Handling user password: How do you hash your... →
After reading this article, I am starting to think that adding 34 characters (salt) in your password, and then hashing it is still ineffective.
Lets begin with hashing. This is how long does it take to brute force attack certain character length hashed text using modern days GPU:
all 6 character password MD5s: 3 seconds all 7 character password MD5s: 4 minutes all 8 character password MD5s: 4...
satya: List of Yahoo! Koprol developers →
satya:
These are software engineers, mobile developers, UI designers, program managers, quality engineers and a services engineer who worked for Yahoo! Indonesia, Yahoo! Mail, Yahoo! Messenger, Yahoo! Hub, and of course Koprol. They love Scrum, Ruby on Rails, mobile apps (J2ME, BlackBerry, Android,…
March 2012
1 post
The Sounds Of Nature…Literally
January 2012
11 posts
6 tags
Installing Sphinx Search on Basic 64-bit Amazon...
This is a simple step by step in installing Sphinx Search on Basic 64-bit Amazon Linux AMI. This is applicable to 32-bit too. This installation is very bare, starting from zero installation at all.
The conditions I wanted to meet:
Using the very latest Sphinx Search documents. And when I say latest, I mean it. I am using Sphinx Search trunk, because I need the RealTime Indexing (RT Index) and...
Using Sphinx as denormalized table: Need your...
Hey guys, I need your point of view on this. So I have this query, which can take up to 17 (Seventeen!) tables into one query. I have been using Sphinx a lot for searches, and luckily, since Sphinx 1.10-beta, we have this attribute called sql_attr_string. What this attribute does is store the value for retrieval at Sphinx. So this is what I get (below is a sphinx index):
mysql> select...
Fighting Content Piracy →
aulia-m:
From Jakarta Globe:
Business models should be based on customer demand and an understanding of what is technically feasible - not a desire to maintain existing models or cash flows. In other words, you need to adapt the map to the terrain - you cannot change the terrain to suit the map.
Object runs faster than array!
Amazing new finding again. Now take a look at this:
foreach ($query->result_array() as $page):
$links .= '<a href="'.site_url($page['uri']).'">';
$links .= ucwords($page['title']).'</a><br />';
endforeach;
compared to this:
foreach ($query->result() as $page):
$links .= '<a href="'.site_url($page->uri).'">';
$links .=...
Foreach Loop Optimization
This is crazy! I’ve just found out that:
$pages = $query->result_array();
foreach ($pages as $page):
is a lot faster than:
foreach ($query->result_array() as $page):
Crazy! It happens that $query->result_array() is called multiple times if you put it inside the foreach(). I need to learn more…
December 2011
4 posts
Find files that is larger than n KB in Linux →
find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $9 “: ” $5 }’
Trouble in opening CSV formats on Microsoft Excel
When you open a CSV file with Excel, they will check your regional settings, and sometimes depending on your regional setting, they will use comma or semicolon. To let Excel know that you only want one of those type of separators, you should generate your CSV like this:
sep=, “col1”,”col2”,”col3”
… or this:
sep=;...
IMAP doesn't exist. PHP must be compiled with IMAP...
If you event get this message from OsTicket, all you have to do is:
# yum install php-imap
And voila! Problem solved.
550 Permission denied. Passive mode refused.
If you found this message when you are accessing vsftpd ftp server, then you need to do this:
[root@Production]/etc/vsftpd# ftp localhost Connected to localhost (127.0.0.1). 220 (vsFTPd 2.2.2) Name (localhost:xxx): xxx 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> debug Debugging on (debug=1). ftp> ls...
November 2011
4 posts
Swiftmailer bug simple fix
There’s a major bug in Swiftmailer, where sometimes your email returns 0 bytes attachment, or broken html email, or broken plaintext email in Yahoo? Well the cause of this is that Swiftmailer wrongly sends header and body. They forgot to separate the two.
--_=_swift_v4_13225521024ed48b26208bf_=_
Content-Type: application/pdf; name=#101086-8144-487-MOVIE.pdf
Content-Transfer-Encoding:...
Manipulate Reported URL for Better Google...
So this is the case. You have this uber cool website, with lots of different content types in the first directory segment. For example:
http://www.domain.com/this-is-a-hotel-profile
The problem is that you want to identify this as a hotel profile page, and wanted to be able to differentiate with other pages such as /myprofile or /this-is-a-user-profile on Google Analytics. The solution, is...
This is what startups is all about
Tiket.com akan launching dalam waktu 11 hari. Kalau melihat ke belakang, kita mengembangkan tiket.com ini dalam waktu kurang dari 3 bulan lho! Saya ingat team baru mulai benar-benar di-assemble setelah 17 Agustus 2011. Yang tadinya berdua saja coding dengan Ivan, sekarang team dev sudah berenam. Dan dalam waktu 3 bulan itu kita sudah membuat:
front-end browser interface
front-end mobile...
October 2011
2 posts
GIT 101: Git Stash
Sedang di tengah-tengah coding, tiba-tiba klien bilang kalau dia nemu bug di situs. Apa yang akan kamu lakukan? Git commit? Tapi codingannya belum selesai, dan malah akan membuat situsnya tambah kacau. Solusinya?
git stash
Itu saja! Setelah git stash, maka kamu bisa mulai membenarkan bug (yang ada di branch yang sama) atau lompat ke branch yang lainnya (misal branch devel ke branch...
5 tags
September 2011
5 posts
6 tags
Killing SphinxSearch Windows Service that is stuck...
Ever had a moment where you tried to stop a service, but ended up stuck in the “stopping” process without you being able to kill it in the Task Manager? Well here’s the way out:
C:\sphinx\bin>sc queryex sphinxsearch SERVICE_NAME: sphinxsearch TYPE : 10 WIN32_OWN_PROCESS STATE : 3 STOP_PENDING ...
1 tag
40% of Inc. magazine top 500 CEOs had entrepreneurial parent
– My analysis is that there are two cause to this: first is that their parent let them become an entrepreneur; second is that their parent is their invisible mentors.
August 2011
5 posts
Pud's Blog: Why Must You Laugh At My Back End →
Trained by experience. :)
pudjam666:
Disclaimer
I’m not a trained engineer or sys admin. Never even finished a book on it. But I’ve launched (and sold) a few things that have become popular (ref: here and here), so sometimes people ask me about my back end. Which ends up in blank stares, or worse.
OS:
Windows Server 2008….
4 tags
Some people just don't understand the coming soon... →
ngupingteknologi:
ada yang mau beli tiket online di web yang masih under development.
/via @nataliardianto @ariauakbar
WARNING: could not open pipe (GetLastError()=5)
If you found this error while running Sphinx Search indexer in Windows, then all you have to do is this:
C:\sphinx\bin>searchd --delete --servicename SphinxSearch
C:\sphinx\bin>searchd --install --config "C:/sphinx/config/sphinx.conf" --servicename SphinxSearch
Notice the quotation mark when declaring the config. Yes! The bug is caused by the lack of quotation mark! Go figure.
Note:...
July 2011
1 post
Continuous improvement. Success is not a result, it’s just a state.
– Gimson Ahmed, about Ferruccio Lamborghini originally built tractors
Facebook crazy long Integer ID
Are you puzzled with the 15 digits long integer ID at Facebook? I know I am! If you happen to find that your suppose to be integer ID all of the sudden become a floating point number, here’s a simple solution:
$facebook_id = 123456789012345; // outputs as float $formatted_id = number_format($facebook_id, 0, ‘.’, ”); echo $formatted_id; // back to it’s normal integer...
June 2011
7 posts
$this->rumus_what = “( log10( ratings * testimonial_count ) * @weight /...
– Rumus algoritma search Urbanesia.com dengan menggunakan Sphinx Search untuk yg relevancy. Jadi yang dihitung adalah:
Rating, makin besar makin tinggi.
Jumlah testimonial, makin banyak makin tinggi.
Rating dan testimonial di logaritmik, sehingga rating gede tapi jumlah testimoninya sedikit ngga...
(Mentor) Grade f pun masih bisa mengajari saya jauh lebih banyak daripada...
– Aria Rajasa
The Free Icon Editor →
Basically, the best ico editor, multiple icons in one file. The good part is it’s freeware.