Keutamaan basmallah untuk melindungi diri dari gangguan syaitan

الْحَمْدُ للهِ وَالصَّلاَةُ وَالسَّلاَمُ عَلىَ رَسُوْلِ لله وَعَلىَ آلِهِ وَصَحْبِهِ وَمَنْ وَالاَهُ، أَمَّا بَعْدُ

Bacaan basmallah: بسم الله الرحمن الرحيم
bismi-llāhi ar-raḥmāni ar-raḥīmi
“Dengan menyebut nama Allah Yang Maha Pemurah lagi Maha Penyayang”

Pada umumnya ketika kita masih kecil, kita sering diingatkan untuk membaca basmallah setiap kali melakukan suatu kegiatan. Namun terkadang kita lupa, atau kurang membiasakan hal ini. Mungkin hal ini dikarenakan karena kurangnya pengetahuan kita mengenai manfaatnya.

Salah satu keutamaan membaca basmalah adalah terlindungnya kita dari gangguan syaitan.

Allah SWT telah memberitahukan kita bahwa syaitan adalah musuh yg nyata, sebagaimana dalam firman-Nya:

يَـٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُواْ ٱدۡخُلُواْ فِى ٱلسِّلۡمِ ڪَآفَّةً۬ وَلَا تَتَّبِعُواْ خُطُوَٲتِ ٱلشَّيۡطَـٰنِ‌ۚ إِنَّهُ ۥ لَڪُمۡ عَدُوٌّ۬ مُّبِينٌ۬

Hai orang-orang yang beriman, masuklah kamu ke dalam Islam secara keseluruhannya, dan janganlah kamu turut langkah-langkah syaitan. Sesungguhnya syaitan itu musuh yang nyata bagimu.
QS. Al-Baqarah : 208

Dan sesungguhnya Iblis telah berjanji untuk selalu menyesatkan manusia, seperti yg dijelaskan oleh Allah:

قَالَ فَبِمَآ أَغۡوَيۡتَنِى لَأَقۡعُدَنَّ لَهُمۡ صِرَٲطَكَ ٱلۡمُسۡتَقِيمَ (١٦) ثُمَّ لَأَتِيَنَّهُم مِّنۢ بَيۡنِ أَيۡدِيہِمۡ وَمِنۡ خَلۡفِهِمۡ وَعَنۡ أَيۡمَـٰنِہِمۡ وَعَن شَمَآٮِٕلِهِمۡ‌ۖ وَلَا تَجِدُ أَكۡثَرَهُمۡ شَـٰكِرِينَ (١٧

Iblis menjawab: “Karena Engkau telah menghukum saya tersesat, saya benar-benar akan [menghalang-halangi] mereka dari jalan Engkau yang lurus, (16) kemudian saya akan mendatangi mereka dari muka dan dari belakang mereka, dari kanan dan dari kiri mereka. Dan Engkau tidak akan mendapati kebanyakan mereka bersyukur [ta’at]. (17)
QS. Al-Aaraf : 16-17

Maka sudah sewajarnya kita haruslah senantiasa memohon perlindungan dari Allah SWT dari gangguan syaitan.

Berikut adalah beberapa keutamaan membaca basmallah:

Perlindungan ketika makan

Syaitan makan dari makanan yg tidak dibacakan dengan menyebut nama Allah, maka hendaknya kita membaca basmalah ketika hendak makan dan minum, dan kita lupa mengawalinya, maka ucapkan “Bismillaahi awwalahu wa aakhirohu”.

Dari ‘Aisyah radhiyallahu ‘anha, Rasulullah shallallahu ‘alaihi wa sallam bersabda,

“Apabila salah seorang di antara kalian makan, maka hendaknya ia menyebut nama Allah Ta’ala. Jika ia lupa untuk menyebut nama Allah Ta’ala di awal, hendaklah ia mengucapkan: “Bismillaahi awwalahu wa aakhirohu (dengan nama Allah pada awal dan akhirnya)”.”
(HR. Abu Daud no. 3767 dan At Tirmidzi no. 1858. At Tirmidzi dan dishahihkan al-Albani).

Dari hudzaifah radhiyallahu ‘anhu, Nabi shallallahu ‘alaihi wa sallam bersabda,

“Sesungguhnya setan dibolehkan makan makanan yang tidak dibacakan nama Allah ketika hendak dimakan.”
(HR. Abu Daud no. 3766 dan dishahihkan al-Albani)

Dan disebutkan dalam sebuah hadist yg lain, dari Umayyah bin Mihshon,

“Rasulullah shallallahu ‘alaihi wa sallam pernah duduk dan saat itu ada seseorang yang makan tanpa membaca bismillah hingga makanannya tersisa satu suapan. Ketika ia mengangkat suapan tersebtu ke mulutnya, ia mengucapkan, “Bismillah awwalahu wa akhirohu (dengan nama Allah pada awal dan akhirnya).” Nabi shallallahu ‘alaihi wa sallam pun tertawa dan beliau bersabda, “Setan terus makan bersamanya hingga. Ketika ia menyebut nama Allah (bismillah), setan memuntahkan apa yang ada di perutnya.”
(HR. Abu Daud no. 3768, Ahmad 4: 336 dan An Nasai dalam Al Kubro 10113. Al Hafizh Abu Thohir mengatakan bahwa sanad hadits ini hasan. Al Hakim menshahihkan hadits ini dan disetujui oleh Adz Dzahabi. Al Mutsanna bin ‘Abdurrahman mengatakan hadits ini hasan dan memiliki berbagai penguat. Lihat Majma’ Az Zawaid, 5: 22).

Perlindungan ketika berhubungan intim

Dari Ibnu Abbas radhiallahu ‘anhuma, bahwa Nabi shallallahu ‘alaihi wa sallam bersabda,

“Jika salah seorang dari kalian (yaitu suami) ingin berhubungan intim dengan istrinya, lalu ia membaca do’a: [Bismillah Allahumma jannibnaasy syaithoona wa jannibisy syaithoona maa rozaqtanaa], “Dengan (menyebut) nama Allah, ya Allah jauhkanlah kami dari (gangguan) setan dan jauhkanlah setan dari rezki yang Engkau anugerahkan kepada kami”, kemudian jika Allah menakdirkan (lahirnya) anak dari hubungan intim tersebut, maka setan tidak akan bisa mencelakakan anak tersebut selamanya”
(HR. Bukhari no. 6388 dan Muslim no. 1434).

Penghalang antara pandangan jin dan aurat manusia.

Membaca basmallah sebelum masuk kamar kecil.

Dari Ali bin Abi Thalib radhiyallahu ‘anhu, Nabi shallallahu ‘alaihi wa sallam bersabda,

“Penghalang antara mata jin dengan aurat bani Adam, apabila kalian masuk kamar kecil, ucapkanlah bismillah.”
(HR. Turmudzi 606 dan dishahihkan al-Albani).

Penghalang setan untuk membuka tempat barang berharga

Menutup tempat makan dan minum dan membaca basmallah.

“Tutuplah bejana, ikatlah geribah (tempat menyimpan air yang terbuat dari kulit), tutuplah pintu, matikanlah lentera (lampu api), karena sesungguhnya setan tidak  mampu membuka geribah yang terikat, tidak dapat membuka pintu, dan tidak juga dapat menyingkap bejanan yang tertutup. Bila engkau tidak mendapatkan tutup kecuali hanya dengan melintangkan di atas bejananya sebatang ranting, dan menyebut nama Allah, hendaknya dia lakukan.”
(HR. Muslim)

Menghalangi setan menginap di dalam rumah

Membaca basmallah ketika akan masuk ke rumah.

Dari Jabir bin Abdillah radhiyallahu ‘anhuma, Nabi shallallahu ‘alaihi wa sallam bersabda,

“Jika seseorang masuk rumahnya dan dia mengingat nama Allah ketika masuk dan ketika makan, maka setan akan berteriak: ‘Tidak ada tempat menginap bagi kalian dan tidak ada makan malam.’ Namun jika dia tidak mengingat Allah ketika masuk maka setan mengatakan, ‘Kalian mendapatkan tempat menginap’ dan jika dia tidak mengingat nama Allah ketika makan maka setan mengundang temannya, ‘Kalian mendapat jatah menginap dan makan malam’.”
(HR. Muslim).

Perintah untuk menutup pintu dan jendela di waktu menjelang petang dengan membaca basmallah.

“Jika malam datang menjelang, atau kalian berada di sore hari, maka tahanlah anak-anak kalian, karena sesungguhnya ketika itu setan sedang bertebaran. Jika telah berlalu sesaat dari waktu malam, maka lepaskan mereka. Tutuplah pintu dan berzikirlah kepada Allah, karena sesungguhnya setan tidak dapat membuka pintu yang tertutup. Tutup pula wadah minuman dan makanan kalian dan berzikirlah kepada Allah, walaupun dengan sekedar meletakkan sesuatu di atasnya, matikanlah lampu-lampu kalian.”
(HR. Bukhari, no. 3280, Muslim, no. 2012)

Tentunya masih banyak keutamaan lainnya yg tidak disebutkan di sini, namun semoga ilmu yg sedikit ini dapat dapat membawa manfaat bagi kita semua, dan kita diberi kemampuan untuk senantiasa istiqomah dalam mengamalkannya. Amiin.

سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ أَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ

Download PDF

Screen Shot 2014-12-16 at 8.19.52 AM

Install remote desktop on ubuntu server vps

Sometimes it would be nice if we can setup a remote desktop on vps. We can use it to hide our presence or to work with big files which we need to download or upload. Or perhaps install virtualbox there to run windows softwares and then running internet marketing apps .. you will need kvm or xen vps for this purpose.

Open terminal and login using ssh, then run the following commands:

apt-get update
apt-get upgrade
apt-get install xorg lxde-core tightvncserver
tightvncserver :1
tightvncserver -kill :1
vi ~/.vnc/xstartup

When inside vi, add the following 2 lines in the end of file:

lxterminal &
/usr/bin/lxsession -s LXDE &

Save the file and exit to terminal again.
Then run

vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565

Now the server part is ready. You need to download vnc client, then pointing the remote access to:

IPAddress:1

Don’t forget to add :1 after the ip address.

As an optional step, you can install firefox and leafpad editor:

apt-get install firefox
apt-get install leafpad

… okay then, happy spamming :)
..oops sorry, happy coding :)

Screen Shot 2014-12-01 at 10.05.16 PM

Running phalcon php on cpanel for production and setup on MAMP for development

Enable Phalcon on cPanel

Today I just realized that cpanel already support phalcon php framework. It may not enabled by default, but you can enable it yourself via cpanel menu.

Screen Shot 2014-12-01 at 10.08.05 PM

Login into your cpanel account. Then click on Select PHP Version.

Screen Shot 2014-12-01 at 10.08.31 PM

There 2 things you need to do in this screen. First, you need to select which PHP Version, let say PHP 5.5. Then you need to enable phalcon by ticking it from available php extensions. Then save it.

Now time to test it, create a new php file which calling phpinfo(). You should get something like this.

Screen Shot 2014-12-01 at 10.19.19 PM

Setup Phalcon on MAMP

Next we need to setup development environment. In the past I prefer using vagrant, but now I need to keep cpu and memory usage low. So I use MAMP.

Screen Shot 2014-12-01 at 10.23.51 PM

We do not need to compile the phalcon extension, because we can grab one from this github repository. By following the documentation, we need to copy phalcon.so to /Applications/MAMP/bin/php/php5.5.x/lib/php/extensions/no-debug-non-zts-20121212. The next step is update the php.ini to load phalcon.so. Edit php.ini then add this line:

extension=phalcon.so

Restart Apache, if everything is ok, you should get something like:

Screen Shot 2014-12-01 at 10.06.14 PM

appstorebadge

Apple App Store Optimization

There are a lot of mobile users today. Many people have their own mobile devices that come with many great applications. Apple is one of the most popular mobile device manufacturers in the world. You can find more than 2 million mobile apps that are specially created for Apple’s iOS system. These apps are specially created to help all users get maximum benefits from their Apple’s devices, such as iPad, iPhone, iPod, and some other devices. Many app developers want to learn about the Apple app store optimization. If you are an app developer for Apple’s devices, you should keep reading this article.

What is Apple App Store Optimization (ASO)?

ASO is the procedure for optimizing any mobile apps, so they can rank higher in the app store’s search result. When your application can rank high in the search result, you can attract more visitors to your mobile app. It means that you can increase the visibility of your own app. It can allow you to increase the traffic to your application significantly. Before you sell your application, you should understand the algorithm of the App Store’. There are some important things that you need to know about this system.

Why is ASO Technique Important?

Many experts believe that most apps can be discovered through the App Store searches. Therefore, you can improve your app performance when this app can reach the first page of the search result. This technique can be used to boost the ranking of your application on the App Store’s search result. It is recommended for all app developers to learn about this optimization technique. When you are able to optimize your app on the App Store, you should be able to impact your app’s ranking significantly. You can increase the visibility of your app when you are able to follow this technique properly.

Some Factors That Can Increase Your ASO Method

1. Title

It is one of the most important factors in boosting your app’s ranking. The title should contain the targeted keyword. You need to spend some time for doing research, so you can find the best keywords for your application. You can also choose a good title for your app. Optimizing your title is very important for you, especially if you want to develop a good application for the iOS system. When your customers are happy with your app, they are going to share your app with their friends or families. The title of your app plays an important role in this stage.

2. Keywords

It is another important thing that you should consider when you are doing the Apple ASO campaign. You need to know some relevant keywords that are related with the primary keywords. Choosing the right keywords is very useful to help you reach your target audience easily. You can also monitor your competitors easily when you target some specific keywords for promoting your app. Don’t forget to include some keywords in the description, so your users can learn about your app easily.

3. Number of Downloads

Some experts believe that this is another important thing for most app developers. This factor can also determine the app’s ranking on the Apple App Store’s search results. The number of downloads becomes very important for the Apple App Store Optimization campaign. Popular apps tend to rank higher on the Apple’s search results than the other normal apps. You cannot control the total downloads for your app. However, you can still optimize your application for improving the benefits of this application. When people are happy with your app, they are going to keep downloading your mobile app.

4. Ratings and Reviews

If you want to rank your app on the App Store’s search results, you should consider these two factors. All apps in the App Store are valued by using the ratings and reviews. These testimonials usually come from other users who are using similar apps. Apps with good reviews tend to rank higher on the search results. It means that you should use some creative ways for promoting your application to your friends or relatives. Positive reviews are very useful to help you boost the ranking of your application. Make sure that all happy customers leave some positive testimonials or ratings for your application.

There are a lot of benefits that you can get from the proper App Store optimization (ASO) campaign. If you want to be a successful app developer, you should know about this method. It is recommended that you promote your app on the App Store’s search results by using this simple method. Many people are interested with this technique because they want to get all benefits from this campaign. You can optimize the sales performance of your app easily when you are following some of those ASO techniques. You can start using proper ASO method for promoting your app to your potential customers easily.

Postfix-logo

Configure postfix to use mandrill for sending email

Postfix-logo

In this configuration relay all email sending mandrill. So that we do not need to configure all applications one by one to use mandrill. It will affect all applications in the server.

1. Create /etc/postfix/sasl_passwd

[smtp.mandrillapp.com]:587 USERNAME:API_KEY

2. Edit /etc/postfix/main.cf, add the following code

smtp_sasl_security_options = noanonymous

smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
relayhost = [smtp.mandrillapp.com]:587

3. run in shell:

postmap hash:/etc/postfix/sasl_passwd

4. restart postfix

service postfix restart

Now try to send an email, then monitor the log in mandrill dashboard.

Securing JSON-API wordpress plugin

wordpress-logo

JSON-API is very useful wordpress plugin. I often use it to retrieve wordpress data to mobile app. It can handle custom fields, custom post types, taxonomy, etc. It also has custom controllers that we can use to extent the functionality.

Unfortunately this plugin has no access control. So once you install this plugin, everyone can access the data as well. I made a little update to limit the access. Basically I added a secret key or a password, but I will use term api key. Only someone with correct api key can access the data.

So how to do this.

Edit json-api.php file, line 26, add the following code.

  /* ########### QUICK MOD: ADDING API KEY ########### */
  $json_api_key = "b34b40ca8771c48c204e55f927376885";
  /* ########### QUICK MOD: ADDING API KEY ########### */
  if ($_GET['json']) {
    if ($_GET['wpapikey'] != $json_api_key) {
      print "[error:99] Permission denied!";
      exit;
    }
  }
  /* ########### QUICK MOD: ADDING API KEY ########### */

Change b34b40ca8771c48c204e55f927376885 to anything as you like as the api key. For the complete diff, see this commit in github:
https://github.com/dodyrw/wp-json-api-key/commit/d29459421ceec73e9b639d4e2ffbeb04931df576

Now every JSON-API request will require api key. Otherwise it will return permission denied error message. For example:

http://www.dodyweb.com/?json=get_recent_posts&dev=1&wpapikey=b34b40ca8771c48c204e55f927376885

SSL Pinning with AFNetworking 2

Screen Shot 2013-12-23 at 8.14.56 AM

If we use web services in our app, we need to secure the connection from data sniffing. Normally we can use SSL connection every time we call web services. It will prevent someone from sniffing the data traffic.

However it is not enough. We also need to prevent from “Man in the middle attack“. Someone else can disguise as the web service provider. Instead of connecting to genuine web service server, the app will connect to someone else server. And we know that it will lead to a serious problem!

So how do we prevent from “Man in the middle attack”.

First, the web service provider must have SSL certificate. They will supply us with .crt file. Or if you own the web service, buy a SSL certificate for your domain. Then we need to tell our app that it should always connect to server with valid SSL certificate.

Before we begin to code, we need to convert .crt file to .cer file and add this file in xcode project. Open terminal and run the following command.

openssl x509 -in www.mydomain.com.crt -out www.mydomain.com.cer -outform der

If you use NSURLConnection, you need to check certificate in - (void)connection:(NSURLConnection *)connection willSendRequestForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge. You need to add NSURLConnectionDelegate protocol.

Using AFNetworking 2.0, it will be easier. We need to create AFSecurityPolicy and set AFHTTPRequestOperationManager to use it.

Since I use it multiple times, I create a method for this purpose.

- (AFSecurityPolicy*) dodyrwSecurityPolicy
{
    /**** SSL Pinning ****/
    NSString *cerPath = [[NSBundle mainBundle] pathForResource:@"www.dodyrw.com" ofType:@"cer"];
    NSData *certData = [NSData dataWithContentsOfFile:cerPath];
    AFSecurityPolicy *securityPolicy = [[AFSecurityPolicy alloc] init];
    [securityPolicy setAllowInvalidCertificates:NO];
    [securityPolicy setPinnedCertificates:@[certData]];
    [securityPolicy setSSLPinningMode:AFSSLPinningModeCertificate];
    /**** SSL Pinning ****/

    return securityPolicy;
}

Then set it in manager.

    AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];

    /**** SSL Pinning ****/
    [manager setSecurityPolicy:[self dodyrwSecurityPolicy]];
    /**** SSL Pinning ****/
    
    [manager GET:WEBSITE_URL parameters:params success:^(AFHTTPRequestOperation *operation, NSDictionary* responseObject) {
        //..... beautiful code here
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
        //..... beautiful code here
    }];