Skip to content

Instantly share code, notes, and snippets.

View e-labInnovations's full-sized avatar
🌐
Learning...

e-lab innovations e-labInnovations

🌐
Learning...
View GitHub Profile
@Disane87
Disane87 / app.module.ts
Created April 15, 2020 07:25
NestJS Plugin-System
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { PluginModule } from './plugin/plugin.module';
@Module({
imports: [PluginModule.registerPluginsAsync()],
controllers: [AppController],
providers: [AppService],
})
http://www.gstatic.com/images/icons/material/apps/weather/2x/wintry_mix_rain_snow_light_color_96dp.png
http://www.gstatic.com/images/icons/material/apps/weather/2x/haze_fog_dust_smoke_light_color_96dp.png
http://www.gstatic.com/images/icons/material/apps/weather/2x/cloudy_light_color_96dp.png
http://www.gstatic.com/images/icons/material/apps/weather/2x/snow_showers_snow_light_color_96dp.png
http://www.gstatic.com/images/icons/material/apps/weather/2x/flurries_light_color_96dp.png
@rluvaton
rluvaton / getFolderSize.js
Last active January 5, 2025 10:19
Get Folder Size - App Script
var count = 0;
function myFunction() {
Logger.log('Starting');
// Please Write the path of the folder you want sub path seperated with slash(,) (spaces are counted)
// for example: for myFolder/test -> myFolder,test
// And NOT myFolder, test
var folders = [];
if(!folders) {
@unnikked
unnikked / README.md
Last active January 17, 2025 19:04
How to host your Telegram bot on Google App Script

Telegram Bot on Google App Script

This is the source code of one of my blog post. To read the full blog post please click here.

@rob0tca
rob0tca / batch_ocr.gs
Created September 28, 2017 04:54
Google Apps script for performing OCR on all JPEGS found in the specified Drive folder. Extracts text to a Google sheet, where it's mapped to the JPEG's filename.
function extractTextOnOpen() {
//ADD YOUR VALUES BELOW
var folderName = "[YOUR PROJECT FOLDER]";
var sheetId = "[YOUR SHEET ID]";
//Define folder
var folder = DriveApp.getFoldersByName(folderName).next();
var folderId = folder.getId();
@sjsyrek
sjsyrek / SheetThumbs.gs
Created February 14, 2015 00:26
Automatically insert thumbnails of Google Drive images directly into the cells of a Google Sheet using the =IMAGE(url) formula (not floating image overlays)
// Insert thumbnails of your Drive image files into a Google Sheet.
// Images are inserted directly into the cells of the sheet, not as those useless overlays that float around.
//
// This is set up to scan the first two columns of the active sheet. Column A will contain an =IMAGE(url) formula, which is calculated by finding the image thumbnail for the file referred to by column B.
// While this is simply the code I used for my own particular purpose, you can easily adapt it for your own needs. Please note that while an onEdit() version of this script would be cool, it will not work.
// Formulas cannot access most other Google Apps services, though you could probably use a data store if you felt ambitious enough.
// Note: the Drive Advanced API must be activated for this script to work.
//
// The script looks for files based on the pattern below:
@vs4vijay
vs4vijay / GetDataFromXPath
Created September 27, 2013 06:35
Extract Data from XPath via Google Apps Script
function getDataFromXpath(path, url) {
var data = UrlFetchApp.fetch(url);
var text = data.getContentText();
var xmlDoc = Xml.parse(text, true);
// Replacing tbody tag because app script doesnt understand.
path = path.replace("/html/","").replace("/tbody","","g");
var tags = path.split("/");
Logger.log("tags : " + tags);
// getting the DOM of HTML
@mogsdad
mogsdad / Download file from URL.js
Last active January 5, 2025 12:23
In StackOverflow question #14573055, the question was how to "download" a file from a URL using Google Apps-Script. See http://stackoverflow.com/questions/14573055/can-i-download-file-from-url-link-generated-by-google-apps-script/14574217#14574217. You can't actually "download" the source file, because apps-script has no access to your PC's file…
/**
* Retrieve a file from the given URL, store into the named folder
* on Google Drive.
*
* @param {String} fileURL URL to source file, e.g. "http://mysite.com/files/file.val1.val22.zip"
* @param {String} folder Name of target folder on Google Drive
*
* @returns {Object} Response of operation, e.g.
* {rc:200,fileName:"test.zip",fileSize:92994392}
*/