Skip to content

Instantly share code, notes, and snippets.

@piXelicidio
piXelicidio / 3DSales.js
Last active April 18, 2023 19:43
Script for Google Spreadsheet: Parse GMail messages for SketchFab sales and feed the spreadsheet with the data.
function CalcMonthly() {
let database = SpreadsheetApp.getActive();
let sfTable = database.getSheetByName("SketchFabTable");
var sfMonthly = database.getSheetByName("Dashboard");
sfMonthly.clear();
sfMonthly.appendRow(["Month", "Earnings", "Number of Sales"]);
var count = sfTable.getLastRow();
var currMonth = -1;
var currYear = -1;
import os
#function to fix the new CSV format coming from TurboSquid in order work with the old statistics application: https://www.turbosquid.com/FullPreview/Index.cfm/ID/1002949
#by Denys Almaral (https://twitter.com/denysalmaral)
def fixCSV(fileName):
newLines=[]
newLines.append('\n')
newLines.append('"Sales Monthly Details"\n')
newLines.append('"Filter: Year,Month,"\n')
@piXelicidio
piXelicidio / api.lua
Created March 27, 2017 18:34
Corona SDK or Love2D detect
-- Dirty trick to detect if Corona SDK or Love ;)
-- first time we require this module it will be inialized with the current detected SDK
if display~=nil then
-- maybe is corona sdk
if display.newImage~=nil then
-- pretty sure it is
print "Running: Corona SDK"
api = require('code.coronaapi')
end
elseif love~=nil then