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;
}
tell application "Photos" | |
activate | |
set folderList to name of every folder | |
set selectedFolders to choose from list folderList with prompt "Select folders:" with multiple selections allowed | |
set destination to POSIX path of (choose folder with prompt "Please select a backup location:") | |
repeat with f in folders | |
if selectedFolders contains name of f then | |
my exportFolder(f, destination) | |
end if |
(This is a fork of Michael's original gist with some editing of the unions + records sections.)
Each of these examples assume the usage of --strict
mode in Typescript
Can be implemented using “Custom Types”
Each of these examples assume the usage of --strict
mode in Typescript
Can be implemented using “Custom Types” https://guide.elm-lang.org/types/custom_types.html
#!/usr/bin/env python | |
# Usage: python simple_http_server_cors.py <port> | |
try: | |
# try to use Python 3 | |
from http.server import HTTPServer, SimpleHTTPRequestHandler, test as test_orig | |
import sys | |
def test (*args): | |
test_orig(*args, port=int(sys.argv[1]) if len(sys.argv) > 1 else 8000) |
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user |