When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}| <script> | |
| import { country } from '../stores/local-store.js; | |
| export let location; | |
| function setCountry(value) { | |
| // We can use this here because _layout calls useLocalStorage for country. | |
| // If you have multiple variables to store each will need to be called | |
| // in the same way in the _layout file. | |
| country.set(value); | |
| } |
| const { execSync } = require('child_process') | |
| const { createHash } = require('crypto') | |
| const invertColor = require('invert-color') | |
| const branchName = execSync('git rev-parse --abbrev-ref HEAD') | |
| const hash = createHash('sha256') | |
| hash.update(branchName) | |
| const color = '#' + hash.digest().toString('hex').substring(0, 6) | |
| const invertedColor = invertColor(color, true) |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
| import IOBluetooth | |
| // See https://developer.apple.com/reference/iobluetooth/iobluetoothdevice | |
| // for API details. | |
| class BluetoothDevices { | |
| func pairedDevices() { | |
| print("Bluetooth devices:") | |
| guard let devices = IOBluetoothDevice.pairedDevices() else { | |
| print("No devices") | |
| return |
| :80 | |
| root /usr/src/wordpress | |
| gzip | |
| fastcgi / wordpress:9000 php | |
| rewrite { | |
| if {path} not_match ^\/wp-admin | |
| to {path} {path}/ /index.php?_url={uri} | |
| } | |
| log stdout | |
| errors stderr |
| var app; | |
| var clrFilePath; | |
| var colorCnt = 0; | |
| var colorList; | |
| var jsonFilePath; | |
| var nsColorList; | |
| var paletteName; | |
| function hex2rgba(color) { | |
| function ch(pos) { |
| sass/ | |
| | | |
| |โ base/ | |
| | |โ _reset.scss # Reset/normalize | |
| | |โ _typography.scss # Typography rules | |
| | ... # Etcโฆ | |
| | | |
| |โ components/ | |
| | |โ _buttons.scss # Buttons | |
| | |โ _carousel.scss # Carousel |