For signed URLs, refer here
from cloudfront_signed_url import generate_cloudfront_signed_url
url = "https://your-cf-domain.com/path/to/file.txt"
cookie = generate_cloudfront_signed_cookie(url, 3600)| """Starlark script to nicely format providers of a target. | |
| Usage: | |
| bazel cquery --output starlark --starlark:file ${PATH_TO_THIS_FILE} //path/to/pkg:target | |
| If you get "ERROR: --starlark:file :: Unrecognized option: --starlark:file", make sure you are | |
| using `bazel cquery` **not** `bazel query`. | |
| If you get "Error: Starlark computation cancelled: too many steps", you can try adding | |
| `--max_computation_steps=9223372036854775807` to raise the limit to its maximum value. |
| // simplevm.c: demonstrates Hypervisor.Framework usage in Apple Silicon | |
| // Based on the work by @zhuowei | |
| // @imbushuo - Nov 2020 | |
| // To build: | |
| // Prepare the entitlement with BOTH com.apple.security.hypervisor and com.apple.vm.networking WHEN SIP IS OFF | |
| // Prepare the entitlement com.apple.security.hypervisor and NO com.apple.vm.networking WHEN SIP IS ON | |
| // ^ Per @never_released, tested on 11.0.1, idk why | |
| // clang -o simplevm -O2 -framework Hypervisor -mmacosx-version-min=11.0 simplevm.c | |
| // codesign --entitlements simplevm.entitlements --force -s - simplevm |
For signed URLs, refer here
from cloudfront_signed_url import generate_cloudfront_signed_url
url = "https://your-cf-domain.com/path/to/file.txt"
cookie = generate_cloudfront_signed_cookie(url, 3600)| #!/usr/bin/env bash | |
| # | |
| # chmod +x ./planz.sh | |
| # | |
| # For usage try: | |
| # ./planz.sh -h | |
| # ./planz.sh help | |
| file=/tmp/planz_credentials |
| # The initial version | |
| if [ ! -f .env ] | |
| then | |
| export $(cat .env | xargs) | |
| fi | |
| # My favorite from the comments. Thanks @richarddewit & others! | |
| set -a && source .env && set +a |
What are Lenses? Great explanation by @mbrandonw
Files:
input.swift - sample structs for which we want helpers to be generatedlens.stencil - sourcery template to generate lenses helpersoutput.swift - sample lenses helpers generatedzLens.swift - simple implementation of lenses, so you can play with itHints:
| py_binary( | |
| name = 'generate_compile_command', | |
| srcs = [ | |
| 'generate_compile_command.py', | |
| ], | |
| deps = [ | |
| '//third_party/bazel:extra_actions_proto_py', | |
| ], | |
| ) |