This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Part of this code up to END OF (c) is: | |
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
All code apart from getPlusones() | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var DateTime = function() { | |
var now = new Date(); | |
this.year = now.getFullYear(); | |
this.month = ('00' + now.getMonth()).slice(-2); | |
var monthEndDate = new Date(this.year, this.month, 0); | |
this.startDate = this.year + '-' + this.month + '-01'; | |
this.endDate = this.year + '-' + this.month + '-' + monthEndDate.getDate(); | |
} | |
var Profile = function(profileName, tableId) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* POST data from a Google Spreadsheet to a remote URL, via menu option Add-ons > Post values | |
* See: http://www.google.com/google-d-s/scripts/guide.html for more info | |
*/ | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheet = ss.getSheets()[0]; | |
var r = sheet.getRange("B5"); | |
function onOpen() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// INSTRUCTIONS: | |
// 1. Start a new form in Google docs | |
// 2. Go to Tools > Script editor from the spreadhseet | |
// 3. Paste in the below code | |
// 4. Go to Triggers > Current script's triggers | |
// 5. Add a new trigger | |
// 6. Select "onFormSubmit" then "On Form Submit" from the third select box. Click save. | |
// 7. Save the script and go back to your spreadsheet. You should see a "WHD Options" menu. | |
// 8. Click WHD Options > Ticket settings and enter the API key (from WHD's user setting screen) and the URL to your "Create Ticket" post. The script will automatically append "?apiKey=xxx" to the end of this URL. | |
// 9. Use the email settings in the WHD Options if you want to email users with their WHD ticket. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Google Apps Script for adding Email Notifications to Google Docs */ | |
/* For video and implementation, go to http://labnol.org/?p=20884 */ | |
function sendFormByEmail(e) | |
{ | |
// Remember to replace XYZ with your own email address | |
// Also, don't miss the semicolon | |
var email = "XYZ"; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="wrapper"> | |
<form id="paper" method="get" action=""> | |
<div id="margin">Title: <input id="title" type="text" name="title"></div> | |
<textarea placeholder="Enter something funny." id="text" name="text" rows="4" style="overflow: hidden; word-wrap: break-word; resize: none; height: 160px; "></textarea> | |
<br> | |
<input id="button" type="submit" value="Create"> | |
</form> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This template was designed by Amit Agarwal of Digital Inspiration (www.labnol.org) --> | |
<!-- The design and template is licensed under a Creative Commons Attribution 3.0 License --> | |
<!-- Please see http://www.labnol.org/?p=25841 for instructions on how to modify the file --> | |
<html> | |
<head> | |
<title>QR Code</title> | |
<meta name="HandheldFriendly" content="True"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Do whatever you'd like with the script! Show it off, mod it up, post it places, or whatever. :) | |
// (If you do, I wouldn't mind a Twitter shoutout at @_slinehan when appropriate!) | |
$imageURL = "URL HERE"; | |
$image = imagecreatefromjpeg($imageURL); | |
$width = imagesx($image); | |
$height = imagesy($image); | |
// First, let's resize the image to something manageable while maintaining aspect ratio. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas id='canvas'></canvas> | |
<span id='info'>Click and drag to draw!<span> | |
<!-- | |
Drawing with text: | |
- Click and drag to draw. | |
- Double click to clear. | |
Ported from java at http://www.generative-gestaltung.de |