These utilities are grouped into related files, for simpler copy & paste to your scripts.
A couple of helper functions to convert to & from A1 notation.
| #!/bin/sh | |
| TODAY=$(date +%m) | |
| FILE=~/.duesoon | |
| # This may be more complex than need be, but it permits months with or without leading zeroes | |
| let THISMO=$TODAY-0 | |
| if [ $THISMO = 12 ]; then | |
| let NEXTMO=01 | |
| else |
| // ==UserScript== | |
| // @id iitc-plugin-CSV@pad | |
| // @name IITC plugin: Ingress KML Exporter | |
| // @category Keys | |
| // @version 1.0.20160105.02 | |
| // @namespace https://github.com/jonatkins/ingress-intel-total-conversion | |
| // @updateURL https://gist.github.com/Dron007/33205981b11ab4cadb31/raw/f425c125f236256998f143f385249006c0442223/iitc-plugin-ingressKML-exporter.user.js | |
| // @downloadURL https://gist.github.com/Dron007/33205981b11ab4cadb31/raw/f425c125f236256998f143f385249006c0442223/iitc-plugin-ingressKML-exporter.user.js | |
| // @description Exports portals currently in view for use with Google Map ( KML Format ). | |
| // @include https://www.ingress.com/intel* |
| # encoding: utf8 1,1 Top# encoding: utf8 | |
| import argparse | |
| from datetime import datetime | |
| import json | |
| from random import randint | |
| import requests | |
| import sys | |
| from time import sleep |
I've sniffed most of the Tinder API to see how it works. You can use this to create bots (etc) very trivially. Some example python bot code is here -> https://gist.github.com/rtt/5a2e0cfa638c938cca59 (horribly quick and dirty, you've been warned!)
Note: this was written in April/May 2014 and the API may have changed since. I have nothing to do with Tinder, nor their API, and I do not offer any support for anything you may build on top of this
The best place to learn more about Google Script is the official documentation available at developers.google.com. Here are other places that will help you get up to speed.
| /** | |
| * Convert Excel file to Sheets | |
| * @param {Blob} excelFile The Excel file blob data; Required | |
| * @param {String} filename File name on uploading drive; Required | |
| * @param {Array} arrParents Array of folder ids to put converted file in; Optional, will default to Drive root folder | |
| * @return {Spreadsheet} Converted Google Spreadsheet instance | |
| **/ | |
| function convertExcel2Sheets(excelFile, filename, arrParents) { | |
| var parents = arrParents || []; // check if optional arrParents argument was provided, default to empty array if not |
| function pullJSON() { | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| var sheets = ss.getSheets(); | |
| var sheet = ss.getActiveSheet(); | |
| var url="http://example.com/feeds?type=json"; // Paste your JSON URL here | |
| var response = UrlFetchApp.fetch(url); // get feed | |
| var dataAll = JSON.parse(response.getContentText()); // |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |