Skip to content

Instantly share code, notes, and snippets.

@twodayslate
twodayslate / tornado_sqlalchemy_auto_api.py
Created January 10, 2020 22:33
A tornado server that creates an API and schema output automatically based on a SQLAlchemy model
#!/usr/bin/env python3
# vim: set fileencoding=utf8 :
import tornado.ioloop
from tornado.options import options, define
from tornado_sqlalchemy import SQLAlchemy
from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
@twodayslate
twodayslate / File.swift
Last active September 11, 2021 23:33
Move the DisclosureGroup indicator in SwiftUI
// You'll need the following Swift Packages
// - https://github.com/siteline/SwiftUI-Introspect
// - https://github.com/steipete/InterposeKit
// DisclosureGroup(...)
.introspectViewController { controller in
func findViews(_ view: UIView, depth: Int = 0) {
for sub in view.subviews {
findViews(sub, depth: depth + 1)
}