Transforms the data of a given Spreadsheet Sheet to JSON.
- The frozen rows are taken as keys for the JSON.
- The data taken for the values is only that after the frozen rows
exportJSON(Spreadsheet)
- transforms the data in the given sheet to JSON.
function onOpen() { | |
var menuEntries = [{ name: "Download JSON", functionName: "convertToJson" }]; | |
var sheet = SpreadsheetApp.getActiveSpreadsheet(); | |
sheet.addMenu("Utils", menuEntries); | |
} | |
function convertToJson() { | |
const sheet = SpreadsheetApp.getActiveSheet(); | |
const lastRow = sheet.getLastRow(); |
# Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
# GitLab uses docker in the background, so we need to specify the | |
# image versions. This is useful because we're freely to use | |
# multiple node versions to work with it. They come from the docker | |
# repo. | |
# Uses NodeJS V 9.4.0 | |
image: node:9.4.0 | |
# And to cache them as well. |
Create file /etc/systemd/system/[email protected]
. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin
, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
Adyen Test Card Numbers | |
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform. | |
For all cards use the following expiration and CVV2/CVC2/or CID for Amex. | |
For all cards: | |
Expiration Dates CVV2 / CVC3 CID (American Express) | |
08/2018 OR 10/2020 737 7373 |
-- STACKS | |
type Stack a = Bottom | Element a (Stack a) | |
push : a -> Stack a -> Stack a | |
push element stack = | |
Element element stack | |
pop : Stack a -> (Maybe a, Stack a) |
Windows is really horrible system for developers and especially for devops. It doesn’t even have a usable terminal and shell, so working with command line is really pain in the ass. If you really don’t want to switch to any usable system (OS X, Linux, BSD…), then this guide should help you to setup somewhat reasonable environment – usable terminal, proper shell, ssh client, git and Sublime Text as a default editor for shell.
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
var FORMAT_ONELINE = 'One-line'; | |
var FORMAT_MULTILINE = 'Multi-line'; | |
var FORMAT_PRETTY = 'Pretty'; | |
var LANGUAGE_JS = 'JavaScript'; | |
var LANGUAGE_PYTHON = 'Python'; |
/** | |
* Retrieves all the rows in the active spreadsheet that contain data and logs the | |
* values for each row. | |
* For more information on using the Spreadsheet API, see | |
* https://developers.google.com/apps-script/service_spreadsheet | |
*/ | |
function readRows() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var rows = sheet.getDataRange(); | |
var numRows = rows.getNumRows(); |
## | |
# by SoAwesomeMan | |
str =<<-EOS.gsub(/^[\s\t]*|[\s\t]*\n/, '') # no space "\s" for new line "\n"; kill tabs too | |
select awesome, awesome, awesome, awesome, awesome, awesome, | |
from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, | |
where cool cool cool cool cool cool cool cool cool cool cool' | |
EOS | |
# => "select awesome, awesome, awesome, awesome, awesome, awesome,from rad, rad, rad, rad, rad, rad, rad, rad, rad, rad, rad,where cool cool cool cool cool cool cool cool cool cool cool'" | |
str =<<-EOS.gsub(/^[\s\t]*/, '').gsub(/[\s\t]*\n/, ' ').strip # yes space "\s" for new line "\n"; kill tabs too |