Skip to content

Instantly share code, notes, and snippets.

@tariqhamid
tariqhamid / index.html
Created January 25, 2016 23:42 — forked from anonymous/index.html
tGkby
<html ng-app="ionicApp">
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>Side Menus</title>
<link href="http://code.ionicframework.com/1.0.0-beta.11/css/ionic.css" rel="stylesheet">
<script src="http://code.ionicframework.com/1.0.0-beta.11/js/ionic.bundle.js"></script>
</head>
@tariqhamid
tariqhamid / EcTimelineExample1.st
Created February 25, 2016 10:23 — forked from mumez/EcTimelineExample1.st
Upcoming EnchantFromAmber example
EcGameProgram subclass: #EcTimelineExample
instanceVariableNames: ''
package: 'Enchant-Examples'!
!EcTimelineExample methodsFor: 'actions'!
prepareBeforeLoad
self game assetsBasePath: './game-img/'.
self game preloadAssets: #('chara1.png').
self game fps: 20.
@tariqhamid
tariqhamid / EcTouchEventExample.st
Created February 25, 2016 10:23 — forked from mumez/EcTouchEventExample.st
EnchantFromAmber touch event handling example
EcGameProgram subclass: #EcTouchEventExample
instanceVariableNames: ''
package: 'Enchant-Examples'!
!EcTouchEventExample methodsFor: 'actions'!
prepareBeforeLoad
self game assetsBasePath: './game-img/'.
self game preloadAssets: #('chara1.png' 'icon0.png').
self game fps: 20.
@tariqhamid
tariqhamid / EcShootingGameExample.st
Created February 25, 2016 10:24 — forked from mumez/EcShootingGameExample.st
EnchantFromAmber shooting game example
EcSprite subclass: #EcExampleApple
instanceVariableNames: ''
package: 'Enchant-Examples'!
!EcExampleApple methodsFor: 'initialization'!
initialize
self extent: 16@16.
self imageName: 'icon0.png'.
self frame: 15.
@tariqhamid
tariqhamid / bulkSyncToCouchDb.js
Created June 18, 2016 13:02
Send Google Apps Script data to a Cloudant CouchDB database.
//Send Google Apps Script data to a Couch DB database
function syncWithDB(data){
var username = ScriptProperties.getProperty('user');
var password = ScriptProperties.getProperty('pass');
var url = 'https://[username].cloudant.com/[dbname]/_bulk_docs';
var params = {
"method" : "post",
"contentType":"application/json",
"validateHttpsCertificates" :false,
"payload" : JSON.stringify(data),
@tariqhamid
tariqhamid / index.html
Created June 20, 2016 14:05 — forked from rdmpage/index.html
GBIF data overlayed on Google Maps
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>GBIF and Google Maps</title>
<style type="text/css">
body {
margin: 0;

Google Apps Script Gmail Utilities

##sendAndLabel(recipient, subject, body, options, label)##

An alternative to GmailApp.sendEmail(), which applies a label to the message thread in the sender's account.

Sends an email message with optional arguments. The email can contain plain text or an HTML body. The size of the email

@tariqhamid
tariqhamid / GCalUtils.md
Created June 21, 2016 17:50 — forked from mogsdad/GCalUtils.md
Collection of Google Calendar related utility functions for Google Apps Script.

Google Calendar Utilities

getEventsWithGuest

Gets all events that occur within a given time range, and that include the specified guest email in the guest list.

###Parameters:###

Calendar Copier

This Google Apps Script runs in a spreadsheet, where it prompts the user for the identity of two calendars, and a range of dates, then copies the corresponding events from one calendar to the other.

Caveats

This script is incomplete, ignoring a number of event attributes. (Feel free to enhance it, if you wish!) There are also some known issues:

  • All Day Events aren't really all day events. The createAllDayEvent() method should take care of this, but doesn't. Google Bug.
  • Recurrence isn't supported. (You can't find out the recurrence of existing events, so cannot recreate it.)

SheetConverter library (formerly "Spreadsheet to HTML")

This is the source repository for the SheetConverter Google Apps Script library.

Libary documentation is available here.

Caveats

This script is incomplete, ignoring some types of formatting. (Feel free to fork and enhance it, if you wish! Broadly applicable enhancements can be merged and the library updated) There are also some known issues: