Skip to content

Instantly share code, notes, and snippets.

View matthiask's full-sized avatar
🥳

Matthias Kestenholz matthiask

🥳
View GitHub Profile
@pvanliefland
pvanliefland / README.md
Last active July 16, 2024 11:25
Django embed template tag

embed template tag

Rationale

The issue

When working on a web application, you may have, on different screens, a variable number of similar components with minor differences. A "card" component is a good example: every card has a wrapper section element, a title, and an arbitrary content wrapped inside a div element.

Consider the following simplified HTML example of an application :

@schmich
schmich / ducky.md
Last active July 10, 2024 10:25
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@schmidsi
schmidsi / ClockIcon.jsx
Created August 4, 2016 15:13
A simple React SVG Clock Icon which can display a given time
// React imports
import React from 'react';
const Clock = (props) => {
const center = {
x: 15,
y: 15,
};
const lengths = {
import logging
l = logging.getLogger('django.db.backends')
l.setLevel(logging.DEBUG)
l.addHandler(logging.StreamHandler())