Skip to content

Instantly share code, notes, and snippets.

View arribbar's full-sized avatar

Bart Arribe arribbar

  • CTO of Previa Medical
  • Lyon, France
View GitHub Profile

Keybase proof

I hereby claim:

  • I am arribbar on github.
  • I am arribbar (https://keybase.io/arribbar) on keybase.
  • I have a public key whose fingerprint is F7EC 580C C0D8 580E A74F B1CB A4FE 59A6 4E36 11EE

To claim this, I am signing this object:

@arribbar
arribbar / doc
Created June 30, 2014 13:59
Couchbase Lite - phonegap plugin - sync function
var message = function() {
this.type = "customer";
this.fullName = "null";
this.email = "null";
this.phone = "null";
this.comment = "null";
this.crewUser = window.config.user.login;
this.members = [];
}
@arribbar
arribbar / CBLite.java
Last active August 29, 2015 14:03
logs - short circuit the network reachability manager
package com.couchbase.cblite.phonegap;
import android.content.Context;
import org.apache.cordova.CallbackContext;
import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CordovaWebView;
import org.apache.cordova.CordovaInterface;
import org.json.JSONArray;
@arribbar
arribbar / Logcat
Last active August 29, 2015 14:03
Couchbase-Lite Phonegap plugin - Push replication not working - Logs (logcat - SG - ngrep)
06-25 10:41:00.855: D/dalvikvm(5962): Late-enabling CheckJNI
06-25 10:41:00.935: I/CordovaLog(5962): Changing log level to DEBUG(3)
06-25 10:41:00.935: I/CordovaLog(5962): Found start page location: index.html
06-25 10:41:00.935: D/Whitelist(5962): Unlimited access to network resources
06-25 10:41:00.935: D/CordovaActivity(5962): CordovaActivity.onCreate()
06-25 10:41:00.955: I/LibraryLoader(5962): Expected native library version number "",actual native library version number ""
06-25 10:41:00.955: I/chromium(5962): [INFO:library_loader_hooks.cc(116)] Chromium logging enabled: level = 0, default verbosity = 0
06-25 10:41:00.955: I/BrowserStartupController(5962): Initializing chromium process, renderers=0
06-25 10:41:00.965: E/AudioManagerAndroid(5962): BLUETOOTH permission is missing!
06-25 10:41:00.975: I/Adreno-EGL(5962): <qeglDrvAPI_eglInitialize:320>: EGL 1.4 QUALCOMM Build: I0404c4692afb8623f95c43aeb6d5e13ed4b30ddbDate: 11/06/13
@arribbar
arribbar / SG
Last active August 29, 2015 14:02
Logs (SG, ngrep, logcat) when the pushReplication doesn't worked
HTTP: #018: PUT /customers/_local/a688196d1012230c981da3f98b8d675f9dfbcc27 (as amel)
18:04:17.134652 HTTP: #019: POST /customers/_changes (as amel)
18:04:17.134751 Changes: MultiChangesFeed({*}, {Since:3 Limit:50 Conflicts:true IncludeDocs:false Wait:true Continuous:false Terminator:0xc2104d4c00}) ...
18:04:26.962127 HTTP: #020: GET /customers/_local/366cc2314efb154dbdf534ff369497d96f88b494 (as amel)
18:04:26.962396 HTTP: #020: --> 404 missing (0.0 ms)
18:04:26.987198 HTTP: #021: POST /customers/_changes (as amel)
18:04:26.987291 Changes: MultiChangesFeed({*}, {Since:0 Limit:50 Conflicts:true IncludeDocs:false Wait:true Continuous:false Terminator:0xc2108fb1e0}) ...
18:04:26.987379 Cache: getCachedChanges("registration", 0) --> 3 changes valid from #1
18:04:26.987432 Changes: MultiChangesFeed done
18:04:27.037764 HTTP: #022: POST /customers/_changes (as amel)
@arribbar
arribbar / SG
Created June 24, 2014 17:20
Logs (SG, ngrep, logcat) when the pushReplication works
17:40:54.838426 Enabling logging: [CRUD Cache Changes]
17:40:54.838516 ==== Couchbase Sync Gateway/1.00 (1.0.0-23; commit 46d2fdaf) ====
17:40:54.838532 Configured Go to use all 4 CPUs; setenv GOMAXPROCS to override this
17:40:54.838544 Configured MaxFileDescriptors (RLIMIT_NOFILE) to 5000
17:40:54.838566 Opening db /customers as bucket "customers", pool "default", server <http://localhost:8091>
17:40:54.838620 Opening Couchbase database customers on <http://localhost:8091>
17:40:54.907329 Cache: Initialized changeCache with nextSequence=#1
17:40:54.909324 Reset guest user to config
17:40:54.909343 Starting admin server on 127.0.0.1:4985
17:40:54.911711 Starting server on :12345 ...
@arribbar
arribbar / logcat
Created June 24, 2014 10:21
No push from device to SG
06-24 11:06:01.885: I/chromium(20564): [INFO:CONSOLE(1091)] "start sync{"source":"customersregistered","target":{"url":"http://amel:amadeus@192.168.43.61:12345/customers"},"continuous":true}", source: file:///android_asset/www/js/index.js (1091)
06-24 11:06:01.885: D/CordovaLog(20564): file:///android_asset/www/js/index.js: Line 1034 : RIGHT HERE RIGHT HERE
06-24 11:06:01.885: I/chromium(20564): [INFO:CONSOLE(1034)] "RIGHT HERE RIGHT HERE", source: file:///android_asset/www/js/index.js (1034)
06-24 11:06:01.895: W/Listener(20564): authHeader is null
06-24 11:06:01.895: W/Listener(20564): Unauthorized -- requestCredentials not given or do not match allowed credentials
06-24 11:06:01.895: D/CordovaLog(20564): file:///android_asset/www/js/index.js: Line 863 : APP - setupViews - PUT done
06-24 11:06:01.895: I/chromium(20564): [INFO:CONSOLE(863)] "APP - setupViews - PUT done", source: file:///android_asset/www/js/index.js (863)
06-24 11:06:01.915: V/Listener(20564): Authorized via basic auth
06-24 11:06:01.915: W/
@arribbar
arribbar / all the logs (in case)
Created June 16, 2014 10:44
Logs sync gateway
administrators-MacBook-Air:bin user1$ ./sync_gateway customerRegisterSGConfig.json
11:22:23.153998 Enabling logging: [CRUD Cache Changes]
11:22:23.154128 ==== Couchbase Sync Gateway/1.00 (1.0.0-23; commit 46d2fdaf) ====
11:22:23.154143 Configured Go to use all 4 CPUs; setenv GOMAXPROCS to override this
11:22:23.154152 Configured MaxFileDescriptors (RLIMIT_NOFILE) to 5000
11:22:23.154167 Opening db /customers as bucket "customers", pool "default", server <http://localhost:8091>
11:22:23.154209 Opening Couchbase database customers on <http://localhost:8091>
11:22:23.204390 Cache: Initialized changeCache with nextSequence=#1
2014/06/16 11:22:23 go-couchbase: call to Do("_sync:syncdata") in github.com/couchbaselabs/go-couchbase.(*Bucket).GetsRaw took 705.136041ms
11:22:23.932940 Reset guest user to config
@arribbar
arribbar / changes device 1
Created June 13, 2014 13:07
Logs deletion and then creation of a new document
{
"results": [{
"id": "_design/customersregistered",
"seq": 1,
"changes": [{
"rev": "1-f0689e5ca42b1fee265d26aeb0249883"
}]
}, {
"id": "a39d9d21-0b3e-4bda-a9a9-7eb0c851fe55",
"seq": 2,
@arribbar
arribbar / logs device 2
Created June 12, 2014 11:03
Logs document deletion using couchbase phonegap plugin
06-12 11:41:37.739: D/CordovaLog(22412): : Line 0 : event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
06-12 11:41:37.739: I/chromium(22412): [INFO:CONSOLE(0)] "event.returnValue is deprecated. Please use the standard event.preventDefault() instead.", source: (0)
06-12 11:41:37.749: D/CordovaLog(22412): file:///android_asset/www/js/index.js: Line 156 : APP - refresh_button clicked - Call dbChanged to refresh the list of customers
06-12 11:41:37.749: I/chromium(22412): [INFO:CONSOLE(156)] "APP - refresh_button clicked - Call dbChanged to refresh the list of customers", source: file:///android_asset/www/js/index.js (156)
06-12 11:41:39.041: D/CordovaLog(22412): file:///android_asset/www/js/index.js: Line 262 : APP - dbChanged - Listing all the customers
06-12 11:41:39.041: I/chromium(22412): [INFO:CONSOLE(262)] "APP - dbChanged - Listing all the customers", source: file:///android_asset/www/js/index.js (262)
06-12 11:41:39.081: D/dalvikvm(22412): GC_FOR_ALLOC freed 618K, 7