Design Name | Accessible Name | Code Example | Reference Materials | Notes |
---|---|---|---|---|
Floating action button (fab) | Button | <button> |
don't give it a tabindex higher than zero | |
Slider | Input, Range | <input type='range'/> |
||
Switch | Checkbox | <input type="checkbox"> |
||
Breadcrumb | Link | <a href="some-step"> |
||
Stepper | there isn't one | focus on describing the experience and make the step contents semantic, maybe use anchor links | ||
Tabs | ARIA Tabpanel, Tablist, Tab | Tabs example | ||
Card | doesn't exist | focus on making its content semantic, and if it's a list of cards, make sure the list is semantic and parsable, or use article if it makes sense | ||
Accordion | doesn't exist | Accordion example | focus on making its content semantic and navigable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// | |
// Copyright (c) 2024 Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
url=$1 | |
soap_head='<?xml version="1.0" encoding="utf-8"?><s:Envelope s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><u:GetGenericPortMappingEntry xmlns:u="urn:upnporg:serviceId:WANIPConnection.1#GetGenericPortMappingEntry"><NewPortMappingIndex>' | |
soap_tail='</NewPortMappingIndex></u:GetGenericPortMappingEntry></s:Body></s:Envelope>' | |
for i in `seq 0 10`; do | |
payload=$soap_head$i$soap_tail | |
curl -H 'Content-Type: "text/xml;charset=UTF-8"' -H 'SOAPACTION: "urn:schemasupnp-org:service:WANIPConnection:1#GetGenericPortMappingEntry"' --data "$payload" "$url" | |
echo "" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@font-face { | |
font-family: GT Walsheim Pro; | |
src: local("GT Walsheim Pro Regular"),local("GTWalsheimProRegular"),url(GTWalsheimProRegular.woff2) format("woff2"),url(GTWalsheimProRegular.woff) format("woff"),url(GTWalsheimProRegular.ttf) format("truetype"); | |
font-weight: 400; | |
font-style: normal | |
} | |
@font-face { | |
font-family: GT Walsheim Pro; | |
src: local("GT Walsheim Pro Bold"),local("GTWalsheimProBold"),url(GTWalsheimProBold.woff2) format("woff2"),url(GTWalsheimProBold.woff) format("woff"),url(GTWalsheimProBold.ttf) format("truetype"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String incomingByte = ""; // for incoming serial data | |
bool blinking = false; | |
int blinkSpeed = 100; | |
// the setup function runs once when you press reset or power the board | |
void setup() { | |
// initialize digital pin LED_BUILTIN as an output. | |
pinMode(LED_BUILTIN, OUTPUT); | |
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from django.conf import settings | |
from django.core.files import File | |
from django.core.files.storage import FileSystemStorage | |
class LocalMediaSaveMixin(object): | |
"""Mixin class to for backing up media files on model that has | |
image/file fields. To use it, ensure to keep in my python multiple |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set inotify watch limit high enough for IntelliJ IDEA (PhpStorm, PyCharm, RubyMine, WebStorm). | |
# Create this file as /etc/sysctl.d/60-jetbrains.conf (Debian, Ubuntu), and | |
# run `sudo service procps start` or reboot. | |
# Source: https://confluence.jetbrains.com/display/IDEADEV/Inotify+Watches+Limit | |
# | |
# More information resources: | |
# -$ man inotify # manpage | |
# -$ man sysctl.conf # manpage | |
# -$ cat /proc/sys/fs/inotify/max_user_watches # print current value in use |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class Coroutine { | |
public static void BeginExecute(IEnumerable<Promise> enumerable) { | |
MoveNext(enumerable.GetEnumerator()); | |
} | |
static void MoveNext(IEnumerator<Promise> enumerator) { | |
if (enumerator.MoveNext()) { | |
var promise = enumerator.Current; | |
promise.Current = promise.Task(); | |
promise.Current._CallBack = () => MoveNext(enumerator); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"europe": { | |
"va": "vatican city", | |
"ch": "switzerland", | |
"ad": "andorra", | |
"ee": "estonia", | |
"is": "iceland", | |
"am": "armenia", | |
"al": "albania", | |
"cz": "czech republic", |
NewerOlder