Skip to content

Instantly share code, notes, and snippets.

View gfosco's full-sized avatar

Fosco Marotto gfosco

  • Gab.com
  • Florida
View GitHub Profile
@gfosco
gfosco / gist:8c80e3b88639fd7d300b
Created April 10, 2015 02:07
Nikitas Xcode 6.3 instructions
- Open Xcode
- CMD+ALT+SHIFT+K
- Answer "Yes"
- Build again
Cleaning derived data folder is a common scenario.
Oh - one more thing...
Do not override Parse.framework folder, but delete-add it.
@gfosco
gfosco / PushBehaviorScript.cs
Last active October 12, 2017 04:04
Parse Push for Unity iOS
using UnityEngine;
using System.Collections;
using Parse;
public class PushBehaviorScript : MonoBehaviour {
bool tokenSent = false;
public ParseObject currentInstallation = null;
void Start () {
@gfosco
gfosco / AppDelegate.cs
Last active September 19, 2017 20:50
Parse Push on Xamarin iOS
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
using Xamarin.Forms;
using Parse;
@gfosco
gfosco / metadata.js
Last active November 23, 2016 05:49
I have an idea.. but still not a compelling example for it.
var moment = require('moment');
TestObjectMeta = Parse.Object.extend("TestObject_meta");
Parse.Cloud.beforeSave("TestObject", function(request, response) {
var obj = request.object;
if (obj.isNew()) {
var at = moment();
var metadata = new TestObjectMeta();
metadata.set('year', at.year());
@gfosco
gfosco / gist:131974d200c5e9fc6c94
Last active April 5, 2022 22:10
parse-jobqueue

README.md:

parse-jobqueue

The Parse Cloud Code job queue. Define, queue, and process work on a constant basis.

USAGE

First, you'll want to define some jobs:

// Add these two method declarations to the Parse.framework/Headers/PFObject.h header file in your Xcode project:
- (void)serializeToDataFile:(NSString *)filename;
+ (id)objectFromDataFile:(NSString *)filename;
// and you can start saving and loading PFObject on disk
PFObject *object = [PFObject objectWithClassName:@"Todo"];
[object setObject:@"Sample Text" forKey:@"text"];
// The before save handler will pass information to the after save handler to disable the
// after save handler from creating a loop.
// It also prevents client side code from triggering the silent change, by using a different flag
// that the client should never see.
// It should only be visible in the data browser, won't be sent to a client in an undefined state.
Parse.Cloud.beforeSave('TestObject', function(request, response) {
handleComingFromTask(request.object);
response.success();
});
@gfosco
gfosco / gist:953f05aec7e390701723
Created May 27, 2013 20:58
beginnings of a wrapper script to test cloud code functions locally
// cclocal
Parse = require('parse');
Parse.Cloud = {};
Parse.Cloud.Functions = {};
Parse.Cloud.define = function(funcName,func) {
Parse.Cloud.Functions[funcName] = func;