This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Puts on glasses: | |
(•_•) | |
( •_•)>⌐■-■ | |
(⌐■_■) | |
Takes off glasses ("mother of god..."): | |
(⌐■_■) | |
( •_•)>⌐■-■ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ʕ●ᴥ●ʔノ*:・ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Kinopio Markdown | |
// @namespace https://kinopio.club/kinopio-markdown-userscript-Q9qnmvXEPaagLx5Ufytlx | |
// @version 0.1 | |
// @description convert text in cards to markdown | |
// @author Pirijan (forked from dnrvs) | |
// @match https://kinopio.club/kinopio-markdown-userscript-Q9qnmvXEPaagLx5Ufytlx | |
// @grant none | |
// ==/UserScript== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ᵔᴥᵔ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// group cards into overlap groups | |
self.onmessage = function (event) { | |
const offset = 10 | |
const { cards, viewport, zoom } = event.data | |
let newCards = cards.filter(card => isCardInViewport(card, viewport, zoom)) | |
newCards = newCards.map(card => { | |
return { | |
id: card.id, | |
name: card.name, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groupIntoBatches (array) { | |
const batchSize = 100 | |
const totalBatches = Math.ceil(array.length / batchSize) | |
let batches = [] | |
_.times(totalBatches, (index) => { | |
const start = index * batchSize | |
let end = (index + 1) * batchSize | |
const batch = array.slice(start, end) | |
batches.push(batch) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async bulletin ({subject, users, exploreSpaces}) { | |
const batches = utils.groupIntoBatches(users) | |
console.log('📧 bulletin', { subject, users: users.length, batches: batches.length }) | |
for (const users of batches) { | |
const templates = users.map(user => { | |
return { | |
From: "[email protected]", | |
To: user.email, | |
TemplateAlias: "bulletin", | |
MessageStream: "bulletins", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
await postmark.sendEmailBatchWithTemplates(templates) | |
} catch (error) { | |
console.error('🚒 email.bulletin', error) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"name": "Ascension Island", | |
"emoji": "🇦🇨", | |
"unicode": "U+1F1E6 U+1F1E8", | |
"image": "https://cdn.jsdelivr.net/npm/[email protected]/dist/images/AC.svg" | |
}, | |
{ | |
"name": "Andorra", | |
"emoji": "🇦🇩", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
import { reactive, computed, onMounted, defineProps, defineEmits, watch, ref, nextTick } from 'vue' | |
import { useStore } from 'vuex' | |
const store = useStore() | |
import utils from '@/utils.js' | |
const dialog = ref(null) | |
onMounted(() => { |