Skip to content

Instantly share code, notes, and snippets.

View yonisetiawan's full-sized avatar

YONI SETIAWAN yonisetiawan

View GitHub Profile
@yonisetiawan
yonisetiawan / topkeywords.js
Created October 13, 2016 12:38 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
var request = require("request"),
cheerio = require("cheerio"),
url = "https://www.google.com/search?q=data+mining",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
resultsDownloaded++;
@yonisetiawan
yonisetiawan / grabreceiptpromousage.gs
Created October 24, 2017 04:19 — forked from hapr05/grabreceiptpromousage.gs
Grab promo usage report script
//inspired by https://gist.github.com/oshliaer/70e04a67f1f5fd96a708
var SHEET_ID = 'YOUR_SHEET_ID';
var CREDIT_LIMIT = 500000; //YOUR GRAB LIMIT
//gmail before and after filter, read: https://support.google.com/mail/answer/7190
var after_date = '2017/09/25'; //this date is included in filter result
var before_date = '2017/10/25'; //this date is excluded in filter result
function getEmails(query,sheet){
@yonisetiawan
yonisetiawan / send-whatsapp.js
Created March 29, 2018 00:58 — forked from whatsmate/send-whatsapp.js
Sending a WhatsApp message in Node.js
#!/usr/bin/env node
var http = require('http');
var instanceId = "YOUR_INSTANCE_ID_HERE"; // TODO: Replace it with your gateway instance ID here
var clientId = "YOUR_CLIENT_ID_HERE"; // TODO: Replace it with your Forever Green client ID here
var clientSecret = "YOUR_CLIENT_SECRET_HERE"; // TODO: Replace it with your Forever Green client secret here
var jsonPayload = JSON.stringify({
number: "12025550108", // TODO: Specify the recipient's number here. NOT the gateway number