Recently, console logging became available for Google Apps Script projects. It used to
be impossible to use the Log service that comes with the GAS runtime, but now all
you need to do is throw
an exception. Exceptions get logged in stackdriver logging and
when enabled, unhandled exceptions will not stop your script execution. This adds up
to nearly 0 lag if you are using this feature (?) by purposely throwing exceptions, and you
can get creative with your error message to avoid having to expand stackdriver's log messages
(which are pretty comprehensive stacktraces!)
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
license: gpl-3.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
#!/bin/sh | |
# vax | |
# 09-17-96 Bob Ess - initial creation | |
# 09-26-96 Shig Katada - Additional keybindings | |
# | |
# Script file to incorporate keybindings and command line | |
# options for connecting to a VAX node | |
# Usage statement |
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
!! Call xterm like so: | |
!! | |
!! xterm $XTERMFLAGS +rw +sb +ls $@ -tm 'erase ^? intr ^c' \ | |
!! -name vt220 -title vt220 -tn xterm-220 "$@" & | |
!! | |
XTerm*VT100.translations: #override \n\ | |
<Key>Home: string(0x1b) string("[3~") \n \ | |
<Key>End: string(0x1b) string("[4~") \n | |
vt220*VT100.translations: #override \n\ | |
~Shift <Key>F1: string(0x1b) string("OP") \n \ |
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
# -*- coding: utf-8 -*- | |
# Based on http://flask.pocoo.org/snippets/118/ | |
from flask import Flask | |
from flask import Response | |
from flask import stream_with_context | |
import requests | |
app = Flask(__name__) |
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
function onEdit() { | |
// This script records changes to the spreadsheet on a "Changelog" sheet. | |
// The changelog includes these columns: | |
// "Timestamp", "Sheet name", "Cell address", "Column label", "Row label", "Value entered" | |
// Version 1.1, written by --Hyde, 30 July 2014 | |
// See https://productforums.google.com/d/topic/docs/7CaJ_nYfLnM/discussion | |
// edit the following lines to suit your needs | |
// changes are only recorded from sheets listed below | |
// escape regular expression metacharacters as in \. \$ \+ \* \? \( \) \[ \] |
I hereby claim:
- I am hlecuanda on github.
- I am hlecuanda (https://keybase.io/hlecuanda) on keybase.
- I have a public key whose fingerprint is B67A 1066 07FB F278 7A74 1F18 8666 B944 3E6B 25DF
To claim this, I am signing this object:
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
/** | |
* @OnlyCurrentDoc Limits the script to only accessing the current spreadsheet. | |
*/ | |
/** | |
* After installing, select a column where the values repeat on each row, for example | |
* a flattened table with dates, invoice numbers, and invoice lines. like this: | |
* | |
* Date |Invoice#| PartNo |Descr .... | |
* 2017-01-15 | 123456 | ACME-WCMCI-1 | ACME WHATCHAMACALLIT 1 |
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
function runQuery(querySelector) { | |
// Replace this value with the project ID listed in the Google | |
// Cloud Platform project. | |
var projectId = 'your-project-id-not-project-name'; | |
if (querySelector){ // be creative, construct your own dynamic query with parameters. or something | |
var request = { | |
query: 'SELECT * FROM project.dataset.table', | |
useLegacySql: false // set to true to use strange sql from the past | |
}; |
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
#!/usr/bin/env python | |
# −*− coding: UTF−8 −*− | |
# Las dos lineas anteriores se aseguran #1 de localizar el | |
# interpretador para poder usar el script directamente | |
# y #2 de definir la codificacion de la fuente. Solo es | |
# buena educacion, =) | |
#import sys # con argparse y la linea shebang! (#!) ya no lo ocupas | |
import argparse # modulo utilisimo para lineas de comando | |
import RPi.GPIO as GPIO |