Skip to content

Instantly share code, notes, and snippets.

View tomjaimz's full-sized avatar

Tom Spence tomjaimz

  • Stockholm
  • 23:39 (UTC +02:00)
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<script src="//sdk.scdn.co/spotify-player.js"></script>
</head>
<body>
<pre>Open Console</pre>
<script>
let token;
let sdkReady;
@tomjaimz
tomjaimz / ICS Import.gs
Last active January 2, 2024 12:12
Google App Script code to import events from a Calendar (.ics) file into Google Sheets.
function onOpen() {
SpreadsheetApp.getUi().createAddonMenu().addItem('Upload', 'upload').addToUi();
}
function upload() {
SpreadsheetApp.getUi().showModalDialog(HtmlService.createHtmlOutput(
'<form><input type="file" name="file" onchange="var reader = new FileReader(); reader.onloadend = (e) => google.script.run.withSuccessHandler(google.script.host.close).importICS(e.target.result); reader.readAsText(this.parentNode.file.files[0]);"></form>'
), 'Select .ics file');
}

Keybase proof

I hereby claim:

  • I am tomjaimz on github.
  • I am tom_sw (https://keybase.io/tom_sw) on keybase.
  • I have a public key ASD0Mzu8Z8yUi6_csgsQBiFiayp_GmrFZc3i1pP4-rzTtAo

To claim this, I am signing this object: