Skip to content

Instantly share code, notes, and snippets.

View bikramkawan's full-sized avatar

Bikram Kawan bikramkawan

View GitHub Profile
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 4 columns, instead of 2. in line 1.
"name","time","image","comment"
"<span>John Tallon</span>","<span class=""j1lvzwm4 stjgntxs ni8dbmo4 q9uorilb gpro0wi8""><span class=""t5a262vz nc684nl6 ihxqhq3m l94mrbxd aenfhxwr l9j0dhe7 sdhka5h4""><span class=""ihxqhq3m myohyog2 l9j0dhe7 sdhka5h4 tw7X6SB"" style=""display: none;"">t</span><span class=""myohyog2 l9j0dhe7 sdhka5h4 tw7X6SB"" style=""display: none;"">g</span><span class=""ihxqhq3m myohyog2 l9j0dhe7 sdhka5h4 arhKlDmA adEG"" style=""position: absolute; top: 3em;"">l</span><span class=""ihxqhq3m myohyog2 l9j0dhe7 sdhka5h4 tw7X6SB"" style=""display: none;"">t</span><span class=""l94mrbxd aenfhxwr myohyog2 b6zbclly l9j0dhe7 sdhka5h4"">M</span><span class=""t5a262vz nc684nl6 ihxqhq3m l94mrbxd aenfhxwr l9j0dhe7 sdhka5h4 tw7X6SB"" style=""display: none;"">8</span><span class=""t5a262vz aenfhxwr b6zbclly l9j0dhe7 sdhka5h4"">a</span><span class=""nc684nl6 l94mrbxd l9j0dhe7 sdhka5h4 arhKlDmA adEG"" style=""position: absolute; top: 3em;"">S</span><span class=""t5a262vz l94mrbxd myohyog2 l9j0dhe7 sdhka5h4"
@bikramkawan
bikramkawan / facbook-page-review.js
Last active March 14, 2022 12:13
Facebook Page Reviews Graph API - Use Browser dev tool to extract Reviewer Name and Photo
const allcomments = document.querySelectorAll(
'.du4w35lb.k4urcfbm.l9j0dhe7.sjgh65i0',
);
let comments = [];
for (const comment of allcomments) {
let obj = {};
obj['name'] = '';
obj['time'] = '';
obj['image'] = '';
@bikramkawan
bikramkawan / Automate Gmail with Google Apps Script to archive emails from custom label
Last active June 7, 2023 00:12
Automate Gmail with Google Apps Script to archive emails from custom label.
function archieveReadMail() {
const labels = ['Support', 'Notifications'];
for (const label of labels) {
const getUserLabelByName = GmailApp.getUserLabelByName(label);
const threads = getUserLabelByName.getThreads();
const hasThreads = Array.isArray(threads) && threads.length > 0;
if (hasThreads) {
threads.forEach(thread => {
if (!thread.isUnread()) {
GmailApp.moveThreadToArchive(thread)