Skip to content

Instantly share code, notes, and snippets.

View frankwiles's full-sized avatar
💻
Artisanal bits built just for you!

Frank Wiles frankwiles

💻
Artisanal bits built just for you!
View GitHub Profile
@frankwiles
frankwiles / blocks.py
Created May 17, 2015 03:13
Code and Markdown blocks for Wagtail 1.0 StreamField
from django.utils.safestring import mark_safe
from markdown import markdown
from pygments import highlight
from pygments.formatters import get_formatter_by_name
from pygments.lexers import get_lexer_by_name
from wagtail.wagtailcore import blocks
class CodeBlock(blocks.StructBlock):

======================== DEP XXX: Simplified routing syntax

  • DEP: XXX
  • Author: Tom Christie
  • Implementation Team: Tom Christie
  • Shepherd: Tim Graham
  • Status: Draft
  • Type: Enhancement
@apollo13
apollo13 / chromelogger.py
Last active May 12, 2022 01:09
Django logging to Firefox/Chrome devtools
"""
License: MIT - https://opensource.org/licenses/MIT
ChromeLogger is a protocol which allows sending logging messages to the Browser.
This module implements simple support for Django. It consists of two components:
* `LoggingMiddleware` which is responsible for sending all log messages
associated with the request to the browser.
* `ChromeLoggerHandler` a python logging handler which collects all messages.
@jefftriplett
jefftriplett / python-django-postgres-ci.yml
Last active June 23, 2025 06:00
This is a good starting point for getting Python, Django, Postgres running as a service, pytest, black, and pip caching rolling with GitHub Actions.
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
@tannerlinsley
tannerlinsley / createCrudHooks.js
Created November 29, 2020 06:39
A naive, but efficient starter to generate crud hooks for React Query
export default function createCrudHooks({
baseKey,
indexFn,
singleFn,
createFn,
updateFn,
deleteFn,
}) {
const useIndex = (config) => useQuery([baseKey], indexFn, config)
const useSingle = (id, config) =>
@gladiatr72
gladiatr72 / deployment-status-to-env.yaml
Last active December 16, 2021 20:52
pull status elements into environment
spec:
containers:
-
name: misc
image: gladiatr72/misc:util-21
env:
-
name: POD_IP
valueFrom:
fieldRef:
@edraobdu
edraobdu / get_queries.py
Last active March 4, 2023 14:58
pytest fixture to help debugging (and asserting) database queries on django tests.
"""
Based on this answer https://stackoverflow.com/a/59125267
Requirements:
- django
- pytest
- pytest-django
Include this fixture in your `conftest.py`
@intellectronica
intellectronica / 0.README.md
Last active December 15, 2025 19:23
Lorem Ipsum Generator SKILL

Lorem Ipsum Generator SKILL

Get lorem-ipsum.zip

Use this skill to generate lorem ipsum placeholder text for mockups, wireframes, and content drafts. Supports various structures including plain paragraphs, headings with sections, bullet and numbered lists, and realistic mixed documents. Output in plain text, Markdown, or HTML.

Works with Claude (by extracting it to ~/.claude/skills/) or uploading to the Claude web app, or with any other agent using Skillz.

Usage