Skip to content

Instantly share code, notes, and snippets.

View flovilmart's full-sized avatar
📈

Florent Vilmart flovilmart

📈
View GitHub Profile
@flovilmart
flovilmart / How to use:
Created March 26, 2017 21:24
GraphQL Parse Schema
mutation {
NewClass {
create(foo: "hello", bar: false, increment: 1) {
objectId, foo, bar, increment
}
}
}
mutation {
create(className: "NewClass", params: {foo: "Bar", bar: true, increment: 10}) {
[ec2-user@ip-172-31-14-143 ~]$ cat npm-debug.log
0 info it worked if it ends with ok
1 verbose cli [ '/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/node',
1 verbose cli '/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/bin/npm',
1 verbose cli 'install',
1 verbose cli 'sse4_crc32' ]
2 info using npm@2.14.12
3 info using node@v4.3.0
4 verbose config Skipping project config: /home/ec2-user/.npmrc. (matches userconfig)
5 verbose install initial load of /home/ec2-user/package.json
@flovilmart
flovilmart / node-debug.log
Created April 2, 2016 03:55
sse4_crc32@4.1.1
8454 info install sse4_crc32@4.1.1
8455 verbose unsafe-perm in lifecycle false
8456 info sse4_crc32@4.1.1 Failed to exec install script
8457 verbose stack Error: sse4_crc32@4.1.1 install: `node-gyp rebuild`
8457 verbose stack Exit status 1
8457 verbose stack at EventEmitter.<anonymous> (/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/lib/node_modules/npm/lib/utils/lifecycle.js:214:16)
8457 verbose stack at emitTwo (events.js:87:13)
8457 verbose stack at EventEmitter.emit (events.js:172:7)
8457 verbose stack at ChildProcess.<anonymous> (/opt/elasticbeanstalk/node-install/node-v4.3.0-linux-x64/lib/node_modules/npm/lib/utils/spawn.js:24:14)
8457 verbose stack at emitTwo (events.js:87:13)
@flovilmart
flovilmart / _PushStatus
Created February 25, 2016 17:34
_PushStatus specification
// PushStatus contains information about a push that was sent by an app. Its
// BSON format is stored directly in Mongo. Its JSON format is the REST format
// exposed to external developers, e.g. "_id" is mapped to "objectId",
// "_created_at" is mapped to "createdAt", etc.
type PushStatus struct {
// ObjectID is a string matching the standard Parse object id format.
ObjectID string `bson:"_id" json:"objectId"`
// CreatedAt contains the current modification time for this object.
CreatedAt TimeString `bson:"_created_at" json:"createdAt"`
@flovilmart
flovilmart / Example.swift
Created February 17, 2016 12:46
Authenticate with custom OAuth example
import Parse
import Bolts
class AuthDelegate:NSObject, PFUserAuthenticationDelegate {
func restoreAuthenticationWithAuthData(authData: [String : String]?) -> Bool {
return true
}
}
let configuration = ParseClientConfiguration { (configuration) -> Void in
@flovilmart
flovilmart / .dockerignore
Created December 25, 2015 18:01
Parse on Google Cloud Platform, Custom container
node_modules
.dockerignore
Dockerfile
npm-debug.log
.git
.hg
.svn
@flovilmart
flovilmart / Dockerfile
Created December 25, 2015 17:47
Parse Anywhere docker container
# Dockerfile extending the google appengine Node image with application files for a
# single application.
FROM gcr.io/google_appengine/nodejs
# Check to see if the the version included in the base runtime satisfies \
# ~0.12.0, if not then do an npm install of the latest available \
# version that satisfies it. \
RUN npm install https://storage.googleapis.com/gae_node_packages/semver.tar.gz && \
(node -e 'var semver = require("semver"); \
if (!semver.satisfies(process.version, "~0.12.0")) \
process.exit(1);' || \
@flovilmart
flovilmart / app.yaml
Created December 25, 2015 17:36
Parse on Google App Engine
runtime: nodejs
vm: true
api_version: 1
env_variables:
PORT: '8080'
# The parsre configuration for parse-anywhere
PARSE_APPLICATION_ID: PLACEHOLDER_FILL_ME
PARSE_JAVASCRIPT_KEY: PLACEHOLDER_FILL_ME
PARSE_MASTER_KEY: PLACEHOLDER_FILL_ME
# optional
function isMobile() {
var ua = navigator.userAgent.toLowerCase();
var isAndroid = ua.indexOf("android") > -1;
var isiPhone = ua.indexOf("iphone") > -1;
var isiPod = ua.indexOf("ipod") > -1;
return (isAndroid || isiPhone || isiPod);
}
// In the callback
if(isMobile()) {
@flovilmart
flovilmart / README.md
Last active August 29, 2015 14:03
Custom require for Parse

require.js for Parse

##How to use

in main.js :

var require2 = require("cloud/require.js");
require2("cloud/app");

// same as