Skip to content

Instantly share code, notes, and snippets.

View fadrizul's full-sized avatar

Fadrizul Hasani fadrizul

View GitHub Profile
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: {
@fadrizul
fadrizul / untitled
Created February 3, 2016 07:26
Test
new content
@fadrizul
fadrizul / untitled
Created February 3, 2016 07:03
Untitled
new content
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)
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
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 ( 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 (
@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';
@fadrizul
fadrizul / phabricator-to-hipchat.js
Last active August 29, 2015 14:15
Phabricator feed hooks to Hipchat notifications
/**
* Phabricator to HipChat feed message hooks
* Author: Fadrizul Hasani <fadrizul@gmail.com>
*/
var http = require('http');
var https = require('https');
var qs = require('querystring');
http.createServer(function (req, res) {
// Listen for incoming request from Phabricator
D/LocationIntentService( 3496): onHandleIntent
D/LocationIntentService( 3496): Connecting to location services
D/LocationIntentService( 3496): onConnected()
D/EventBus( 3496): post: DisplayErrorEvent [mId=1, mMessageId=2131427389, mMessageAction=HIDE, ]
D/LocationIntentService( 3496): Location: Location[fused 3.110897,101.638646 acc=32 et=+1d4h24m52s708ms alt=67.30000305175781]
D/LocationIntentService( 3496): FAILED, Location was stale. Current Time: 2014/02/03 16:27:42 +0800; Location time: 2014/02/03 15:17:35 +0800
D/EventBus( 3496): post: DisplayErrorEvent [mId=1, mMessageId=2131427391, mMessageAction=SHOW, ]