Skip to content

Instantly share code, notes, and snippets.

View hrquiz's full-sized avatar

HR hrquiz

  • UNIMED
  • Indonesia
View GitHub Profile
@hrquiz
hrquiz / submit.md
Created September 19, 2021 06:57 — forked from tanaikech/submit.md
Uploading Local Files to Google Drive without Authorization using HTML Form

Uploading Local Files to Google Drive without Authorization using HTML Form

This is a sample script for uploading local file to Google Drive without the authorization using HTML form. A selected file in your local PC using HTML form is uploaded to Google Drive and saved to Google Drive.

When you use this, at first, please deploy Web Apps. The script is doPost() of following scripts.

Script : Google Apps Script

function doPost(e) {
 var data = Utilities.base64Decode(e.parameters.data);
@hrquiz
hrquiz / ajaxspreadsheet.js
Created September 20, 2021 23:14 — forked from mgamini/ajaxspreadsheet.js
How to receive ajax data and store it in a Google spreadsheet
// Follow the instructions here: http://mashe.hawksey.info/2014/07/google-sheets-as-a-database-insert-with-apps-script-using-postget-methods-with-ajax-example/
//
// That'll get you 80% of the way there. Unfortunately, you'll run into CORS and MIMETYPE errors, so make the following changes.
// ============================================================
// Your clientside script should actually look like this (jquery example):
// ============================================================
var data = {email: "email@address.com"}
@hrquiz
hrquiz / notion2blog.js
Created September 23, 2021 17:43 — forked from mayneyao/notion2blog.js
Notion.so > Personal Blog | custom domain + disqus comment
const MY_DOMAIN = "agodrich.com"
const START_PAGE = "https://www.notion.so/gatsby-starter-notion-2c5e3d685aa341088d4cd8daca52fcc2"
const DISQUS_SHORTNAME = "agodrich"
addEventListener('fetch', event => {
event.respondWith(fetchAndApply(event.request))
})
const corsHeaders = {
"Access-Control-Allow-Origin": "*",
const MY_DOMAIN = 'rezaarkan.com';
const SLUG_TO_PAGE = {
'': '882cd6dd6e1e482d823b464f326213e5',
'now': '25b7df64071d420d8f609bf76d9f4114',
'portfolio': '6000547bed0d441793bfba1498c063e2',
'resume': '0934b80d2d1544f99dedadb00be9d146',
'recommendations': '29115129efa44f1a870f390dd2c0a6c0',
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603',
'blog': '29bb193c1a104ba2b832788b57d58cd6',
/* 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;
}
@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.

@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>
///////////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 / 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');