Skip to content

Instantly share code, notes, and snippets.

View fadrizul's full-sized avatar

Fadrizul Hasani fadrizul

View GitHub Profile
@fadrizul
fadrizul / setup
Created August 7, 2011 22:26
Did a little fix on 'npm install by version' command, and added a check on 'package.json' path
#!/usr/bin/env node
// Make sure working folder is the same as this file
process.chdir(__dirname);
// Check node_modules folder
var fs = require('fs');
var modules = [];
//var base = process.env.HOME + '/node_modules';
var base = __dirname + '/node_modules';
var url = server + '/customers/activate';
var activateJSON = { id:"0192268455",activationCode:"6450" };
$.ajax({
url: server + '/customers/activate',
type: 'POST',
async: true,
data: activateJSON,
contentType: "application/json",
dataType: 'json',
xhrFields: {
I/GCM ( 1135): GCM message com.grabtaxi.driver.dodol 0:1390620231219771%e6969fe7f9fd7ecd
D/AGCMBroadcastReceiver( 3328): Received message Bundle[{payload={"tags":"","phone":"60163662458","bookingId":349,"fareUpper":24.6,"state":"BROADCAST","dropOff":"SURIA KLCC, KUALA LUMPUR CITY CENTRE, KUALA LUMPUR, WP KUALA LUMPUR, MALAYSIA","remarks":"","surfaceTime":1390620236000,"code":"FAC-1390620231006","dropOffLng":101.71218,"tip":0,"pickUpLat":3.130799,"immediate":1,"confirmTime":1390620261000,"distance":14.023,"closeTime":1390620256000,"pickUp":"Subway Tropicana City Mall, 3 Jalan SS 20\/27, Seksyen 20, Petaling Jaya","dropOffLat":3.15744,"name":"Fads","fareLower":16.4,"jobTime":1390620231000,"pickUpLng":101.627043,"commission":0}, from=42039601058, collapse_key=do_not_collapse}] with message type gcm
D/GcmIntentService( 3328): onHandleIntent
D/GcmIntentService( 3328): Processing a new job from GCM
D/GcmIntentService( 3328): Sending new job to JobModel
D/JobModel( 3328): Sending Future Job Broadcast
W/GCM/DMM (
I/ActivityManager( 598): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.grabtaxi.driver.dodol/com.grabtaxi.driver.lib.splash.SplashActivity_ bnds=[216,185][376,385]} from pid 898
D/EventBus( 4886): register: com.grabtaxi.driver.lib.splash.SplashActivity$1@423b0d20
I/ActivityManager( 598): START u0 {cmp=com.grabtaxi.driver.dodol/com.grabtaxi.driver.lib.main.MainActivity_} from pid 4886
D/DriverUtils( 4886): Driver is already AVAILABLE no need for changes
D/DriverUtils( 4886): Driver is already AVAILABLE no need for changes
D/EventBus( 4886): register: com.grabtaxi.driver.lib.main.AbstractDrawerActivity$1@423bf6b0
D/EventBus( 4886): register: com.grabtaxi.driver.lib.jobs.JobEventHandler@426508b0
D/EventBus( 4886): register: com.grabtaxi.driver.lib.main.DisplayErrorHandler@42651118
D/EventBus( 4886): register: com.grabtaxi.driver.lib.main.MainActivity$1@423bf6c0
D/EventBus( 4886): register: com.grabtaxi.driver.lib.jobs.JobEventHandler@426572e0
I/GCM ( 946): GCM message com.grabtaxi.driver.dodol 0:1390758907956594%e6969fe7f9fd7ecd
D/AGCMBroadcastReceiver(16280): Received message Bundle[{payload={"content":"On Christmas eve, an Uber driver purposely ran over a whole family at a road crossing. Sources say his intention was to kill, his real motive is still unknown, but some says he is affiliated with a terrorist organisation.","uid":2,"title":"Uber driver killed a whole family","priority":1,"extra1":"Read more","cancelable":1,"image":"http:\/\/venturebeat.files.wordpress.com\/2014\/01\/muzzafar-syed.jpg","extra2":"http:\/\/google.com","extra3":"","format":"WITH_ICON","expiry":0}, from=42039601058, collapse_key=do_not_collapse}] with message type gcm
W/GCM/DMM ( 946): broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=com.grabtaxi.driver.dodol (has extras) }
D/GcmIntentService(16280): onHandleIntent
D/GcmIntentService(16280): Feed Message
D/GcmIntentService(16280): Saving feed message
E/Notifica
alyticsService (has extras) } U=0: not found
D/dalvikvm( 1081): GC_CONCURRENT freed 515K, 21% free 10471K/13228K, paused 2ms+5ms, total 33ms
D/dalvikvm( 1081): WAIT_FOR_CONCURRENT_GC blocked 16ms
D/HttpClient(15191): Failed to connect to: http://192.168.0.100:8080/rest/drivers/mytoxi.ph@gmail.com/gcm/register
D/HttpClient(15191): java.net.SocketTimeoutException: failed to connect to /192.168.0.100 (port 8080) after 10000ms
D/HttpClient(15191): at libcore.io.IoBridge.connectErrno(IoBridge.java:159)
D/HttpClient(15191): at libcore.io.IoBridge.connect(IoBridge.java:112)
D/HttpClient(15191): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:192)
D/HttpClient(15191): at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:459)
D/HttpClient(15191): at java.net.Socket.connect(Socket.java:843)
[ { bookingId: 5029986,
pickUp: 'MYTEKSI HQ, LOT1A JALAN KEMAJUAN, PETALING JAYA, SELANGOR',
dropOff: 'JAYA 33, PETALING JAYA, SELANGOR',
jobTime: 1390159133000,
remarks: '#makan test test test jgn ambil',
pickUpLat: 3.1105,
pickUpLng: 101.63845,
dropOffLat: 3.1102,
dropOffLng: 101.63718,
surfaceTime: 1390159143000,
D/HttpClient(18377): Request to: https://dodol.grabtaxi.com/drivers/fadrizul@gmail.com/gcm/register
D/HttpClient(18377): {"errorMessageCode":"driverNotActivated","developerMessage":"Apologies, looks like your account isn't active, please contact our support centre for assistance"}
W/GcmInitializationModel(18377): null
D/EventBus(18377): post: DisplayErrorEvent [mId=31, mMessageId=2131427376, mShow=true, mExtra=HTTPResponse [mCode=403, mData={"errorMessageCode":"driverNotActivated","developerMessage":"Apologies, looks like your account isn't active, please contact our support centre for assistance"}]]
D/EventBus(18377): post: DisplayErrorEvent [mId=31, mMessageId=2131427376, mShow=true, mExtra=HTTPResponse [mCode=403, mData={"errorMessageCode":"driverNotActivated","developerMessage":"Apologies, looks like your account isn't active, please contact our support centre for assistance"}]]
D/EventBus( 1974): post: JobStateChangeNotification [mBookingId=5388907, mNewState=PICKING_UP]
D/DefaultResponseHandler( 1974): id: JobStateChangeResponseHandler onStart
D/HttpClient( 1974): Request to: https://dodol.grabtaxi.com/drivers/fadrizul@gmail.com/jobs/5388907
D/HttpClient( 1974): Setting header sessionToken=APA91bHzofafS0DjGpZ0BacSHFLy64U4JHUDIQlh1ECTisa5hQzFJ7TbHClL6blYmxW_vTl8Y-MBixFvMRM82Q9LAhflBSvVoNouUCvRmTr7rDkQQP0W95LrFOEDQ2cglzpSlqizJnFBrcC59QbMFQo81V3QQGuDSxeI0-S-NGK2Ca9Ag3vaQAM
D/HttpClient( 1974): Setting header AppName=GrabTaxiDriver
I/GoogleMapManager( 1974): Connection to LocationClient has successful.
D/DefaultResponseHandler( 1974): id: JobStateChangeResponseHandler onSuccess
D/DefaultResponseHandler( 1974): id: JobStateChangeResponseHandler onFinish
D/AJobsListFragment( 1974): onJobStateChange: JobStateChangeNotification [mBookingId=5388907, mNewState=PICKING_UP]
D/AJobsListFragment( 1974): onJobStateChange: JobStateChangeNotification [mBookingId=5388907, mNewState=PICKING_UP]
<html>
<head>
<title>Welcome to GrabTaxi</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#E5E5E5" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="text-align:center;">
<!-- Save for Web Slices (grabtaxi_softlaunch_edm(slice).psd) -->
<table align="center" id="Table_01" width="600" height="1442" border="0" cellpadding="0" cellspacing="0" style="font-family:Arial;">
<tr style="background:#FFF;">
<td width="200" height="80" colspan="3" rowspan="4">