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
|
# 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)
|
- [VLAN Setup with nmcli](#vlan-setup-with-nmcli)
|
||||||
- [ZRAM](#zram)
|
- [ZRAM](#zram)
|
||||||
- [Libraries](#libraries)
|
- [Libraries](#libraries)
|
||||||
- [DNF](#dnf)
|
- [Common Libraries](#common-libraries)
|
||||||
- [Apps](#apps)
|
- [Apps](#apps)
|
||||||
- [DNF](#dnf-1)
|
- [Common CLI Apps](#common-cli-apps)
|
||||||
|
- [Ungoogled Chromium](#ungoogled-chromium)
|
||||||
- [VSCode](#vscode)
|
- [VSCode](#vscode)
|
||||||
- [Virtualization](#virtualization)
|
- [Virtualization](#virtualization)
|
||||||
- [NVM](#nvm)
|
- [NVM](#nvm)
|
||||||
@@ -179,7 +180,7 @@ zramctl --size 4G /dev/zram0
|
|||||||
|
|
||||||
## Libraries
|
## Libraries
|
||||||
|
|
||||||
### DNF
|
### Common Libraries
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dnf install -y \
|
sudo dnf install -y \
|
||||||
@@ -200,7 +201,7 @@ libgle-devel
|
|||||||
|
|
||||||
## Apps
|
## Apps
|
||||||
|
|
||||||
### DNF
|
### Common CLI Apps
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo dnf install \
|
sudo dnf install \
|
||||||
@@ -254,6 +255,15 @@ sudo dnf install \
|
|||||||
p7zip
|
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
|
### VSCode
|
||||||
|
|
||||||
<https://code.visualstudio.com/docs/setup/linux#_rhel-fedora-and-centos-based-distributions>
|
<https://code.visualstudio.com/docs/setup/linux#_rhel-fedora-and-centos-based-distributions>
|
||||||
|
|||||||
@@ -6,5 +6,6 @@ readme = "README.md"
|
|||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"boto3>=1.37.30",
|
"boto3>=1.37.30",
|
||||||
|
"boto3-stubs[all]>=1.38.23",
|
||||||
"pytest>=8.3.5",
|
"pytest>=8.3.5",
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,15 +3,20 @@ export HOSTED_ZONE_ID=<aws hosted zone ID>
|
|||||||
export ROUTE53_RECORD=something.mydomain.com
|
export ROUTE53_RECORD=something.mydomain.com
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import boto3
|
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
|
import boto3
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from mypy_boto3_route53 import Route53Client
|
||||||
|
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level=logging.INFO,
|
level=logging.INFO,
|
||||||
format='%(asctime)s.%(msecs)03d %(levelname)s %(module)s - %(funcName)s: %(message)s',
|
format="%(asctime)s.%(msecs)03d %(levelname)s %(module)s - %(funcName)s: %(message)s",
|
||||||
datefmt='%Y-%m-%d %H:%M:%S',
|
datefmt="%Y-%m-%d %H:%M:%S",
|
||||||
)
|
)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
logger.setLevel(logging.INFO)
|
logger.setLevel(logging.INFO)
|
||||||
@@ -26,12 +31,14 @@ def get_ipv4() -> str:
|
|||||||
result = subprocess.run(["curl", "-4", "ifconfig.me"], capture_output=True)
|
result = subprocess.run(["curl", "-4", "ifconfig.me"], capture_output=True)
|
||||||
return result.stdout.decode()
|
return result.stdout.decode()
|
||||||
|
|
||||||
|
|
||||||
def get_ipv6() -> str:
|
def get_ipv6() -> str:
|
||||||
result = subprocess.run(["curl", "-6", "ifconfig.me"], capture_output=True)
|
result = subprocess.run(["curl", "-6", "ifconfig.me"], capture_output=True)
|
||||||
return result.stdout.decode()
|
return result.stdout.decode()
|
||||||
|
|
||||||
|
|
||||||
def update_ipv4(hosted_zone_id: str, record: str, public_ipv4: str):
|
def update_ipv4(hosted_zone_id: str, record: str, public_ipv4: str):
|
||||||
client = boto3.client("route53")
|
client: Route53Client = boto3.client("route53")
|
||||||
try:
|
try:
|
||||||
logger.info("Calling upsert for ipv4.")
|
logger.info("Calling upsert for ipv4.")
|
||||||
client.change_resource_record_sets(
|
client.change_resource_record_sets(
|
||||||
@@ -45,21 +52,18 @@ def update_ipv4(hosted_zone_id: str, record: str, public_ipv4: str):
|
|||||||
"Name": f"{record}",
|
"Name": f"{record}",
|
||||||
"Type": "A",
|
"Type": "A",
|
||||||
"TTL": 300,
|
"TTL": 300,
|
||||||
"ResourceRecords": [
|
"ResourceRecords": [{"Value": public_ipv4}],
|
||||||
{
|
},
|
||||||
"Value": public_ipv4
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
logger.info(f"Successfully updated ipv4 for {record}")
|
logger.info(f"Successfully updated ipv4 for {record}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error updating ipv4 for {record}.")
|
logger.error(f"Error updating ipv4 for {record}.")
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
||||||
def update_ipv6(hosted_zone_id: str, record: str, public_ipv6: str):
|
def update_ipv6(hosted_zone_id: str, record: str, public_ipv6: str):
|
||||||
client = boto3.client("route53")
|
client = boto3.client("route53")
|
||||||
try:
|
try:
|
||||||
@@ -75,21 +79,18 @@ def update_ipv6(hosted_zone_id: str, record: str, public_ipv6: str):
|
|||||||
"Name": f"{record}",
|
"Name": f"{record}",
|
||||||
"Type": "AAAA",
|
"Type": "AAAA",
|
||||||
"TTL": 300,
|
"TTL": 300,
|
||||||
"ResourceRecords": [
|
"ResourceRecords": [{"Value": public_ipv6}],
|
||||||
{
|
},
|
||||||
"Value": public_ipv6
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
logger.info(f"Successfully updated ipv6 for {record}")
|
logger.info(f"Successfully updated ipv6 for {record}")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error updating ipv6 for {record}.")
|
logger.error(f"Error updating ipv6 for {record}.")
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
if not HOSTED_ZONE_ID:
|
if not HOSTED_ZONE_ID:
|
||||||
logger.error("HOSTED_ZONE_ID env var not found!")
|
logger.error("HOSTED_ZONE_ID env var not found!")
|
||||||
@@ -110,7 +111,11 @@ def main():
|
|||||||
logger.error("Public IPv4 not found.")
|
logger.error("Public IPv4 not found.")
|
||||||
exit(1)
|
exit(1)
|
||||||
logger.info(f"Public IPv4 is {public_ipv4}")
|
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:
|
if SKIP_IPV6:
|
||||||
logger.warning("Skipping IPv6")
|
logger.warning("Skipping IPv6")
|
||||||
@@ -121,7 +126,12 @@ def main():
|
|||||||
logger.error("Public IPv6 not found.")
|
logger.error("Public IPv6 not found.")
|
||||||
exit(1)
|
exit(1)
|
||||||
logger.info(f"Public IPv6 is {public_ipv6}")
|
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__":
|
if __name__ == "__main__":
|
||||||
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
|
## 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.
|
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
|
## VIA or Keychron Launcher Support
|
||||||
|
|
||||||
In your rules.mk (at the closest level to your keymap) add:
|
In your rules.mk (at the closest level to your keymap) add:
|
||||||
|
|||||||
Reference in New Issue
Block a user