All of the following information is based on go version go1.17.1 darwin/amd64.
| GOOS | Out of the Box |
|---|---|
aix |
✅ |
android |
✅ |
| // zod schema | |
| z.object({ | |
| // valid if string or: | |
| optional: z.string().optional(), // field not provided, or explicitly `undefined` | |
| nullable: z.string().nullable(), // field explicitly `null` | |
| nullish: z.string().nullish(), // field not provided, explicitly `null`, or explicitly `undefined` | |
| }); | |
| // type | |
| { |
| { name: 'Lighting', options: [ | |
| 'golden hour, warm glow' | |
| 'blue hour, twilight, ISO12000' | |
| 'midday, direct lighting, overhead sunlight' | |
| 'overcast, whitebox, flat lighting, diffuse' | |
| 'dreamlike diffuse ethereal lighting' | |
| 'dramatic lighting, dramatic shadows, illumination' | |
| 'studio lighting, professional lighting, well-lit' | |
| 'flash photography' | |
| 'low-key lighting, dimly lit' |
| import os.path | |
| import requests | |
| import shutil | |
| import hashlib | |
| import logging | |
| def validate_file(file_path, hash): | |
| """ | |
| Validates a file against an MD5 hash value | |
| import logging.config | |
| import os | |
| from django.utils.log import DEFAULT_LOGGING | |
| # Disable Django's logging setup | |
| LOGGING_CONFIG = None | |
| LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper() | |
| logging.config.dictConfig({ |
| #!/usr/bin/env python3 | |
| """ | |
| License: MIT License | |
| Copyright (c) 2023 Miel Donkers | |
| Very simple HTTP server in python for logging requests | |
| Usage:: | |
| ./server.py [<port>] | |
| """ | |
| from http.server import BaseHTTPRequestHandler, HTTPServer |
| #!/usr/bin/env python | |
| import logging | |
| logger = logging.getLogger(__name__) | |
| import argparse | |
| from pprint import pprint,pformat | |
| import os.path | |
| import urllib2 | |
| import shutil |
Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist.
Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).