Skip to content

Instantly share code, notes, and snippets.

@bettysteger
bettysteger / init-editorjs.js
Last active January 23, 2025 01:45
Editor.js [Inline Tool] Mentions
import mentionsService from 'mentionsService.js'
import InlineMention from 'inlineMention.js'
/**
* this is just a code snippet on how to use the Mentions Service and Inline Tool
*/
const editor = new EditorJS({
holder: 'editorjs',
inlineToolbar: ['bold', 'italic', 'link', 'inlineMention'],
tools: {
@GenevieveBuckley
GenevieveBuckley / test_monkeypatch.py
Last active February 6, 2025 16:19
Monkeypatching user input with pytest
from io import StringIO
def double():
x = input("Enter an integer: ")
return int(x) * 2
def adding():
x = float(input('Enter the first number'))
@oglops
oglops / yaml_OrderedDict.py
Last active January 25, 2023 11:08
write to and load from yaml file with OrderedDict
#!/usr/bin/env python
try:
# for python newer than 2.7
from collections import OrderedDict
except ImportError:
# use backport from pypi
from ordereddict import OrderedDict
import yaml
@gitaarik
gitaarik / git_submodules.md
Last active July 11, 2025 00:20
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.