target 2012

Apr 29th, 2012 | Posted by

bismillah,

meskipun telat nulis, target saya sampai akhir 2012 adalah :

  1. wisuda S1 april
  2. produk sos pertama launch
  3. mulai kuliah S2
  4. beli motor
  5. pergi ke pantai di pulau seberang
  6. qurban

semoga menjadi target yang mulia dan terealisasi

install mongodb and phpdriver on ubuntu

Apr 25th, 2012 | Posted by

instalasi mongodb di ubuntu bisa dilakukan dengan beberapa step berikut :

user@computer:$ cd /opt/
curl http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.0.4.tgz > mongo.tgz
tar xzf mongo.tgz
sudo mkdir -p /data/db/
sudo chown 'ditto' /data/db/

jalankan mongodb server di terminal :

user@computer:$ ./mongodb-linux-x86_64-2.0.4/bin/mongod &

untuk masuk ke dalam terminal mongodb jalankan perintah berikut :

user@computer:$ ./mongodb-linux-x86_64-2.0.4/bin/mongo
> db.foo.save( { a : 1 } )
> db.foo.find()
{ "_id" : ObjectId("4f981164f100d658971b1245"), "a" : 1 }

instalasi php driver mongodb :

user@computer:$ sudo pecl install mongo

kemudian tambahkan extension=mongo.so di file php.ini. contoh mudah koneksi, insert, query, dan tampilkan hasil query di php adalah sbb :

$m      = new Mongo();
$db     = $m->comedy;
$collection     = $db->cartoons;
 
$obj = array( "title" => "Calvin and Hobbes", "author" => "Bill Watterson" );
$collection->insert($obj);
 
$obj = array( "title" => "XKCD", "online" => true );
$collection->insert($obj);
 
$cursor = $collection->find();
 
foreach ($cursor as $obj) {
    echo $obj["title"] . "\n";
}

outputnya adalah sbb :
Calvin and Hobbes
XKCD

sources :
http://www.mongodb.org/display/DOCS/PHP+Language+Center
http://www.php.net/manual/en/mongo.tutorial.php

how to remove ssh welcome note

Apr 25th, 2012 | Posted by

setiap kali login di ubuntu server, aku selalu mendapatkan beberapa baris pesan yang isinya selalu sama. inilah pesan yang selalu muncul :

user@computer:$ ssh ditto@192.168.22.151
ditto@192.168.22.151's password:
Linux sos 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux
Ubuntu 10.04.4 LTS

Welcome to the Ubuntu Server!
* Documentation: http://www.ubuntu.com/server/doc

System information disabled due to load higher than 1.0

Last login: Wed Apr 25 19:20:30 2012 from 192.168.22.15

file ini digenerate oleh beberapa file bawaan ubuntu yang ada di path /etc/update-motd.d, jadi cara paling simpel untuk mencegahnya adalah dengan menghapus atau memindahkan folder /etc/update-motd.d :

user@computer:$ sudo mv /etc/update-motd.d /etc/update-motd.d.bak

source :
http://www.howtogeek.com/howto/ubuntu/change-ssh-welcome-banner-on-ubuntu
http://computercon.blogspot.com/2011/05/change-ssh-welcome-banner.html

review 2011

Jan 15th, 2012 | Posted by

tahun 2012 sudah berjalan 15 hari, meskipun sedikit telat target 2011 harus tetap di review :

  1. memperpanjang nama lengkap + wisuda bersama keluarga dan calon keluarga :p => gagal, perubahan kebijakan kampus
  2. punya vps => gagal, belum mendesak
  3. sekolah lanjutan 2 => sukses
  4. sekolah lanjutan 1 => sukses
  5. benchmark beberapa php framework => gagal
  6. develop aplikasi android => sukses
  7. develop aplikasi blackberry => gagal
  8. perkuat algoritma, java, phyton, dan scala => gagal
  9. mengembangkan sayap cnf => gagal, broken heart
  10. manage 7 resource => gagal, hanya 5
  11. qurban => gagal, unexpected expense
  12. gadget buat granat => gagal, unexpected expense

wah, ternyata hanya 25% target di tahun 2011 yang sukses. masih perlu belajar pengendalian diri :)

HTTP Status Messages

Sep 17th, 2011 | Posted by

When a browser requests a service from a web server, an error might occur.

This is a list of HTTP status messages that might be returned:


1xx: Information

Message: Description:
100 Continue Only a part of the request has been received by the server, but as long as it has not been rejected, the client should continue with the request
101 Switching Protocols The server switches protocol

2xx: Successful

Message: Description:
200 OK The request is OK
201 Created The request is complete, and a new resource is created
202 Accepted The request is accepted for processing, but the processing is not complete
203 Non-authoritative Information
204 No Content
205 Reset Content
206 Partial Content

Read more…

sudoku android sukses

Apr 23rd, 2011 | Posted by

setelah sehari semalam duduk di depan monitor putih, akhirnya berhasil juga. apa yang berhasil? beberapa hari yang lalu seorang teman mengirimkan pdf yang berisi step2 pembuatan game sudoku versi android. hari jumat kemarin libur, waktu luang itu aku gunakan untuk upgrade brainware-nya si cuplis. hasilnya ada di sini.