Skip to content

Instantly share code, notes, and snippets.

View nmcclain's full-sized avatar

Ned McClain nmcclain

View GitHub Profile
@nmcclain
nmcclain / supervisely_dtl_example.json
Last active May 28, 2024 17:07
Example DTL for image augmentation with Supervise.ly
[
{
"dst": "$raw",
"src": [
"roads_annotated/*"
],
"action": "data",
"settings": {
"classes_mapping": "default"
}
@nmcclain
nmcclain / gettoken.js
Last active June 22, 2021 22:31
Get Notion.so token_v2 with username/password
// DANGER: Run this too frequently and you can lock out your Notion account.
// Once a day should be sufficient for most use cases.
//
// npm i -D playwright
// export NOTION_TOKEN=`node gettoken/gettoken.js`
const { chromium } = require('playwright');
const user = 'XXXX';
const pass = 'YYYY';
@nmcclain
nmcclain / notion-browser-content.js
Created April 24, 2021 16:46
notion-browser-content.js
for (var id of window.__console.AppStore.instanceState.currentBlockStore.instanceState.value.content) {
for (var entry of Array.from(window.__console.AppStore.instanceState.currentBlockStore.inMemoryRecordCache.cache)) {
if (entry[0].startsWith(id)) {
console.log(entry[1].value.value);
}
}
}