major vscode config overhauls. Getting python working as expected
This commit is contained in:
86
.vscode/settings.json
vendored
Normal file
86
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
{
|
||||
"[css]": {
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[django-html]": {
|
||||
"editor.insertSpaces": true,
|
||||
"editor.quickSuggestions": {
|
||||
"comments": true,
|
||||
"other": true,
|
||||
"strings": true
|
||||
},
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[dockercompose]": {
|
||||
"breadcrumbs.showConstants": true,
|
||||
"editor.quickSuggestions": {
|
||||
"comments": false,
|
||||
"other": true,
|
||||
"strings": true
|
||||
},
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[helm]": {
|
||||
"editor.insertSpaces": true,
|
||||
"editor.tabSize": 2,
|
||||
"rewrap.autoWrap.enabled": true,
|
||||
"rewrap.wholeComment": true,
|
||||
"rewrap.wrappingColumn": 73
|
||||
},
|
||||
"[html]": {
|
||||
"editor.insertSpaces": true,
|
||||
"editor.suggest.insertMode": "replace",
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.maxTokenizationLineLength": 2500,
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[markdown]": {
|
||||
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
|
||||
"editor.quickSuggestions": {
|
||||
"comments": "off",
|
||||
"other": "off",
|
||||
"strings": "off"
|
||||
},
|
||||
"editor.tabSize": 4,
|
||||
"editor.wordWrap": "off"
|
||||
},
|
||||
"[python]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.organizeImports": "always"
|
||||
},
|
||||
"editor.defaultFormatter": "charliermarsh.ruff",
|
||||
"editor.formatOnSave": true,
|
||||
"editor.formatOnType": true
|
||||
},
|
||||
"[shellscript]": {
|
||||
"editor.tabSize": 2,
|
||||
"files.eol": "\n"
|
||||
},
|
||||
"[terraform]": {
|
||||
"editor.insertSpaces": true,
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.maxTokenizationLineLength": 2500,
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.insertSpaces": true,
|
||||
"editor.tabSize": 2,
|
||||
"gitlens.codeLens.scopes": [
|
||||
"document"
|
||||
]
|
||||
},
|
||||
"[yaml]": {
|
||||
"editor.tabSize": 2
|
||||
},
|
||||
"cSpell.userWords": [
|
||||
"Kubernetes",
|
||||
"clamd",
|
||||
"rtype"
|
||||
],
|
||||
}
|
||||
@@ -1 +1,13 @@
|
||||
# Framework Laptop 16
|
||||
|
||||
## Keyboard VIA
|
||||
|
||||
Access keyboard configuration at <https://keyboard.frame.work/>
|
||||
|
||||
You might need to add the qmk udev rules for the browser to access your keyboard. Follow below:
|
||||
|
||||
```bash
|
||||
sudo curl -o /etc/udev/rules.d/50-qmk.rules https://raw.githubusercontent.com/qmk/qmk_firmware/refs/heads/master/util/udev/50-qmk.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
```
|
||||
|
||||
@@ -13,9 +13,10 @@
|
||||
- [VLAN Setup with nmcli](#vlan-setup-with-nmcli)
|
||||
- [ZRAM](#zram)
|
||||
- [Libraries](#libraries)
|
||||
- [DNF](#dnf)
|
||||
- [Common Libraries](#common-libraries)
|
||||
- [Apps](#apps)
|
||||
- [DNF](#dnf-1)
|
||||
- [Common CLI Apps](#common-cli-apps)
|
||||
- [Ungoogled Chromium](#ungoogled-chromium)
|
||||
- [VSCode](#vscode)
|
||||
- [Virtualization](#virtualization)
|
||||
- [NVM](#nvm)
|
||||
@@ -179,7 +180,7 @@ zramctl --size 4G /dev/zram0
|
||||
|
||||
## Libraries
|
||||
|
||||
### DNF
|
||||
### Common Libraries
|
||||
|
||||
```bash
|
||||
sudo dnf install -y \
|
||||
@@ -200,7 +201,7 @@ libgle-devel
|
||||
|
||||
## Apps
|
||||
|
||||
### DNF
|
||||
### Common CLI Apps
|
||||
|
||||
```bash
|
||||
sudo dnf install \
|
||||
@@ -254,6 +255,15 @@ sudo dnf install \
|
||||
p7zip
|
||||
```
|
||||
|
||||
### Ungoogled Chromium
|
||||
|
||||
<https://github.com/ungoogled-software/ungoogled-chromium?tab=readme-ov-file#automated-or-maintained-builds>
|
||||
|
||||
```bash
|
||||
sudo dnf copr enable wojnilowicz/ungoogled-chromium
|
||||
sudo dnf install ungoogled-chromium
|
||||
```
|
||||
|
||||
### VSCode
|
||||
|
||||
<https://code.visualstudio.com/docs/setup/linux#_rhel-fedora-and-centos-based-distributions>
|
||||
|
||||
@@ -6,5 +6,6 @@ readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
"boto3>=1.37.30",
|
||||
"boto3-stubs[all]>=1.38.23",
|
||||
"pytest>=8.3.5",
|
||||
]
|
||||
|
||||
@@ -3,15 +3,20 @@ export HOSTED_ZONE_ID=<aws hosted zone ID>
|
||||
export ROUTE53_RECORD=something.mydomain.com
|
||||
"""
|
||||
|
||||
import boto3
|
||||
import os
|
||||
import logging
|
||||
import os
|
||||
import subprocess
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import boto3
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from mypy_boto3_route53 import Route53Client
|
||||
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s.%(msecs)03d %(levelname)s %(module)s - %(funcName)s: %(message)s',
|
||||
datefmt='%Y-%m-%d %H:%M:%S',
|
||||
format="%(asctime)s.%(msecs)03d %(levelname)s %(module)s - %(funcName)s: %(message)s",
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
)
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.INFO)
|
||||
@@ -26,12 +31,14 @@ def get_ipv4() -> str:
|
||||
result = subprocess.run(["curl", "-4", "ifconfig.me"], capture_output=True)
|
||||
return result.stdout.decode()
|
||||
|
||||
|
||||
def get_ipv6() -> str:
|
||||
result = subprocess.run(["curl", "-6", "ifconfig.me"], capture_output=True)
|
||||
return result.stdout.decode()
|
||||
|
||||
|
||||
def update_ipv4(hosted_zone_id: str, record: str, public_ipv4: str):
|
||||
client = boto3.client("route53")
|
||||
client: Route53Client = boto3.client("route53")
|
||||
try:
|
||||
logger.info("Calling upsert for ipv4.")
|
||||
client.change_resource_record_sets(
|
||||
@@ -45,21 +52,18 @@ def update_ipv4(hosted_zone_id: str, record: str, public_ipv4: str):
|
||||
"Name": f"{record}",
|
||||
"Type": "A",
|
||||
"TTL": 300,
|
||||
"ResourceRecords": [
|
||||
{
|
||||
"Value": public_ipv4
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
"ResourceRecords": [{"Value": public_ipv4}],
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
)
|
||||
logger.info(f"Successfully updated ipv4 for {record}")
|
||||
except Exception as e:
|
||||
logger.error(f"Error updating ipv4 for {record}.")
|
||||
raise e
|
||||
|
||||
|
||||
def update_ipv6(hosted_zone_id: str, record: str, public_ipv6: str):
|
||||
client = boto3.client("route53")
|
||||
try:
|
||||
@@ -75,21 +79,18 @@ def update_ipv6(hosted_zone_id: str, record: str, public_ipv6: str):
|
||||
"Name": f"{record}",
|
||||
"Type": "AAAA",
|
||||
"TTL": 300,
|
||||
"ResourceRecords": [
|
||||
{
|
||||
"Value": public_ipv6
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
"ResourceRecords": [{"Value": public_ipv6}],
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
)
|
||||
logger.info(f"Successfully updated ipv6 for {record}")
|
||||
except Exception as e:
|
||||
logger.error(f"Error updating ipv6 for {record}.")
|
||||
raise e
|
||||
|
||||
|
||||
def main():
|
||||
if not HOSTED_ZONE_ID:
|
||||
logger.error("HOSTED_ZONE_ID env var not found!")
|
||||
@@ -110,7 +111,11 @@ def main():
|
||||
logger.error("Public IPv4 not found.")
|
||||
exit(1)
|
||||
logger.info(f"Public IPv4 is {public_ipv4}")
|
||||
update_ipv4(hosted_zone_id=HOSTED_ZONE_ID, record=ROUTE53_RECORD, public_ipv4=public_ipv4)
|
||||
update_ipv4(
|
||||
hosted_zone_id=HOSTED_ZONE_ID,
|
||||
record=ROUTE53_RECORD,
|
||||
public_ipv4=public_ipv4,
|
||||
)
|
||||
|
||||
if SKIP_IPV6:
|
||||
logger.warning("Skipping IPv6")
|
||||
@@ -121,7 +126,12 @@ def main():
|
||||
logger.error("Public IPv6 not found.")
|
||||
exit(1)
|
||||
logger.info(f"Public IPv6 is {public_ipv6}")
|
||||
update_ipv6(hosted_zone_id=HOSTED_ZONE_ID, record=ROUTE53_RECORD, public_ipv6=public_ipv6)
|
||||
update_ipv6(
|
||||
hosted_zone_id=HOSTED_ZONE_ID,
|
||||
record=ROUTE53_RECORD,
|
||||
public_ipv6=public_ipv6,
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
5415
active/podman_ddns/uv.lock
generated
5415
active/podman_ddns/uv.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
# QMK Notes
|
||||
`# QMK Notes
|
||||
|
||||
## install
|
||||
|
||||
@@ -14,6 +14,12 @@ qmk compile -kb <keyboard> -km default
|
||||
|
||||
Make sure the udev rules are copied to your host machine if you're in a distrobox or toolbox.
|
||||
|
||||
```bash
|
||||
sudo curl -o /etc/udev/rules.d/50-qmk.rules https://raw.githubusercontent.com/qmk/qmk_firmware/refs/heads/master/util/udev/50-qmk.rules
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
```
|
||||
|
||||
## VIA or Keychron Launcher Support
|
||||
|
||||
In your rules.mk (at the closest level to your keymap) add:
|
||||
|
||||
Reference in New Issue
Block a user