Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Morris brainysmurf

View GitHub Profile
@brainysmurf
brainysmurf / Make Table.md
Last active Oct 13, 2015
README Table Maker.md
View Make Table.md

A simple Google Document that helps you make tables. Useful for teachers.

  • You can simply make a copy of this document and follow the instructions.
View Blanker.md

"Blankifier" allows teachers to quickly create a document where every "N" word is replaced with a "blank".

To get started, copy and paste the below into a Google Doc's script editor. Copy and paste text into the document, then click on Blanker -> Blanify

Features:

  • Decide how many words to skip before deciding to blank
  • Automatically skips words <= 3 words
@brainysmurf
brainysmurf / Today's Entries.md
Last active Oct 13, 2015
Attach to the responses spreadsheet and set up trigger. Anyone with editing or viewing privileges will be emailed a simple summary of any entries that happened on that day.
View Today's Entries.md

“Today's Entries" an administrative tool for schools.

  • Adds notifications and data collation to the "responses" Google Sheet (or any Google Sheet)

Copy and paste the below into the script editor, and configure the trigger to run once per day. For further modifications, see the comments in the script.

@brainysmurf
brainysmurf / Daily Notices.md
Last active Oct 19, 2015
Implementation for a "Daily Notices" for a school that wants to use GAFE exclusively. Use a google form to populate the entries.
View Daily Notices.md

Manage your daily notices, or bulletin, entirely within your GAFE, no servers or databases required. This is done by creating a Google Form, and then adding the following scripts to the responses sheet that the form populates onto. Optionally create a Google Site to publish the notices.

Workflow:

  • Users enter into a Google form, and they get picked up and sent to staff either:
    • published onto a Google Site
    • sent out by email
    • both (published onto a site, and then email with link sent out)
  • Users can enter notices in advance
  • Users can enter notices for a date range
  • Have any number of sections ("Whole School", "Secondary", etc.), and notices are collated by those sections
@brainysmurf
brainysmurf / closeDownAndOpenUp.gs
Last active Nov 4, 2015
Close Down and Open Up Editors via Script
View closeDownAndOpenUp.gs
/*
Use this at your own risk.
1) Enter the ID of the folder which contains the files you would like to remove and restore edit access
2) Then running triggerCloseDown will save those editors and remove edit access (and view access) for all editors of that file
3) Then running triggerOpenUp will lookup editors of each file and restore editing access
NOTES:
View pullFromManagebac.gs
// Exmample of options
var options = {
method: "POST",
contentType : "application/json",
payload: JSON.stringify({
secret: 'you will have to ask me',
awesome_table_filters: {
first_nickname_last: 'StringFilter',
parent_email_1: 'StringFilter',
View languagetools.gs
var gl = false; // for debugging
function onOpen() {
var ui = DocumentApp.getUi();
ui.createMenu('Actions')
.addItem('Insert newline every N lines', 'actionEveryNLines')
.addItem('Make Table', 'actionAppendTable')
.addSeparator()
.addItem('Blankify', 'actionBlankify')
.addItem('Tokenize Sentences', 'actionTokenizeSentences')
View proxyWebApp.gs
/*
There is a bug in the proxy provided by awesometables
In a google domain, email addresses should case insensitive
*/
function doGet(e) {
var currentUser = Session.getActiveUser().getEmail().toLowerCase();
var ssUrl = e.parameter.url;
var sheetName = e.parameter.sheet;
var a1Notation = e.parameter.range;
View awesomeTableWebAppImproved.gs
/*
In a google domain, email addresses are (probably?) case insensitive
Also, return a date object instead with defined formatting
*/
function doGet(e) {
var currentUser = Session.getActiveUser().getEmail().toLowerCase();
var ssUrl = e.parameter.url;
View jquerysitesgadget.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs title="hello world example" />
<Content type="html">
<![CDATA[
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
]]>
</Content>
</Module>