Skip to content

Instantly share code, notes, and snippets.

View moorthy6369's full-sized avatar
💭
nothing

GRM STUDIO moorthy6369

💭
nothing
View GitHub Profile
@UnitedWithCode
UnitedWithCode / resumableUpload.js
Created October 20, 2022 12:18 — forked from dam1/resumableUpload.js
Resumable Upload Google Drive Api - Node Js
var fs = require('fs');
var request = require('request');
var EventEmitter = require('events').EventEmitter;
var mime = require('mime');
var util = require('util');
function resumableUpload() {
this.byteCount = 0; //init variables
this.tokens = {};
this.filepath = '';
@UnitedWithCode
UnitedWithCode / download.js
Created October 20, 2022 12:17 — forked from mkaminsky11/download.js
How to manipulate Google Drive files
/*
Download a file
*/
function downloadFile(fileId) {
var request = gapi.client.drive.files.get({
'fileId': fileId
});
request.execute(function(resp) {
window.location.assign(resp.webContentLink);
});
@UnitedWithCode
UnitedWithCode / GoogleDocsBackup.gs
Created October 20, 2022 12:16 — forked from brokensandals/GoogleDocsBackup.gs
Google Docs/Sheets/Slides automated backups script
var BACKUP_FOLDER_ID = 'INSERT_FOLDER_ID_HERE';
var NATIVE_MIME_TYPES = {};
NATIVE_MIME_TYPES[MimeType.GOOGLE_DOCS] = MimeType.MICROSOFT_WORD;
NATIVE_MIME_TYPES[MimeType.GOOGLE_SHEETS] = MimeType.MICROSOFT_EXCEL;
NATIVE_MIME_TYPES[MimeType.GOOGLE_SLIDES] = MimeType.MICROSOFT_POWERPOINT;
var NATIVE_EXTENSIONS = {};
NATIVE_EXTENSIONS[MimeType.GOOGLE_DOCS] = '.docx';
NATIVE_EXTENSIONS[MimeType.GOOGLE_SHEETS] = '.xlsx';
@ex-preman
ex-preman / Code.gs
Last active November 7, 2024 17:45
CRUD Using Google Apps Script
function doGet(e) {
Logger.log(e);
var op = e.parameter.action;
var ss = SpreadsheetApp.open(DriveApp.getFileById("YOUR_SPREADSHEET_ID"));
var sn = "YOUR_SHEET_NAME";
var sheet = ss.getSheetByName(sn);
if (op == "insert")
return insert_value(e, sheet);