Skip to content

Instantly share code, notes, and snippets.

@agramonte
agramonte / AdIntegrator.java
Created February 28, 2021 18:36
buildbox 3.x custom appodeal sdk integration
package com.buildbox.adapter.custom;
import android.app.Activity;
import android.util.Log;
import com.appodeal.ads.Appodeal;
import com.appodeal.ads.BannerCallbacks;
import com.appodeal.ads.InterstitialCallbacks;
import com.appodeal.ads.RewardedVideoCallbacks;
import com.appodeal.ads.api.App;
// ====================================================================================================
//
// Cloud Code for analytics, write your code here to customize the GameSparks platform.
//
// For details of the GameSparks Cloud Code API see https://docs.gamesparks.com/
//
// ====================================================================================================
var baseURL = "https://api2.amplitude.com/2/httpapi"
//Required
<?php
if( $_GET["api_key"] && ($_GET["user_id"] || $_GET["device_id"] ) && $_GET["event_type"] ) {
// Required data
$data = array(
'event_type' => $_GET['event_type']
);
if( $_GET["user_id"] ) {
@agramonte
agramonte / nodejsDreamModule.js
Last active March 20, 2021 17:08
Retrieves Geo location from the header ip.
let ip = event.headers["x-forwarded-for"];
let event_type = steps.trigger.event.query.event_type;
let api_key = steps.trigger.event.query.api_key;
var geo;
var geoip = require('geoip-lite');
if (ip) {
geo = geoip.lookup(ip);
<script type="text/javascript">
//Modify these items.
const DOMAIN_KEY = "<youdomainKey>";
const GAME_KEY = "<gameKey>";
const GAME_VERSION = "<gameVersion>";
const DEV_MODE = true;
</script>
<!DOCTYPE html>
<html>
@agramonte
agramonte / savetable.js
Last active December 20, 2022 19:56
GameSalad: Save and retrieve table by guid.
exports = function(payload, response) {
const uuid = require('uuid')
var {userId} = payload.query;
//Gets a blank table from the game collection to store all the user properties.
let getBlankRecord = function() {
var newUserId = uuid.v4(); //New Guid
let filter = {};
filter["Name"] = "gameVariables"; //Name of table.