Skip to content

Instantly share code, notes, and snippets.

View JayGoldberg's full-sized avatar

Jay Goldberg JayGoldberg

View GitHub Profile
We can't make this file beautiful and searchable because it's too large.
id,name,summary,neighbourhood
958,"Bright, Modern Garden Unit - 1BR/1B",New update: the house next door is under construction and there is the possibility of noise from 7am - 5pm. Our rates are discounted during this time period. Our bright garden unit overlooks a grassy backyard area with fruit trees and native plants. It is an oasis in a big city. The apartment comfortably fits a couple or small family. It is located on a cul de sac street that ends at lovely Duboce Park.,Duboce Triangle
3850,Charming room for two,"Your own private room plus access to a shared bathroom across the hall. House is on a big hill with a great view. Plenty of 72-hour free parking in front. Free maps, breakfast food and advice about what to do in San Francisco. As part of the booking procedure, my house rules require you send me this sentence via the Airbnb message thread: ""Kevin, I have read your listing and house rules carefully and I agree to follow what you wrote."" If you don't, you forfeit your reservation and money.",Inner
# takes a csv export of the google sheet as input and tries to download pastebins
#
# usage:
# download_pastebins.py <prefix> <name column> <url column> <csv file>
#
# example:
# download_pastebins.py mt18 1 5 "MT18 Draw List - Played Games.csv"
import sys, os, re, urllib.request, csv
@Eun
Eun / Code.gs
Last active June 14, 2024 17:21
simple google apps script router that routes based on `path` url query
const router = Router();
router.Method("GET", "/", function(req, vars) {
return {"status": "ok"};
});
router.Method("GET", "/?<id>[A-Za-z0-9]+)", function(req, vars) {
return {"status": "ok", "id": vars.id};
});
router.Method("POST", "/", function(req, vars) {
@khanhkhuu
khanhkhuu / extractDataFromPdf.js
Created December 9, 2022 04:02
Extract Table From PDF
function test() {
const data = extractDataFromPdf('1jVppnsxpiK56RY7vVFMkTa1_GV8SCWxo');
console.log(data);
}
function extractDataFromPdf(pdfId) {
const PDF_LANGUAGE = 'th';
const pdfFile = DriveApp.getFileById(pdfId);
const { id } = Drive.Files.insert(
{
@tanaikech
tanaikech / submit.md
Created September 14, 2022 05:52
Full-text search of Google Apps Script Projects using Google Apps Script

Full-text search of Google Apps Script Projects using Google Apps Script

These are sample scripts for achieving the full-text search of Google Apps Script projects using Google Apps Script. I have the case that I want to search a value from Google Apps Script projects using a Google Apps Script. In this post, I would like to introduce the sample scripts for achieving the full-text search of Google Apps Script projects.

1. Full-text search from all Google Apps Script Projects of standalone type in Google Drive

Before you use this script, please enable Drive API at Advanced Google services. In the case of the Google Apps Script projects of the standalone type, the full-text search can be achieved using Drive API as follows.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>base64 + lzma + iframe</title>
<style>iframe{position:absolute;top:0;left:0;height:100vh;width:100%;border:none}</style>
</head>
<body>
<iframe sandbox="allow-same-origin allow-downloads allow-scripts allow-forms allow-top-navigation allow-popups allow-modals allow-popups-to-escape-sandbox"></iframe>
@rashaabdulrazzak
rashaabdulrazzak / longfiletranscribe.js
Last active January 9, 2023 16:25
transcribe file located in cloud
// Imports the Google Cloud client library
const speech = require('@google-cloud/speech');
// Creates a client
const client = new speech.SpeechClient();
// const gcsUri = 'gs://my-bucket/audio.raw';
// const encoding = 'Encoding of the audio file, e.g. LINEAR16';
// const sampleRateHertz = 16000;
// const languageCode = 'BCP-47 language code, e.g. en-US';
@bng44270
bng44270 / webnotepad.js
Last active April 9, 2024 20:09
Create a local-storage browser-based notepad
/*
WebNotepad - create a local-storage browser-based notepad app
Usage:
1) Include webnotepad.js
2) Create DIV element
<div id="webnote"></div>
@slaporte
slaporte / Code.gs
Created November 15, 2020 00:46
Google Apps Script to send an email (from a Doc template) based on a response to a form. Used for Wiki Loves Monuments email confirmation.
/**
* Based on: https://github.com/googleworkspace/solutions/blob/master/content-signup/src/Code.js
*/
var EMAIL_TEMPLATE_DOC_URL = 'https://docs.google.com/document/d/***/edit?usp=sharing';
var EMAIL_SUBJECT = '[Response requested] Please confirm your Wiki Loves Monuments winners';
var CC_RECIPIENTS = 'lodewijk@effeietsanders.org, erinamukuta@gmail.com'
/**
* Installs a trigger on the Spreadsheet for when a Form response is submitted.
@iamdaniele
iamdaniele / Tweet functions.gs
Last active February 12, 2023 05:40
Add public metrics
const BearerTokenKey = 'twitterBearerToken';
function onOpen() {
SpreadsheetApp
.getUi()
.createMenu('Twitter')
.addItem('Set Bearer token', 'helpers.requestBearerToken')
.addItem('Sign out', 'helpers.logout')
.addToUi();
}