Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
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
Chetan07j / Robo3T-Installation-Menu.sh
Last active Jan 8, 2021
robomongo 3t installtion and creating shortcut
View Robo3T-Installation-Menu.sh
#!/bin/bash
cd /tmp || exit
echo "Downloading Robomongo ..."
wget -q https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
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
andrewroberts / createPDF_filename.gs
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 www.andrewroberts.net/2014/10/google-apps-script-create-pdf/ but allows placeholders to be used in the filename.
View createPDF_filename.gs
// dev: andrewroberts.net
// Replace this with ID of your template document.
var TEMPLATE_ID = ''
// var TEMPLATE_ID = '1wtGEp27HNEVwImeh2as7bRNw-tO4HkwPGcAsTrSNTPc' // Demo template
// Demo script - http://bit.ly/createPDF
// 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
tanaikech / submit.md
Last active Feb 5, 2021
Multipart-POST Request Using Google Apps Script
View submit.md

Multipart-POST Request Using Google Apps Script

April 20, 2019: GAS library for this situation was published. Please check it at https://github.com/tanaikech/FetchApp.

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
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.
View DeepLearningReadingRoadmap.md

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
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: https://docs.google.com/spreadsheets/d/1TPPx1XrEcyXRurZWKpy9Qkm0HSpbkFG3FI8q2jzukuE/edit?usp=sharing
//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
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
andrewroberts / createPDF.gs
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 www.andrewroberts.net/2014/10/google-apps-script-create-pdf/. Go to https://tinyurl.com/yd8v2do2 if you would like me to set it up for you.
View createPDF.gs
//
// Create a PDF by merging values from a Google spreadsheet into a Google Doc
// ==========================================================================
//
// Demo GSheet & script - http://bit.ly/createPDF
// Demo GDoc template - 1QnWfeGrZ-86zY_Z7gPwbLoEx-m9YreFb7fc9XPWkwDw
//
// Config
// ======
@labnol
labnol / google-apps-script.md
Last active Mar 1, 2021 — forked from junaidk/resources.md
How to Learn Google Apps Script
View google-apps-script.md

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 developers.google.com. 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
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