A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
| /** | |
| * Save file splitting it by chunks of 9M | |
| * @param {Blob} FileBlob blob data to save | |
| * @param {Folder} folder destination folder | |
| * @param {Number} chunkSize | |
| * @return {String} | |
| */ | |
| function saveFileByChunks(fileBlob, folder, chunkSize) { | |
| var | |
| fileName = new Date().getTime(), |
| /* | |
| * 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); |
| /** | |
| * --- Continous Execution Library --- | |
| * | |
| * Copyright (c) 2013 Patrick Martinent | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 |
| // vim: ft=javascript: | |
| /*jslint sloppy: true, vars: true, white: true, nomen: true, browser: true */ | |
| /*global SpreadsheetApp, UiApp, UrlFetchApp, Utilities */ | |
| /* | |
| * A script to automate requesting data from an external url that outputs CSV data. | |
| * | |
| * Adapted from the Google Analytics Report Automation (magic) script. | |
| * @author nickski15@gmail.com (Nick Mihailovski) | |
| * @author ianmlewis@gmail.com (Ian Lewis) | |
| */ |
| * { | |
| margin: 0; | |
| } | |
| html, body { | |
| height: 100%; | |
| } | |
| .wrapper { | |
| min-height: 100%; | |
| height: auto !important; | |
| height: 100%; |
| function getTumblrOAuthConfig_(){ | |
| // values available once an app is registered here: http://www.tumblr.com/oauth/apps | |
| // registered app callback URL should be: https://script.google.com/macros | |
| var consumer_key = "<OAuth Consumer Key>"; | |
| var consumer_secret = "<Secret Key>"; | |
| var oAuthConfig = UrlFetchApp.addOAuthService("Tumblr"); | |
| oAuthConfig.setAccessTokenUrl('http://www.tumblr.com/oauth/access_token'); | |
| oAuthConfig.setAuthorizationUrl('http://www.tumblr.com/oauth/authorize'); |
| #!/usr/bin/env bash | |
| # Things to do after install ArchLinux (2012.12.01) | |
| pacman --noconfirm -S sudo | |
| # Enabled archlinuxfr repo | |
| arch=$(uname -m) | |
| sudo cp /etc/pacman.conf /etc/pacman.conf.bak | |
| echo "" >> /etc/pacman.conf | |
| echo "[archlinuxfr]" >> /etc/pacman.conf |
| /** | |
| reference - | |
| https://developers.google.com/accounts/docs/OAuth2WebServer | |
| https://code.google.com/apis/console/ | |
| https://developers.google.com/+/api/latest/ | |
| **/ | |
| ////handle all requests here | |
| function doGet(e) { |
(Full description and list of commands at - https://npmjs.org/doc/index.html)
Make sure to export your local $PATH and prepand relative ./node_modules/.bin/: