Belajar CPA

Standard

Apa itu CPA ?

CPA kependekan dari Cost Per Action. ketika visitor melakukan action. Actionnya bisa berupa: masukin email/kodepos , daftar ke situs target, download aplikasi, join facebook app dll. Besar jumlah $$$ yg kita dapat tergantung tingkat kesulitan dari actionnya. Nilai $$ per-action berkisar dari 0.5$ – 50$an


Komponen dalam bisnis CPA :

– The CPA Network

Network adalah organisasi yang menjembatani antara Advertiser dan Publisher (kita). Advertiser adalah pihak yg membutuhkan action. Dia yg akan membayar kita lewat Network (setelah dipotong komisi oleh Network tentunya hehe).

– CPA Offer

Network tawarkan ke publisher. Dalam contoh chat diatas , offer-nya adalah “daftar situs game online”.
Didalam sebuah offer ada requirement2 yg harus kita cermati sebelum mempromosikan. Requirementnya jg macam2 : target negara, umur minimal, jenis trafik yg boleh masuk dsb. Hati2, tidak menuruti requirement ini..resiko tidak dibayar atau banned !

CPA Offer secara umum ada 2 tipe: Continue reading

Install PINTA On UBUNTU

Standard

Installing Pinta

Pinta can be installed on Linux, Mac, Windows, or *BSD. Due to this, there are multiple ways to install Pinta based on what you are using as your operating system.

This document will show you the multiple ways to install Pinta.

Installing Pinta on Ubuntu

Install Pinta from default Ubuntu repository

Pinta is available in default Ubuntu repository. You can install it using:

  • Click on Ubuntu Software Center from Launcher (left site icon panel).
  • At the top right input box type in: Pinta and press Enter.
  • Pinta is displayed in list bellow. Click on it and click the Install button.

Continue reading

Make ActiveMQ Keeping Data After Install

Standard

Checking config .xml on activeMQ and using persistent=”true”

<broker brokerName="broker" persistent="true" useShutdownHook="false">
   <transportConnectors>
     <transportConnector uri="tcp://localhost:61616"/>
   </transportConnectors>
   <persistenceAdapter>
     <kahaPersistenceAdapter directory="activemq-data" maxDataFileLength="33554432"/>
   </persistenceAdapter>
 </broker>

MongoDB: Mongodump terminate called after throwing an instance of ‘std::runtime_error’

Standard

If you encounter this error:

1
2
3
4
5
connected to: 127.0.0.1
Mon Oct 21 10:49:30.638 DATABASE: soft_production to dump/soft_production
terminate called after throwing an instance of 'std::runtime_error'
what(): locale::facet::_S_create_c_locale name not valid
Aborted

Please add this

1
2
3
export LC_ALL=C
# or
export LC_ALL="en_US.UTF-8"

either in the console (for current session) or in .bashrc file.

After that you should be ready to go with:

1
mongodump --db soft_production

How To Work With JSON In Node.js / JavaScript

Standard

String To JSON Object:

This is very much easier and straight forward as below:

1
2
3
var jsonString = "{\"key\":\"value\"}";
var jsonObj = JSON.parse(jsonString);
console.log(jsonObj.key);

As you can see, we are using the built-in global JSON Object to parse a string which has JSON Data. Also, it might be good idea to use “.trim()” method on the string, if you think there might be some chance of extra space etc in the JSON string. Otherwise, it won’t get parsed and you will face an unexpected error.

Continue reading

404 error when calling REST api (Phalcon)

Standard

XMLHttpRequest cannot load http://ajax.example.com/like/. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://blog.example.com' is therefore not allowed access.

Solution:

Set htaccess like this:

# Always set these headers.
Header always setAccess-Control-Allow-Origin"*"
Header always setAccess-Control-Allow-Methods"POST, GET, OPTIONS, DELETE, PUT"
Header always setAccess-Control-Max-Age"1000"
Header always setAccess-Control-Allow-Headers"x-requested-with, Content-Type, origin, authorization, accept, client-security-token"

 

Pasang Swap ubuntu

Standard

Open Terminal 

root@ARJUNA:~# mkdir /var/data
root@ARJUNA:~# dd if=/dev/zero of=/var/data/swap1.swp bs=1024 count=1024000
root@ARJUNA:~# mkswap /var/data/swap1.swp
root@ARJUNA:~# swapon /var/data/swap1.swp
root@ARJUNA:~# htop
root@ARJUNA:~# free

ini sample jika server kita mengalami kehabisan memory dan bisa di akalin dengan cara seperti ini ..