Skip to content

Instantly share code, notes, and snippets.

@greenido
greenido / tweetStats.gs
Created April 29, 2017 03:36
Apps script to fetch stats on tweets (retweets, likes etc')
/**
* This code is fetching twitter stats on our tweets: retweets and likes at the moment.
*
* @Author: Ido Green
* @date: 4/2017
* @see:
* https://github.com/googlesamples/apps-script-oauth1
* https://dev.twitter.com/rest/reference/get/statuses/show/id
*
*/
@greenido
greenido / WordsFrequencyCounter.php
Last active April 23, 2019 20:20
Words Frequency Counter - Simple and fast
<?php
/**
* @author: Ido Green
* @date 6/28/2015
* @desc: Analyze the words from our firebase DB.
* Steps:
* 1. Fetch text from the DB
* 2. Split into words
* 3. Remove 2 character words and stopwords
* 4. Determine word frequency + density
@greenido
greenido / YT-Analytics-api-example.js
Last active May 31, 2020 08:31
YouTube Analytics API Apps Script Example
/**
* YouTube Analytics API Example
* Fetch views and 'estimated view time' on videos you have in your channel.
*
* @Author: Ido Green
* @Date: Aug 2014
*
*/
function getVideoEstimatedMinutesWatched(videoId) {
var myChannels = YouTube.Channels.list('id', {mine: true});