Skip to content

Instantly share code, notes, and snippets.

@tant42
tant42 / index-poki.html
Created January 6, 2025 05:34
GameSalad + PokiSDK
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<link rel="stylesheet" type="text/css" href="css/gse-style.css" />
<link rel="stylesheet" type="text/css" href="css/gse-style-loading.css" />
<style type="text/css">
body {
@tant42
tant42 / gscode.gs
Last active March 6, 2020 22:33
GameSalad / Google Sheets API
/**
* This script when Publish / Deployed as a web app,
* will turn a Google sheet into an API that can communicate with a GameSalad game through it's Network Behaviors.
*
* For this example, table column type and name information is stored in the first two rows.
* Table row name information is in the first column.
*
* POST: Table data is stored in sheet in the document matching the table's tableId
* GET: The script will respond with a GameSalad Table pulling data from the sheet matching the 'tableId' parameter.
*/
@tant42
tant42 / gist:6141440
Created August 2, 2013 16:50
Quick script to find out what the difference between your local repository and what's currently deployed.
#!/bin/bash
SERVER_HEAD=`ssh $1 "cd /var/www/apps/$2/current && git rev-parse HEAD"`
echo $SERVER_HEAD
git log --graph --oneline $SERVER_HEAD..HEAD
@tant42
tant42 / gist:5191287
Created March 18, 2013 22:12
JS to convert GMT to local time.
// Server sends GMT, adjust to local time.
var localDate = new Date(data.date)
localDate = new Date(localDate.getTime() - (localDate.getTimezoneOffset() * 60 * 1000))