apt-get update
apt-get upgrade
apt-get install curl
# Check VXLAN exists
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Source: https://github.com/adamcharnock/lightbus/blob/master/experiments/types_to_jsonschema.py | |
// $ python experiments/types_to_jsonschema.py | |
// Example: | |
// def check_password(username: str, password: str) -> bool: pass | |
// Parameter schema: | |
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import gitlab | |
GITLAB_API_TOKEN = os.environ['GITLAB_API_TOKEN'] | |
def main(): | |
print("Logging into gitlab and fetching a list of projects...") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def pretty_request(request): | |
headers = '' | |
for header, value in request.META.items(): | |
if not header.startswith('HTTP'): | |
continue | |
header = '-'.join([h.capitalize() for h in header[5:].lower().split('_')]) | |
headers += '{}: {}\n'.format(header, value) | |
return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
679.056883 MainThread [NOLOOP ] Bus is opening | |
680.058956 MainThread [task 4399429288] Awaiting calls on the call queue | |
680.910110 MainThread [task 4399649656] -> One started | |
681.442022 dispatch_0 [NOLOOP ] --> Two started | |
683.099985 dispatch_0 [task 4399651832] ---> Three started | |
683.208942 dispatch_0 [task 4399651832] ----> Four started | |
683.764935 dispatch_1 [NOLOOP ] -----> Five started | |
683.855057 dispatch_1 [NOLOOP ] Adding callable to queue | |
684.042931 dispatch_1 [NOLOOP ] Awaiting execution completion | |
685.514927 MainThread [task 4399429288] Call received, executing |
OlderNewer