Skip to content

Instantly share code, notes, and snippets.

Antonio Davi Macedo Coelho de Castro davimacedo

Block or report user

Report or block davimacedo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@davimacedo
davimacedo / index.html
Last active Oct 27, 2017
This is an example of HTML file with Parse SDK
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta content="Back4App Inc" name="author">
<title>Sample App| JavaScript Quickstart | Back4App</title>
@davimacedo
davimacedo / livequery.js
Created Nov 25, 2016
Live Query Example
View livequery.js
// In order to use it:
// Create an app in back4app, create a class called Message with a column called text, activate web hosting + live query for this class
// Create a new folder and go to it
// Place curent code in a file called livequery.js
// run: npm install parse
// run: node ./livequery
// Then you can create, update and delete entries in dashboard and see the results in your console
var Parse = require('parse/node');
@davimacedo
davimacedo / curl.sh
Created May 27, 2016
Example of exporting data with cloud functions
View curl.sh
curl -X POST \
-H "X-Parse-Application-Id: YKjNQyNBBsaJpRlcSRxBfR3yKCGdU395XzZfqjdB" \
-H "X-Parse-REST-API-Key: JBDMxg9uyvbq7FQdd44EtSKDLdDlIrRrP6EIvFZJ" \
-H "Content-Type: application/json" \
-d '{"exportClass": "MyClass"}' \
https://parseapi.back4app.com/functions/export > out.json
@davimacedo
davimacedo / main.js
Created May 20, 2016
Cloud code for braintree integration
View main.js
// Requiring npm module
var braintree = require("braintree");
// Initializing gateway
var gateway = braintree.connect({
environment: braintree.Environment.Sandbox,
merchantId: "useYourMerchantId",
publicKey: "useYourPublicKey",
privateKey: "useYourPrivateKey"
});
@davimacedo
davimacedo / curl.sh
Created Apr 25, 2016
Example of importing data with cloud functions
View curl.sh
curl -X POST \
-H "X-Parse-Application-Id: LL9oIdzIkmwl5xyowQQu0fTmXyUWfet9RuAzwHfj" \
-H "X-Parse-REST-API-Key: R3S8PYQKuzeV4c8MUeO5ved46C50MEp56boDHW1O" \
-H "Content-Type: application/json" \
-d @data.json \
https://parseapi.back4app.com/functions/import
You can’t perform that action at this time.