- Browser
- Proxy
- Gateway
TODO Difference between proxy and gateway caches.
| var KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; //developer key , get from https://code.google.com/apis/console/b/1/ | |
| var FILE_ID = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; // drive file id | |
| function convertDocuments2() { | |
| var oauthConfig = UrlFetchApp.addOAuthService('drive'); | |
| //Create oauth config for drive api | |
| var scope = 'https://www.googleapis.com/auth/drive'; | |
| oauthConfig.setConsumerKey('anonymous'); | |
| oauthConfig.setConsumerSecret('anonymous'); |
This setup was used successfully on a DigitalOcean VPS. After much trial and error, and following a number of disparate guides and tutorials, I was able to distil the process to the information found in this gist.
Before getting started, you should create a new server droplet. Login to verify that everything is working correctly.
ssh [email protected]
| #!/bin/bash | |
| # Usage: slackpost <token> <channel> <message> | |
| # Enter the name of your slack host here - the thing that appears in your URL: | |
| # https://slackhost.slack.com/ | |
| slackhost=PUT_YOUR_HOST_HERE | |
| token=$1 |
| /** Returns a PDF object based on the contents of the 'invoicing' sheet */ | |
| function invoiceToPDF(invDetails) | |
| { | |
| var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
| ssID = spreadsheet.getId(); | |
| var sheet = spreadsheet.getSheetByName(INVOICES_SHEETNAME); | |
| var gid = sheet.getSheetId(); | |
| // &gid=x at the end of above url if you only want a particular sheet | |
| var url2 = "http://spreadsheets.google.com/feeds/download/spreadsheets/Export?key=" + ssID + |
| /* | |
| * script to export data in all sheets in the current spreadsheet as individual csv files | |
| * files will be named according to the name of the sheet | |
| * author: Michael Derazon | |
| */ | |
| function onOpen() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var csvMenuEntries = [{name: "export as csv files", functionName: "saveAsCSV"}]; | |
| ss.addMenu("csv", csvMenuEntries); |
📆 Jun 23-24, 2016
🌏 Web site: http://reddotrubyconf.com/ Twitter: http://twitter.com/reddotrubyconf
💁 Ping me @cheeaun on Twitter or leave a comment below if you found some awesome stuff for #rdrc2016. This gist will be updated whenever there's new stuff.
🕙 Previously, on RedDotRubyConf...