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
# 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>
@molomby
molomby / create-email-alias.sh
Created February 13, 2022 00:48
Forward Email API: Wrapper Script for Creating Aliases
#!/usr/bin/env bash
# Usage:
# create-email-alias.sh $URL_OR_DESC [$SLUG]
# Example:
# create-email-alias.sh "https://www.darwinsailingclub.com.au" dsc
# Results in:
# Email dsc.g9ahxh@example.com -> me+dsc@example.net.au, comment: "https://www.darwinsailingclub.com.au"
# Environment variables can be supplied at run time or set in ~/.forward-email
@userlandkernel
userlandkernel / altijd-bonusbox.py
Last active August 13, 2024 22:38
[WIP] Mijn bonusbox, altijd alles in de bonus
#!/usr/bin/env python3
"""
Project AlbertPWN
(c) 2021, Sem Voigtlander (@userlandkernel)
"""
import sys
import os
import struct
import time
import requests
@xpepper
xpepper / tempmail.sh
Last active August 13, 2024 02:04
A shell script to create a temporary disposable email via command line (install w3m, curl, jq)
#!/usr/bin/env sh
#
# by Siddharth Dushantha 2020
#
# Dependencies: jq, curl, w3m
#
version=1.1.9
# By default 'tmpmail' uses 'w3m' as it's web browser to render
@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';