Skip to content

Instantly share code, notes, and snippets.

View erinlin's full-sized avatar

YuShan Lin (Erin) erinlin

View GitHub Profile
-- table library extensions
-- allows the table.copy function to return a shallow copy of a range of the table items
-- Example:
--local t={1,2,3,4,5,6,7,8,9,10}
--dump(table.copy(t,3,8))
--prints out 3,4,5,6,7,8
local table_copy = table.copy
table.copy = function( t, ... )
if (type(arg[1]) == "number" and (arg[2] == nil or type(arg[2]) == "number")) then
-- Project: Dropbox Module
-- Description: A module for accessing Dropbox from Lua/CoronaSDK using the Dropbox REST API. Module written
-- by F. E. Torkel, based off code by Michael Weingarden.
local lfs = require( "lfs" )
local json = require( "json" )
local M = {}
var content = '';
var boundary = '---------------------------170062046428149';
content += '--'+ boundary + '\r\n';
content += 'Content-Disposition: form-data; name="uploadToken"\r\n';
content += '\r\n';
content += upload_token + '\r\n';
content += '--'+ boundary + '\r\n';
content += 'Content-Disposition: form-data; name="destFolderPath"\r\n';
content += '\r\n';