Contacts

17 July 2019

Give Rules to your Firebase Firestore Data

Today people have a serious concern about offline first approach when building mobile application. The traditional way is using data persistence which is combined with Rest API call, make trigger and/or scheduler to push and pull the data. But there is another better way to handle this, using socket is better but more complex. So here come realtime database cloud provider such as Firebase, Realm and others.

When using Firebase you have to give rules to your data. These rules will give permission to the data. For example we want to user can only edit their own data, such as change basic user profile. If not, user can change other user's data.

Here is how we can do it. Sign in to your Firebase admin project https://console.firebase.google.com. I assume you already create Firestore database. Move to Rules tab.

Firestore Rules

By default your Firebase Forestore rules will looked like this:

28 February 2012

Python virtualenv, no zlib module was found

This is my story when for the first time using virtualenv in Python. My installed Python on Linux box was using 2.7 version, on the other side my current project is still using 2.6. Replacing 2.7 with 2.6 in my OS ? No, it's bad option. Virtualenv is the best way.

The problem occurred when I try to use Python 2.6 for my virtualenv using command below:

sudo virtualenv -p /usr/local/bin/python2.6 mysite2.com

sadly it produce error:


Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/virtualenv.py", line 17, in
import zlib

ImportError: No module named zlib

I try to use 2.7 rather than 2.6, it success, no error produced. So the problem is about my installed Python 2.6 thought.

Try to looking for information about this problem, finally I found. Someone said that that error is because there is no zlib installed on my Pyhton 2.6 when I install it.

By default when we make configure on Python source, zlib module is disabled. So we have to enable it explicitly. using
--with-zlib


So the configuration command becomes ./configure --with-zlib

now try
sudo virtualenv -p /usr/local/bin/python2.6 mysite2.com

And it successes. :)

14 January 2011

Play! Framework API

I had searching about Play Framework API many time before. But not found. The last way, I asked to the Play! group. And someone gave it's link to me.

Here it is,
http://www.playframework.org/documentation/api/1.1/index.html

So don't be confuse if you are looking for Play! API documentation.

Keep Play!-ing and enjoy...

09 January 2011

How to Install Broadcom 4312 Linux driver

Hello... Do you running Linux? So your installed Linux is not detecting your Broadcom 4312 device?

If your answers is YES, this article may be helpful.

I have looking for the firmware for my Broadcom 4312, I have installed it. But it doesn't work.

So the problem is, the recent Broadcom driver for Linux (said b43) is supporting most of Broadcom wireless device, but mine is not supported. Sadly. This is the link that will show you the list of supported device Broadcom 4312 Linux at that page, you can check whether your Broadcom is supported or not.

Now it's clear right? Since I written this article b43 was not supporting Broadcom 4312. What should we do?
Ok, check this out.

First you have to download the official Broadcom driver for linux. I have read that it is supporting our Broadcom 4312.
Download it from the links below:
you can also go to main page:

http://www.broadcom.com/support/802.11/linux_sta.php


Second, download your preferred driver and the readme.txt file.

Third, read the manual guide on redme.

Install it. And enjoy it.

Here I'm not explaining the detail howto's because the redme.txt guide is complete enough. So you can do the detail step by step by reading the readme file.

06 January 2011

Google groups API and Yahoo groups API

You may be already known that Google open a lot of API for it's application including; Google Map, Google Mail, Google Translate and many others, Yahoo! did too.

Sadly since this article is being written, there is no Google groups API and Yahoo! groups API. So sad.

So how the group based website such as Grouply retrieve the messages from groups? Are they using Mail API to retrieve groups messages? Well this is also possible but it will be so hard, as I think. Or Grouply build it's own API manually from scratch to communicate with Google and Yahoo! groups?

I'm still imagine how to retrieve those messages to my web application. Still thinking and finding idea.

You, do you have problem just like me? Have you solve it? Please let me know, how.

29 March 2010

Cellular Provider War

When I was seeing TV at night, I surprised about one advertisement. One of Cellular provider in my country attacking the other Cellular Provider. This advertiser said on the advertisement that the other Cellular Provider is bad (Indos*t is cheap and bad, X* is bad because of too many agreement for the features). Of course, this is really bad advertisement, not sportive enough. Good company should 'play the game' fairly.

Today, Cellular user is smarter to face many kinds of advertisement. So advertising a bad content just will make 'the boomerang come back deathly'.

23 August 2009

UML convention

For the last quarter I had a difficulty on receiving UML convention, what happened and what was wrong? The keyword of this problem is on faculties on my academic place where I study. Normally students follow the rule from the books (by reading modules), if they didn't know about something then they will ask to the modules. What the module just said is used. Sadly many faculties didn't understand about this (or might be didn't want to pay attention). Each faculty have their own rule on UML convention, when the other said A then the other said B. This is really bad, actually bad for academic environment. The good academic environment is where the educator of academic environment can solve the problem of heterogeneous convention. Make a conference to make convention(s). But it still not held yet, they (faculties) didn't want to care about this big problem. Sadly, the students of campus where I studied were became confuse because of inconsistence-uml-convention in my campus.

Generally UML convention/rule is available for International, but what the hell happen here.