Skip to content

Instantly share code, notes, and snippets.

Backbone.sync = function(method, model, options) {
// App.db is my database connection
if(_.isNull(App.db)) console.error('No Database connection!');
var query = BackboneDb.createQuery(method, model);
if (method === "read") {
var data = App.db.execute(query);
var resultJSON = BackboneDb.resultToJSON(data);
@ashikahmad
ashikahmad / BetterNSLog.md
Last active December 11, 2015 20:58
A quick replacement to NSLog in your Obj C project

#Better NSLog A quick replacement to NSLog in your Obj C project

This will need no extra effort at all and changes the way you see your logs in debug area.

###How it looks in Debug Area:

Before:

2013-01-29 15:46:24.076 Looptivity[76673:c07] ----2013-01-28 19:02:47 +0000