Skip to content

Instantly share code, notes, and snippets.

View peter-mach's full-sized avatar
🎯
Focusing

Peter peter-mach

🎯
Focusing
View GitHub Profile
@peter-mach
peter-mach / exportSubscriptionData.js
Created August 21, 2023 05:40 — forked from ashleyrudland/exportSubscriptionData.js
Find churn reasons by sucking out all Stripe subscriptions (includes all subscriptions)
const fs = require('fs');
const moment = require('moment');
const stripe = require('../stripe');
const hashCode = (str) => {
let hash = 0;
if (typeof str !== 'string' || str.length === 0) {
return String(hash);
}
for (let i = 0; i < str.length; i++) {
------------------------------------------------------------------------------------------------------------------------
--Convex Separator for Box2D Flash for Corona SDK
--The original class has been written by Antoan Angelov.
--This LUA port was done by Ragdog Studios SRL (http://www.ragdogstudios.com)
--It is designed to work with Erin Catto's Box2D physics library implementation in Corona SDK (http://www.coronalabs.com)
--Everybody can use this software for any purpose, under two restrictions:
--1. You cannot claim that you wrote this software.
--2. You cannot remove or alter this notice.
--How to use it:
@peter-mach
peter-mach / unzip_folder.lua
Created April 26, 2015 15:23
Unzipping the compressed folder with CoronaSDK zip plugin
local zip = require 'plugin.zip'
local zipFileName = 'zippedFolder.zip'
local function unzipListener( event )
print('unzipping complete')
end
local unzipOptions = {
zipFile = event.response.fileName,
zipBaseDir = system.TemporaryDirectory,
@peter-mach
peter-mach / Corona
Created January 10, 2015 16:49
CoronaSDK simulator launch script directing output to the terminal
#!/bin/bash
path=`dirname "$0"`
if [[ -f "$path/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator" ]]
then
"$path/CoronaSDK/Corona Simulator.app/Contents/MacOS/Corona Simulator" -no-console YES "$@"
else
echo "ERROR: Could not find \"Corona Simulator.app\" in: $path"
fi
sleep 2 # prevent us being short-lived