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
// Bootstrap 5 compatible autocomplete | |
static autocomplete(element) { | |
const cache = {}; | |
element.autocomplete = 'off'; | |
element.parentNode.classList.add('dropdown'); | |
element.setAttribute('data-bs-toggle', 'dropdown'); | |
element.classList.add('dropdown-toggle'); | |
const dropdownElement = HOA.template('<div class="dropdown-menu"></div>'); | |
element.after(dropdownElement); | |
const dropdown = new bootstrap.Dropdown(element); |
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
<?php | |
class Service { | |
protected static $data_source; | |
/** | |
* ========================================================================= | |
* | PDO Wrapper Methods | | |
* ========================================================================= |
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/env python3 | |
import datetime | |
import enum | |
import struct | |
class ConfigurationData: | |
BIT_PREAMBLE = b'\x00\x09\x0f\xf0\x0f\xf0\x0f\xf0\x0f\xf0\x00\x00\x01\x61' | |
DATE_FORMAT = '%Y/%m/%d' |
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
/* Allows nested links inside stretched link targets */ | |
.stretched-link-target { transform: rotate(0); } | |
.stretched-link-target a:not(.stretched-link) { position: relative; z-index: 1; } | |
/* Adds a checkbox to toggle button labels | |
Usage: Add 'btn-check-label' class to label for .btn-check | |
Example: <input type="checkbox" class="btn-check" id="btn-check" autcomplete="off"> | |
<label class="btn btn-check-label btn-primary" for="btn-check">Checkbox</label> */ | |
.btn-check ~ .btn-check-label::before { content: '\2610\0020' } | |
.btn-check:checked ~ .btn-check-label::before { content: '\2611\0020' } |
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 errno | |
try: | |
from fcntl import ioctl | |
except: | |
import time | |
import re | |
import socket | |
import struct | |
from subprocess import CalledProcessError, check_output |
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/env python3 | |
from base64 import b64encode | |
from enum import Enum | |
from hashlib import sha1 | |
from http.server import BaseHTTPRequestHandler | |
from random import randrange | |
from select import select | |
import struct |