$ pipenv install flask flask-cors
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
# Under UIVariables directory | |
title = "Main Window" |
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
# -*- coding: utf-8 -*- | |
# Copyright (c) 2017 by Esteban Castro Borsani. | |
# Released under MIT license | |
from .elements import ( | |
Header, | |
Quote, | |
HRule, | |
UListItem, |
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
import flask | |
from flask_login import LoginManager, UserMixin, login_user, logout_user | |
from flask_sqlalchemy import SQLAlchemy | |
from werkzeug.middleware.dispatcher import DispatcherMiddleware | |
settings = { | |
"SECRET_KEY": "hesdfdsfklj;l", | |
"SQLALCHEMY_DATABASE_URI": "sqlite:///db.sqlite3", | |
} |
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
// npm i js-cookie --save | |
import axios from 'axios' | |
import Cookies from 'js-cookie' | |
const api = axios.create({ | |
headers: { | |
'Content-Type': 'application/json', | |
'X-CSRF-TOKEN': Cookies.get('csrf_token') | |
}) |
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
""" | |
Python implementation of JavaScript's Promise interface | |
with the power of asyncio. | |
See https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Promise | |
for the API specification. | |
Authored by: Frost Ming <[email protected]> | |
License: WTFPL | |
""" |
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
from napkin import response, request | |
import requests | |
import json | |
TELEGRAM_BOT_TOKEN = 'xxxxxx' | |
TELEGRAM_CHAT_ID = 'xxxxx' | |
def format_message(data): | |
"""data example: |
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
""" | |
Render Image in iTerm2 without pixelization | |
This small snippet is ported from https://github.com/sindresorhus/ansi-escapes. | |
It leverages iTerm2's image protocol: https://iterm2.com/documentation-images.html | |
so it only works on iTerm2. | |
Released to the public domain, feel free to copy and modify. | |
- Frost Ming | |
""" |
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: Add to Journal | |
on: | |
workflow_dispatch: | |
inputs: | |
text: | |
description: Add a single item to Logseq journal | |
type: string | |
required: true |
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
# fly.toml file generated for still-snowflake-6351 on 2023-03-30T09:53:40+08:00 | |
kill_signal = "SIGINT" | |
kill_timeout = 5 | |
primary_region = "sin" | |
processes = [] | |
[build] | |
image = "bayedev/opencatd" |
OlderNewer