I am assuming that your Chateau has loaded it's default config. If so:
- bridge and lte interface are already configured correctly
- also the DHCP server is already setup (192.168.88.2 - 192.168.88.254)
- NAT is also already configured
#!/usr/bin/python | |
import json | |
from enum import Enum | |
import related | |
from attr import attrib | |
from related import to_model, TypedSequence | |
class Files(Enum): |
# Temporarily add a normal upstream DNS resolver | |
/ip dns set servers=1.1.1.1,1.0.0.1 | |
# CA certificates extracted from Mozilla | |
/tool fetch url=https://curl.se/ca/cacert.pem | |
# Import the downloaded ca-store (127 certificates) | |
/certificate import file-name=cacert.pem passphrase="" | |
# Set the DoH resolver to cloudflare |
from collections import namedtuple | |
import typing | |
KeyPair = namedtuple('KeyPair', ['n', 'e', 'd']) | |
def inverse(x: int, y: int) -> int: | |
a, b, u = 0, y, 1 | |
while x > 0: | |
q = b // x |
By default VS Code installs its server component on a remote server automatically when using the SSH extension. This does not work when working in an air gapped environment or when working offline.
This playbook downloads the VS Code Server on a remote machine. It also extracts the tarball to the correct location. After running this playbook you can connect to the remote machine using the VS Code SSH extension.
#!/usr/bin/env bash | |
set -e | |
# ------------------------------------------------------------------------------ | |
# This script will generate a new private key and a Certificate Signing Request | |
# (CSR) using OpenSSL. | |
# This script is non-interactive. Instead it uses the variables set at the | |
# beginning of this script. | |
# ------------------------------------------------------------------------------ |
import ast | |
import operator as op | |
DEFINED_OPS = { | |
ast.Add: op.add, | |
ast.Sub: op.sub, | |
ast.Mult: op.mul, | |
ast.Div: op.truediv, | |
ast.USub: op.neg, |
""" | |
Requires sqlalchemy and sqlalchemy_mixins. Install via pip | |
""" | |
import pathlib | |
import typing | |
from sqlalchemy import ForeignKey, Text, create_engine, Column, Integer, String | |
from sqlalchemy.orm import create_session, relationship, declarative_base | |
from sqlalchemy_mixins import ReprMixin |
from typing import List | |
class Solution: | |
def firstMissingPositive(self, nums: List[int]) -> int: | |
return 0 | |
if __name__ == '__main__': | |
assert Solution().firstMissingPositive([2,1,0]) == 3 |
import base64 | |
import datetime | |
import hashlib | |
import string | |
import random | |
YYMMDDhhmm = '%y%m%d%H%M' | |
YYMMDDhhmmss = '%y%m%d%H%M%S' | |
ASCII_LETTERS = string.ascii_letters |