Skip to content

Instantly share code, notes, and snippets.

CircuitPython Secrets

This are some notes around the use of secrets.py in CircuitPython.

Current Events

Today CP examples suggest a secrets.py files for storing passwords, SSIDs, keys, etc as a dictionary.

File: secrets.py

using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "[email protected]"
@andramalech
andramalech / scp-cheatsheet.md
Created January 2, 2022 13:28 — forked from dehamzah/scp-cheatsheet.md
SCP Cheatsheet

Basic Syntax

$ scp source_file_path destination_file_path

Uploading

Single file

ssh-cheatsheet

Bash SSH command cheatsheet

Connecting to Remote Host From Local Client

SSH

SSH into a remote server.

@andramalech
andramalech / WireGuard-site-to-site.md
Created February 13, 2022 05:01
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@andramalech
andramalech / install-proxmox-s3-snippet-storage.sh
Created February 20, 2022 12:01 — forked from bilalinamdar/install-proxmox-s3-snippet-storage.sh
This script will install an s3 snippet storage server for ProxMox (cicustom) using Samba and MinIO
#!/bin/bash
echo "Password for Samba User 'snippets':"
read -s smb_password_snippets
echo "Password for S3 User 'admin':"
read -s s3_password_admin
echo "Password for S3 User 'dev' (min-length: 8):"
read -s s3_password_dev
echo "Password for S3 User 'api' (min-length: 8):"
read -s s3_password_api
wget -O /usr/local/bin/minio https://dl.min.io/server/minio/release/linux-amd64/minio
@andramalech
andramalech / QEMU_ON_M1.md
Created February 22, 2022 22:11 — forked from citruz/QEMU_ON_M1.md
Create Ubuntu and Windows VMs with QEMU on Apple Silicon

Running Linux and Windows on M1 with QEMU

30.11.2020: Updated with the new patchseries and instructions for Windows

02.12.2020: Added tweaks

08.12.2020: Updated with patchseries v4

31.01.2020: Updated with patchseries v6

@andramalech
andramalech / cloud-init.yaml
Created August 4, 2022 23:15 — forked from pmbaumgartner/cloud-init.yaml
Multipass & Docker Setup
#cloud-config
package_upgrade: true
ssh_authorized_keys:
- <your key>
packages:
- apt-transport-https
- ca-certificates
- curl
I woke up, started my laptop, and I got laptop poweroff just after booting. My Carbon X1 (7th generation) is only 2 months
old. Not really best way to start a day.
Solution:
1. Power off your lap top
2. Find this little reset button on the bottom of your laptop
3. Hold for five seconds let go; plug laptop back
4. Hit power button