Skip to content

Instantly share code, notes, and snippets.

@wang0618
wang0618 / pywebio_ldap.py
Created November 13, 2021 07:03
Use LDAP Authentication in PyWebIO
from ldap3 import Server, Connection, ALL
from tornado.web import create_signed_value, decode_signed_value
import pywebio
from pywebio.input import *
from pywebio.output import *
from pywebio.session import *
LDAP_AUTH_URL = "ldap://localhost:389"
LDAP_AUTH_SEARCH_BASE = "dc=example,dc=org"
@cb109
cb109 / vscode_python_sort_imports_isort_on_save.md
Last active October 19, 2024 04:55
VSCode: Python Sort Imports on File Save (isort)

VSCode: Python Sort Imports on File Save (isort)

Update 2024

VSCode used to have issues with sorting Python imports (2021), as described further down below, but this has since been fixed.

All you need to do to make VSCode use its builtin isort on save is this in your settings.json:

@JohannesDeml
JohannesDeml / README.md
Last active May 17, 2024 23:09
Batch convert images with inkscape on windows

Batch convert svg|pdf|eps|emf|wmf|ai|ps|cdr to eps|pdf|png|jpg|tiff|svg|ps|emf|wmf

Screenshot Batch converter for Windows using Inkscape with the command line
InkscapeBatchConvert is an easy to use solution to quickly convert all files of a folder to another type without the need to open Inkscape. The program uses Windows Batch scripting and will only work on Windows.
Tested with Inkscape 1.0.x - 1.3.x ✅ (The last version that supports Inkscape 0.9.x can be found here)

Usage

  1. Download _InkscapeBatchConvert.bat
  2. Put it in the folder where you have files you wish to convert (will also scan on all subfolders for files of input type).
  3. Then double click the file to start it.