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 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
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 |
sass/ | |
| | |
|– base/ | |
| |– _reset.scss # Reset/normalize | |
| |– _typography.scss # Typography rules | |
| ... # Etc… | |
| | |
|– components/ | |
| |– _buttons.scss # Buttons | |
| |– _carousel.scss # Carousel |
# | |
# Comic Chat fixer MITM proxy: fixes Comic Chat to (sort of) work with modern | |
# IRC servers. Tested with Microsoft Chat 2.5 on Windows XP, 8 and 10 | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |