Skip to content

Instantly share code, notes, and snippets.

View dobesv's full-sized avatar

Dobes Vandermeer dobesv

View GitHub Profile
@dobesv
dobesv / boorkmarklet.md
Last active November 8, 2021 19:44 — forked from 71/boorkmarklet.md
Lists all participants in a Google Meet meeting.

The following bookmarket shows a popup with the name of the participants separated by newlines.

javascript:-function(maxStrLength = 2000) { try { function findParticipants(current, depth = 0) { if (depth > 7) return; if (typeof current !== "object" || current === null || current === window) return; const descriptors = Object.getOwnPropertyDescriptors(current); for (const prop in descriptors) { if (prop.startsWith('["spaces/')) return Object.values(current); const item = findParticipants(descriptors[prop].value, depth + 1); if (item !== undefined) return item; } } const rootState = Object.entries(window).find(x => x[0].startsWith("closure_lm_"))[1], participants = findParticipants(rootState), names = []; function findName(obj) { for (const prop in obj) { const value = obj[prop]; if (typeof value === "object" && value !== null && typeof value[1] === "string") return value[1]; } } for (let i = 0; i < participants.length; i++) { const name = findName(participants[i]); if (names.indexOf(name) === -1) names.
@dobesv
dobesv / gulpfile.js
Last active June 30, 2016 06:39 — forked from anonymous/gulpfile.js
Reproduce RegularExpression condition bug with new version of node (6.2.2)
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')();
var del = require('del');
var merge = require('merge-stream');
var path = require('path');
var RevAll = require('gulp-rev-all');
var runSequence = require('run-sequence');
var os = require('os');
src = [
@dobesv
dobesv / .htaccess
Last active January 4, 2016 10:18 — forked from thoop/.htaccess
# Change YOUR_TOKEN to your prerender token and uncomment that line if you want to cache urls and view crawl stats
# Change http://example.com (at the end of the last RewriteRule) to your website url
<IfModule mod_headers.c>
#RequestHeader set X-Prerender-Token "YOUR_TOKEN"
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On