Skip to content

Instantly share code, notes, and snippets.

var SomeModel = Backbone.Model.extend({});
someModel = new SomeModel();
someModel.bind("change", function(model, collection){
alert("You set some_attribute to " + model.get('some_attribute'));
});
someModel.set({some_attribute: "some value"});
{
"ShortResultText": "SE19",
"Restaurants": [
{
"Id": 1038,
"Name": "Napoli Pizza",
"Address": "96 Anerley Road",
"Postcode": "SE19 2AN",
"City": "Crystal Palace",
"CuisineTypes": [
@arkangelx
arkangelx / gist:a4a7692d69dd8bc5abd4
Last active September 4, 2015 12:08
{ "id": 49591, "vin": "JTDKGNEC30N010898", "licensePlate": "SC14KUP", "deviceId": null, "modelDocumentId": "12345", "alias": null, "imageUrl": "https://uatmytoyota.toyota.co.uk/TIA_Feed/Vehicle_Images/4105_CAR_DB_exterior-3_4W5.png", "modelDescription": "Aygo x-cite 5dr 1.0 man", "transmission": "Multi Mode", "engine": null, "fuel": "Petrol" }
{
"id": 49591,
"vin": "JTDKGNEC30N010898",
"licensePlate": "SC14KUP",
"deviceId": null,
"modelDocumentId": "12345",
"alias": null,
"imageUrl": "https://uatmytoyota.toyota.co.uk/TIA_Feed/Vehicle_Images/4105_CAR_DB_exterior-3_4W5.png",
"modelDescription": "Aygo x-cite 5dr 1.0 man",
"transmission": "Multi Mode",
{
"ShortResultText": "SE19",
"Restaurants": [
{
"Id": 1038,
"Name": "Napoli Pizza",
"Address": "96 Anerley Road",
"Postcode": "SE19 2AN",
"City": "Crystal Palace",
"CuisineTypes": [
{
"statuses": [
{
"metadata": {
"iso_language_code": "en",
"result_type": "recent"
},
"created_at": "Wed Jun 24 22:13:18 +0000 2015",
"id": 613832296680939500,
"id_str": "613832296680939521",
{
"statuses": [
{
"metadata": {
"iso_language_code": "en",
"result_type": "recent"
},
"created_at": "Wed Jun 24 22:13:18 +0000 2015",
"id": 613832296680939500,
"id_str": "613832296680939521",
{
"cats": [
{
"breed": "exotic shorthair",
"legs": 4,
"image": {
"xxhdpi": "exotic_shorthair",
"xhdpi": "",
"hdpi": "",
"mdpi": "",
{
"response": {
"books": [
{
"version_id": "431",
"name": "Genesis",
"abbr": "Gen",
"ord": "1",
"book_group_id": "0",
"testament": "OT",
//called in application onCreate
public Cloudinary initCloudinary() {
Map config = new HashMap();
config.put("cloud_name", getString(R.string.cloudinary_name));
config.put("api_key", getString(R.string.cloudinary_key));
config.put("api_secret", getString(R.string.cloudinary_secret));
return new Cloudinary(config);
}
{ "beverages": [
{
"name": "Espresso",
"description": "Strong, black and with a finely marbled crema – this is how the Italians love their espresso. Immerse yourself in the southern Italian coffee culture with a cup of Lavazza Caffè Espresso, a premium blend of only the best Arabica beans. For lovers of authentic espresso enjoyment, there is no alternative. Let this small but powerful drink showcase its impressive flavours by serving it in a small, thick-walled cup. But it is just as ideally suited for preparing “long coffees”. This is a pure espresso that indulges the noses of true coffee connoisseurs with its intense fragrance before revealing its bold taste: A true feast for the senses for you, your family and your friends",
"price": "1.99"
},
{
"name": "Dark Roast Coffee",
"description": "It’s easy to get lost in the moment over a robust cup of your favourite dark-roasted coffee. Fuller-bodied and bold, these coffees featu