Skip to content

Instantly share code, notes, and snippets.

If you want to truly understand something, try to change it.

Hoang Trinh piavgh

If you want to truly understand something, try to change it.
View GitHub Profile
Chetan07j /
Last active Jan 8, 2021
robomongo 3t installtion and creating shortcut
cd /tmp || exit
echo "Downloading Robomongo ..."
wget -q
tar -xzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
rm robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
echo "Installing to opt..."
if [ -d "/opt/RoboMongo" ];then
sudo rm -rf /opt/RoboMongo
andrewroberts /
Last active Aug 30, 2020
This is a Google Apps Script that creates a PDF file using a Google Doc template and the values in a Google Spreadsheet. It is based on but allows placeholders to be used in the filename.
// dev:
// Replace this with ID of your template document.
var TEMPLATE_ID = ''
// var TEMPLATE_ID = '1wtGEp27HNEVwImeh2as7bRNw-tO4HkwPGcAsTrSNTPc' // Demo template
// Demo script -
// You can specify a name for the new PDF file here, or leave empty to use the
// name of the template. Placeholders can also be placed in here.
tanaikech /
Last active Feb 5, 2021
Multipart-POST Request Using Google Apps Script

Multipart-POST Request Using Google Apps Script

April 20, 2019: GAS library for this situation was published. Please check it at

These sample scripts are for requesting multipart post using Google Apps Script.

In most cases, the multipart request is used for uploading files. So I prepared 2 sample situations as follows. For each situation, the request parameters are different.

  1. Upload a file from Google Drive to Slack.
  2. Convert an excel file to Spreadsheet on Google Drive using Drive API v3.
andrewroberts / PDFCreator_EmailAllResponses
Last active Jan 30, 2021
Google Apps Script to create a PDF from each of the rows in a Google Sheet
View PDFCreator_EmailAllResponses
PDF Creator - Email all responses
When you click "Create PDF > Create a PDF for each row" this script
constructs a PDF for each row in the attached GSheet. The value in the
"File Name" column is used to name the file and - if there is a
value - it is emailed to the recipient in the "Email" column.

Deep Learning Papers Reading Roadmap

If you are a newcomer to the Deep Learning area, the first question you may have is "Which paper should I start reading from?"

Here is a reading roadmap of Deep Learning papers!

The roadmap is constructed in accordance with the following four guidelines:

  • From outline to detail
  • From old to state-of-the-art
JaredLGarcia / Team Drive Migration Google Apps Scripts Tool
Last active Jul 16, 2020
Team Drive Migration Google Apps Scripts Tool
View Team Drive Migration Google Apps Scripts Tool
//Set of Functions that can be attached to a Google Spreadsheet to facilitate a Google Drive Shared Folder to Team Drive Migration
//Author: Jared Garcia
//Attach to a Spreadsheet with three Sheets
//Link to spreadsheet template:
//First Sheet needs to be named "Folder Analysis" and havethe following Data in the first row Folder Name, Folder ID, Owner, Parent Folder Name, Parent Folder ID, Gather Folders [NO/YES], Gather Files [NO/YES],
//Team Drive Duplicate Name,TD Duplicate ID, File Move [NO/YES], File Move Complete
//The Second Sheet should be named "File Analysis" and have the following data File ID, Owner, Folder Parent, Parent ID, Team Drive Move (Y/N)
//Third Sheet is called "Change Owner Commands". This sheet isn't necessary but is handy when you need to change a file/folders owner using Google Apps Manager commands.
//Version. 0.8
//This is not a completed script as of yet. It currently gathers fo
Yimiprod / difference.js
Last active Mar 2, 2021
Deep diff between two object, using lodash
View difference.js
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
andrewroberts /
Last active Feb 2, 2021
Google Apps Script that merges the values from a Google Spreadsheet into a Google Doc template (does a mail merge) to create a GDoc or PDF. More details can be found at Go to if you would like me to set it up for you.
// Create a PDF by merging values from a Google spreadsheet into a Google Doc
// ==========================================================================
// Demo GSheet & script -
// Demo GDoc template - 1QnWfeGrZ-86zY_Z7gPwbLoEx-m9YreFb7fc9XPWkwDw
// Config
// ======
labnol /
Last active Mar 1, 2021 — forked from junaidk/
How to Learn Google Apps Script

Learning Google Apps Script

Find the best resources for learning Google Apps Script, the glue that connects all GSuite services including Gmail, Google Drive, Calendar, Google Sheets, Forms, Maps, Analytics and more.

A good place to learn more about Google Apps Script is the official documentation available at Here are other Apps Script resources that will help you get up to speed.

  1. Google Apps Script Code Samples by Amit Agarwal
  2. Google Apps Script Development - Create Google Apps Script projects locally inside VS Code - video tutorial
  3. Awesome Google Scripts by Amit Agarwal
  4. Google Developer Experts - Follow Apps Scr
mhawksey / gist:1170597
Created Aug 25, 2011
Google Apps Script to fill in a Document template with Spreadsheet data
View gist:1170597
function onOpen() {
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}];
var ss = SpreadsheetApp.getActiveSpreadsheet();
ss.addMenu("Fitness Diaries", menuEntries);
function createDocFromSheet(){
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries
// get the data from an individual user