Skip to content

Instantly share code, notes, and snippets.

@tariqhamid
tariqhamid / tinder-api-documentation.md
Created July 24, 2016 16:52 — forked from rtt/tinder-api-documentation.md
Tinder API Documentation

Tinder API documentation

http://rsty.org/

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

API Details

/*
Doesn't currently do anything other than dump some region information into the log.
Uses https://github.com/googlesamples/apps-script-oauth2
Details for the setup of that are on the page. short version:
Add the library MswhXl8fVhTFUH_Q3UOJbXvxhMjh3Sh48 to your sheet code. Resources -> libraries
get the project key from file-> project properties
// A fault tolerant Google apps script for fetching dividend data from Yahoo Finance (original fault intolerant script was taken from http://seekingalpha.com/article/568641-using-google-spreadsheet-as-your-watch-list
function GetDividends(symbol) {
/* Manipulate the symbol, as necessary */
if (symbol.search(/\.b/i) >= 0)
{
symbol = symbol.replace(/\.b/i, "-B");
}
@tariqhamid
tariqhamid / add2books.html
Created August 9, 2016 13:24 — forked from rcknr/add2books.html
Add PDF and EPUB files from your Google Drive to Google Books.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Add to Google Books</title>
<script src="//www.google.com/jsapi"></script>
<script src="//apis.google.com/js/client.js"></script>
<script type="text/javascript">
@tariqhamid
tariqhamid / code.gs
Created August 9, 2016 18:04 — forked from mhawksey/code.gs
Apps Authenticated INSERT with Apps Script using Execution API
// LICENSES http://www.apache.org/licenses/LICENSE-2.0
var DOC_ID = '<INSERT_SPREADSHEET_DOC_ID>';
var SHEET_NAME = 'Sheet1';
/**
* Add a row of data to a sheet.
* @param {Object} parameters passed from script.
* @return {Object} result.
*/
function setData(parameters) {
@tariqhamid
tariqhamid / JohnnyWithDrive.js
Created August 9, 2016 18:10 — forked from ivanseidel/JohnnyWithDrive.js
Sends data to Google Drive with Johnny-five and request
var five = require('johnny-five');
var request = require('request');
var url = 'https://script.google.com/macros/s/YOUR-APP-ID-HERE/exec';
var board = new five.Board();
board.on("ready", function() {
var sensor = new five.Pin("A0");
// Faz leitura unica e loga o valor
@tariqhamid
tariqhamid / FetchBuildings.gs
Created August 9, 2016 18:18
Fetches a list of University buildings via web service using basic auth and updates a Google spreadsheet with the results.
/**
* Fetch the list of all PSU buildings
*/
function getBuildings() {
var params = genFetchURLparams('GET');
var response = UrlFetchApp.fetch("https://ws.oit.pdx.edu/org/v1/buildings", params);
var json = response.getContentText();
var buildings = JSON.parse(json);
return(buildings);
@tariqhamid
tariqhamid / mcc-account-reporting.js
Created August 9, 2016 18:20 — forked from russorat/mcc-account-reporting.js
This script will run through all your AdWords accounts and store your data in a Google Spreadsheet.
/********************************************************************************
* This script will run through all your AdWords accounts and store your data in
* a Google Spreadsheet.
*
* @author Russell Savage <russellsavage@gmail.com>
* @version 1.0
*
* THIS SOFTWARE IS PROVIDED BY Russell Savage ''AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
function main() {
MccApp.accounts().withCondition("Cost > 1.00").forDateRange("YESTERDAY").withLimit(50).executeInParallel('runOnEachAccount', 'finished');
}
function runOnEachAccount() {
Logger.log('Starting on: '+AdWordsApp.currentAccount().getCustomerId());
var results = getAccountReport();
Logger.log(results);
return JSON.stringify(results);
}
@tariqhamid
tariqhamid / sign_s3.gs
Created August 9, 2016 18:21 — forked from andsens/sign_s3.gs
Google spreadsheet function for signing S3 URLs (very handy for CSV cost allocation reports when combined with the ImportData() function)
function sign_s3(access_key, private_key, bucket, object_name, validity, base_url) {
if(!base_url) {
base_url = "http://s3.amazonaws.com";
}
if(!validity) {
validity = 60;
}
expires = Math.floor((new Date()).getTime() / 1000) + validity;
object_name = encodeURIComponent(object_name);
stringToSign = "GET\n\n\n"+expires+"\n/"+bucket+"/"+object_name;