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 / Excel VBA - Send GET Request
Created June 16, 2016 18:11 — forked from remoharsono/Excel VBA - Send GET Request
Using Excel VBA to Send HTTP GET Request to Web Server
Private Sub cmdKirimGET_Click()
Dim strResult As String
Dim objHTTP As Object
Dim URL As String
Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
URL = "http://localhost/search.php"
objHTTP.Open "GET", URL, False
objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
objHTTP.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
objHTTP.send ("keyword=php")
@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 / Google Apps Script Survey Workflow.md
Created June 21, 2016 17:49 — forked from mogsdad/Google Apps Script Survey Workflow.md
Google Apps Script workflow for an email survey. Written in response to StackOverflow question 18668828. http://stackoverflow.com/a/18669532/1677912

Google Apps Script Survey Workflow

The components involved in this workflow are:

  • A script to generate and send an email with an HTML form.
  • An html template for that email, which allows us to customize the email for each recipient.
  • A doPost() function to handle responses. The script must be [deployed as a Web App][1].
  • A spreadsheet to collect responses. The script will be contained in the spreadsheet, and extends the spreadsheet UI with a menu for sending a copy of the survey. (It could be adapted for standalone use, without the UI component.)

Here is an example of such a workflow, conducting a Commuting Survey. Recipients will receive a survey email like this:

@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:###