Skip to content

Instantly share code, notes, and snippets.

View hachibeeDI's full-sized avatar

OGURA Daiki hachibeeDI

View GitHub Profile
@hachibeeDI
hachibeeDI / prisma-context.ts
Created April 14, 2025 01:13 — forked from exAspArk/prisma-context.ts
Prisma Extension with Express.js HTTP Request Context
import { Request, Response, NextFunction } from "express";
import { AsyncLocalStorage } from "node:async_hooks";
import { PrismaClient } from '@prisma/client';
const ASYNC_LOCAL_STORAGE = new AsyncLocalStorage();
export const setContext = (callback: (req: Request) => any) => {
return (req: Request, _res: Response, next: NextFunction) => {
const context = callback(req);

Question

How to implement a UITableView with a separator line like this:

doubly separator line

Usually, you can only set the separatorLine property of a UITableView with to single line or single line etched. Sometimes, it is not enough. So, how to implement a separator line like this?

Answer

# found this from Armin R. on Twitter, what a beautiful gem ;)
import ctypes
from types import DictProxyType, MethodType
# figure out side of _Py_ssize_t
if hasattr(ctypes.pythonapi, 'Py_InitModule4_64'):
_Py_ssize_t = ctypes.c_int64
else:
_Py_ssize_t = ctypes.c_int
*.pyc
bin/
include/
lib/