Skip to content

Instantly share code, notes, and snippets.

View hrquiz's full-sized avatar

HR hrquiz

  • UNIMED
  • Indonesia
View GitHub Profile
/**
* 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();
@hrquiz
hrquiz / copy_files.gs
Created May 10, 2023 01:59 — forked from KenjiOhtsuka/copy_files.gs
Google Apps Script to Copy Folder Recursively
/**
This is a code of Google Apps Script for copying google drive folder content to other folder.
## Which situation the code resolve.
Google doesn't allow to move folder content to other folder which is managed by
other organization according to the policy of the GSUITE organization.
And, Google doesn't allow to change the content owner to the user in other
organizations.
@hrquiz
hrquiz / tellmeyoursecrets.js
Created March 14, 2022 15:07 — forked from woodwardtw/tellmeyoursecrets.js
google script that lists a lot of info about the files in a particular folder/sub folder structure including viewers, editors, and sharing permissions
function listFolders(folder) {
var sheet = SpreadsheetApp.getActiveSheet();
sheet.appendRow(["Name", "Sharing Access", "Sharing Permission", "Get Editors", "Get Viewers", "Date", "Size", "URL", "Download", "Description", "Type"]); //writes the headers
var folder = DriveApp.getFolderById("YOUR_FOLDER_ID");//that long chunk of random numbers/letters in the URL when you navigate to the folder
var files = folder.getFiles();//initial loop on loose files w/in the folder
var cnt = 0;
var file;
@hrquiz
hrquiz / gapp.js
Created February 26, 2022 21:14 — forked from mfyz/gapp.js
Auto Increment (Sequence) in Google Sheets / Google Apps Script
function onEdit(e) {
// Auto increment number column name
var aiColumnName = 'A';
// The column that is tested, seq numbers will be
// given if this column is not empty.
var requieredColName = 'B'
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var worksheet = spreadsheet.getActiveSheet();
var aiColRange = worksheet.getRange(aiColumnName + '1:' + aiColumnName + '1000');
///////////code.gs///////////
function doGet(e) {
var htmlOutput = HtmlService.createTemplateFromFile('index');
htmlOutput.search='';
return htmlOutput.evaluate();
}
function doPost(e) {
var search =e.parameter.search;
var htmlOutput = HtmlService.createTemplateFromFile('index');
@hrquiz
hrquiz / LOGIN LOGOUT
Created February 16, 2022 10:01 — forked from krooluang/LOGIN LOGOUT
LOGIN LOGOUT
Copy Sheet : https://docs.google.com/spreadsheets/d/1l-wdzwGpTwx7WMiHXdo7WKGdQAD1c0_f2z8-R8YVzck/copy
window.open("https://www.google.com/", "_blank",);
<!--Signin-->
<center>
<span id="spin1" class="spinner-grow spinner-grow-sm text-danger d-none" role="status" aria-hidden="true"></span>
<span id="spin2" class="spinner-grow spinner-grow-sm text-warning d-none" role="status" aria-hidden="true"></span>
@hrquiz
hrquiz / LOGIN LOGOUT
Created February 16, 2022 10:01 — forked from krooluang/LOGIN LOGOUT
LOGIN LOGOUT
Copy Sheet : https://docs.google.com/spreadsheets/d/1l-wdzwGpTwx7WMiHXdo7WKGdQAD1c0_f2z8-R8YVzck/copy
window.open("https://www.google.com/", "_blank",);
<!--Signin-->
<center>
<span id="spin1" class="spinner-grow spinner-grow-sm text-danger d-none" role="status" aria-hidden="true"></span>
<span id="spin2" class="spinner-grow spinner-grow-sm text-warning d-none" role="status" aria-hidden="true"></span>
@hrquiz
hrquiz / README.md
Created February 3, 2022 22:47 — forked from nyancodeid/README.md
Make RESTful API with Google Apps Script and SpreadSheet

Google Script CRUD

By Ryan Aunur Rassyid

Simply create RESTful API with Google Script and store it to Google SpreadSheet like a Pro.

/* General */
div.notion-topbar > div > div:nth-child(1n).toggle-mode {
display: none !important;
}
div.notion-topbar-mobile > div:nth-child(1n).toggle-mode {
display: none !important;
}
div.notion-topbar-mobile > div:nth-child(5) {
display: none !important;
}
const MY_DOMAIN = 'rezaarkan.com';
const SLUG_TO_PAGE = {
'': '882cd6dd6e1e482d823b464f326213e5',
'now': '25b7df64071d420d8f609bf76d9f4114',
'portfolio': '6000547bed0d441793bfba1498c063e2',
'resume': '0934b80d2d1544f99dedadb00be9d146',
'recommendations': '29115129efa44f1a870f390dd2c0a6c0',
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603',
'blog': '29bb193c1a104ba2b832788b57d58cd6',