Skip to content

Instantly share code, notes, and snippets.

View pketh's full-sized avatar
🐢
https://kinopio.club

Pirijan pketh

🐢
https://kinopio.club
View GitHub Profile
@pketh
pketh / kinopio-markdown-userscript.js
Last active January 3, 2021 04:08 — forked from danreeves/kinopio-markdown-userscript.js
kinopio.club markdown userscript
// ==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==
ʕ●ᴥ●ʔノ*:・
@pketh
pketh / asciiputsonglasses
Created September 10, 2020 14:30 — forked from staringispolite/asciiputsonglasses
Ascii art sunglasses meme
Puts on glasses:
(•_•)
( •_•)>⌐■-■
(⌐■_■)
Takes off glasses ("mother of god..."):
(⌐■_■)
( •_•)>⌐■-■
︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿
︵‿︵‿ poolside fm ︵‿︵‿︵‿︵‿︵‿
︵‿︵‿︵‿︵‿︵‿︵‿ for iphone ‿︵‿
︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿︵‿
in the app store ⓝⓞⓦ 🏝Mobile phone http://cellular.poolside.fm
@pketh
pketh / kinopio-search.js
Last active August 27, 2020 20:52
search snippet for kinopio cards
// edit search and paste me into your browser console
search = 'my cool search';
// this will only work for the spaces you have cached
// i.e. you've opened the space on this device recently
spaces = Object.keys(localStorage);
spaces = spaces.filter(space => space.startsWith('space-'));
spaces = spaces.map(space => JSON.parse(localStorage[space]));
matchingSpaces = spaces.filter(space => {
if (!space.name) { return };
moveZeros([1, 2, 0, 1, 0, 0, 3, 6])
const moveZeroes = (numbers) => {
let zeroes = []
numbers = numbers.filter(number => {
if (number === 0) {
zeroes.push(number)
} else {
return true
}
꒰◍ᐡᐤᐡ◍꒱ ␈␈␈␈␈␈␈␈
@pketh
pketh / cache.js
Created March 26, 2020 03:03
kinopio ls cache system
// local storage cache interface for currentUser and spaces
import utils from '@/utils.js'
export default {
storeLocal (key, value) {
try {
window.localStorage[key] = JSON.stringify(value)
} catch (error) {
console.warn('storeLocal Could not save to localStorage')
@pketh
pketh / hi.md
Created December 17, 2019 19:42
Kinopio Reliability Fixes dec 17 2019

Reliability Fixes

I just released some client/server patches that should address issues reported, (be sure to refresh next time you use kinopio). here's the list of what's fixed:

🐛Reported Issue:

  • when you clicked the space selection button and were seeing extra spaces that would flash and then go away.

🏥Resolution:

@pketh
pketh / ManyToManyRelationships.md
Created September 20, 2019 17:21 — forked from elliette/ManyToManyRelationships.md
Describing `belongsToMany` and `hasMany` methods in Sequelize

Defining Many-to-Many Associations in Sequelize

Reference: Sequelize docs on association

Let’s say we have two models: Films and Festivals

We know that a film can be shown at many film festivals and that, conversely, a festival can show many films. This is what is known as a many-to-many relationship.

Knowing this, we can set up our associations: