Skip to content

Instantly share code, notes, and snippets.

View flovilmart's full-sized avatar
📈

Florent Vilmart flovilmart

📈
View GitHub Profile
@flovilmart
flovilmart / README.md
Last active December 28, 2015 03:19
The ultimate TestFlight automated distribution script

How to use?

Setup your variables (User defined build settings)

  • TF_API_TOKEN="YOUR API TOKEN"
  • TF_TEAM_TOKEN="YOUR TEAM TOKEN"
  • TF_DISTRIBUTION_LISTS="Comma separated list for distribution"
  • TF_NOTIFY=True|False -> Notify the distribution list that a new build is available
  • TF_USE_GIT_LOG=0-n -> Will use the last n git logs (pretty) as note for distribution
@flovilmart
flovilmart / ParseFacebook.js
Created February 9, 2014 22:01
Parse / Facebook wrapper
var FacebookAPI = function(app_id, app_secret) {
return {
auth_url : "https://graph.facebook.com/oauth/access_token?"+
"client_id=" + app_id +
"&client_secret=" + app_secret +
"&grant_type=client_credentials",
setAppToken: function(app_token){
this.app_token = app_token;

HOW TO USE


var Twitter = require("cloud/Twitter.parse.js");

// a user that has logged in with twitter
var user = Parse.User.current();

// Works with that object if colledted otherwise :)
var authData = {
@flovilmart
flovilmart / async.js
Created June 19, 2014 18:52
parse compatible async module
var self = this;
var async = {};
// global on the server, window in the browser
var root = this,
previous_async = root.async;
async.noConflict = function () {
root.async = previous_async;
return async;
@flovilmart
flovilmart / Procfile
Last active March 12, 2018 20:15
Simple Queue for Parse hosted on Heroku with Kue, Redis
web: node web.js
worker: node worker.js
@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

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 / 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
@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 / .dockerignore
Created December 25, 2015 18:01
Parse on Google Cloud Platform, Custom container
node_modules
.dockerignore
Dockerfile
npm-debug.log
.git
.hg
.svn