Skip to content

Instantly share code, notes, and snippets.

@brizzio
brizzio / gist:a04fd5ceb152fa8ff388ee67b2dc02f8
Created February 22, 2018 21:38
vba code to read a pdf using shell - office 2010
Public Declare Function ShellExecute Lib "Shell32.dll" Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long
function doOCR() {
//
//var folder = DriveApp.getFoldersByName('sanGennaro');
var folder = DriveApp.getFoldersByName('sanGennaro').next();
if(folder){
Logger.log(folder);
var images = folder.getFiles();
Logger.log(images.lenght);
for(i = 0; i < images.length; i++) {
@brizzio
brizzio / README.md
Last active February 20, 2018 20:53
connect a web form to a specific gsheet

The script above will configure your Google Sheet to handle a GET request (function doGet()), tells the spreadsheet where to place the received data (lines 21–38), and sets the allowed MIME type (setMimeType(ContentService.MimeType.JSON)). Give it a read—Will Patera did a great job explaining the script with his comments so I left them in there. (The original gist can be found here.)

Save the script and give it an appropriate name. Then go to the “Run” menu and select “setup.”

You might be asked to give Google Scripts to use your Google account.

Once you’ve given your authorization, go to the “Publish” menu and select “Deploy as web app.”

You will then be presented with a few options with which to customize your script.

@brizzio
brizzio / sample-mongo-commands.json
Created August 25, 2017 14:50 — forked from jatinchauhann/sample-mongo-commands.json
Mondo DB useful commands for beginners. Adapted from a YouTube Video - https://www.youtube.com/watch?v=pWbMrx5rVBE
//after installing mondodb
//cd to the 'bin' directory of the mongodb folder
//run the following commands in the cmd (run as administrator -for Windows)
mongod --directoryperdb --dbpath C:\mongodb\data\db --logpath C:\mongodb\log\mongo.log --logappend --rest --install
//to start the mongodb service
net start MongoDB
//to enter mongodb service (this is necessary to start the mongo service)
mongo