Skip to content

Instantly share code, notes, and snippets.

View zeteticl's full-sized avatar

Sad zeteticl

View GitHub Profile
@zeteticl
zeteticl / child.js
Created January 19, 2021 08:35 — forked from ndelangen/child.js
NodeJS child_process communication (IPC) example
if (process.send) {
process.send("Hello");
}
process.on('message', message => {
console.log('message from parent:', message);
});
// import_json_appsscript.js
// https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4
//
// Changelog:
// (Oct. 16 2019) tag: allenyllee-20191016
// 1. Fixed google script error: urlfetchapp - service invoked too many times https://stackoverflow.com/questions/10598179/google-apps-script-urlfetchapp-service-invoked-too-many-times
// (Jul. 16 2018) tag: allenyllee-20180716
// 1. Fixed the issue "If you try to query /arrayA[k]/arrayB[n]/arrayC[m]/.../member, you will always get /arrayA[k]/arrayB[k]/arrayC[k]/.../member."
// (Nov. 30 2017) tag: allenyllee-20171130
// 1. Add the ability to query array elements by using xpath like "/array[n]/member" where "n" is array index
/**
* 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();
[on("ready", function () {
//Wait until the ready event fires so we know the game is completely loaded.
//Get a reference to our patrolling token.
// Begins
start();
});
function start() {
/**
*
* Copyright (C) 2015 Ken L.
* Licensed under the GPL Version 3 license.
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* Andy W.
* Shu Zong C.
* Carlos R. L. Rodrigues
@zeteticl
zeteticl / centos-initial-lamp.sh
Created July 3, 2017 11:53 — forked from oddevan/centos-initial-lamp.sh
Shell script to set up CentOS 7 server with LAMP. Must be run as root interactively.
#!/usr/bin/env bash
# This is designed to get a CentOS 7 system up and running
# from absolutely nothing. It will install the LAMP stack
# as well as RVM and Phusion Passenger
# Run this as root
yum update