Skip to content

Instantly share code, notes, and snippets.

@amichuda
amichuda / github-issue-macro.js
Created March 16, 2022 16:46
A Obsidian QuickAdd Macro to output issues by a user and organizations
// To use this with QuickAdd, you need to also create a capture in QuickAdd that reads in the output of this macro
// In the bottom of the capture, in the "Format" box, add {{MACRO:github-issue-macro}} (or however you register the macro.
module.exports = async (params) => {
const { app } = params;
let file = app.workspace.getMostRecentLeaf()?.view?.file;
if (!file) {
return;
}
@amichuda
amichuda / app.py
Created March 27, 2020 02:53 — forked from kylrth/app.py
Debugging Bokeh server applications using Visual Studio Code
import ptvsd
# attach to VS Code debugger if this script was run with BOKEH_VS_DEBUG=true
if os.environ['BOKEH_VS_DEBUG'] == 'true':
# 5678 is the default attach port in the VS Code debug configurations
print('Waiting for debugger attach')
ptvsd.enable_attach(address=('localhost', 5678), redirect_output=True)
ptvsd.wait_for_attach()
@amichuda
amichuda / app.py
Created March 27, 2020 02:53 — forked from kylrth/app.py
Debugging Bokeh server applications using Visual Studio Code
import ptvsd
# attach to VS Code debugger if this script was run with BOKEH_VS_DEBUG=true
if os.environ['BOKEH_VS_DEBUG'] == 'true':
# 5678 is the default attach port in the VS Code debug configurations
print('Waiting for debugger attach')
ptvsd.enable_attach(address=('localhost', 5678), redirect_output=True)
ptvsd.wait_for_attach()