Skip to content

Instantly share code, notes, and snippets.

@tiblu
tiblu / GoogleAppScriptLogger.gs
Created April 12, 2017 09:30
GoogleAppScript - Logger
/**
* LOG
*
* Basic HTTP logger.
*/
var Logger = function() {
var _LEVELS = {
DEBUG: 1,
INFO: 2,
ERROR: 3
@tiblu
tiblu / GoogleAppScriptSpreadsheetExportToJson.gs
Last active April 12, 2017 09:30
Google App Script - Spreadsheet - Export to JSON
/**
* Script to export Spreadsheet content as JSON
*
* The script, when onDocumentOpen is set up via triggers, creates an extra menu item "Actions" where the script can be run.
* Originally designed to use Spreadsheets as web translation tool. Sheet contains columns for each language and first row is considered header column which is not exported.
**/
//Global
var ss = SpreadsheetApp.getActiveSpreadsheet();
var activeSheet = ss.getActiveSheet();
@tiblu
tiblu / DDSProxyNginx.conf
Created January 17, 2018 12:45
DigiDocService (http://sk-eid.github.io/dds-documentation/) Nginx proxy configuration
server {
listen 8000;
server_name dds.mydomain.com;
access_log /var/log/nginx/dds.mydomain.com.access.log;
error_log /var/log/nginx/dds.mydomain.com.error.log;
ssl on;
ssl_certificate /my/server/cert/dds.mydomain.com.bundle.crt;
ssl_certificate_key /my/server/cert/private/dds.mydomain.com.key;