All honour goes to http://www.blaicher.com/2013/01/accessing-an-encrypted-full-disc-image-lukslvm/
So I typically use a full disc encryption with LVM over LUKS. So assume you have got an image from your harddisk via
dd if=/dev/sda of=image.img
All honour goes to http://www.blaicher.com/2013/01/accessing-an-encrypted-full-disc-image-lukslvm/
So I typically use a full disc encryption with LVM over LUKS. So assume you have got an image from your harddisk via
dd if=/dev/sda of=image.img
| //For digital pins | |
| #define DIGITAL_PIN_COUNT 12 | |
| char *digital_pins[] = {"D0", "D1", "D2" , "D3" , "D4" , "D5", "D6", "D7", "D8", "D9", "D10", "D11", "D12", "D13"}; | |
| int *valid_digital_pins[] = {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}; | |
| //////////////////////// | |
| //For Aanlogue pin | |
| #define ANALOG_PIN_COUNT 6 |
| import shlex | |
| import subprocess | |
| def execute_command(command: str, path=None): | |
| command_splited = shlex.split(command) | |
| if path is None: | |
| process = subprocess.Popen(command_splited) | |
| else: | |
| process = subprocess.Popen(command_splited, cwd=path) | |
| process.communicate() |
| ################Executing Command################ | |
| def execution_timer(time_out, cmd_process): | |
| kill = lambda process: process.kill() | |
| my_timer = Timer(time_out, kill, [cmd_process]) | |
| try: | |
| my_timer.start() | |
| stdout, stderr = cmd_process.communicate() | |
| finally: |
| #Source code copied from https://github.com/andrisdru/image2stl | |
| #pip3 install numpy-stl pillow argparse | |
| import argparse | |
| import numpy as np | |
| from stl import mesh | |
| from PIL import Image |
| import os | |
| import shutil | |
| import sys | |
| import traceback | |
| import uuid | |
| import time | |
| import cv2 | |
| import numpy as np | |
| from fpdf import FPDF | |
| from pdf2image import convert_from_path, pdfinfo_from_path |
| #include <Arduino.h> | |
| #include <Ticker.h> | |
| #define ULTRASONIC_PIN_INPUT D1 | |
| #define ULTRASONIC_PIN_OUTPUT D4 | |
| import logging | |
| # Copied from https://stackoverflow.com/a/56944256 | |
| class LogFormat(logging.Formatter): | |
| BLUE = {"color": "blue"} | |
| GREEN = {"color": "green"} | |
| GREY = {"color": "grey"} | |
| YELLOW = {"color": "yellow"} | |
| RED = {"color": "red"} |
Source : https://cyberblogspot.com/how-to-save-and-restore-esp8266-and-esp32-firmware/
Gathering the Board’s Info esptool.py flash_id
Save 1MByte or 8Mbit Flash esptool.py --baud 115200 --port COM8 read_flash 0x0 0x100000 fw-backup-1M.bin
Save 4MByte or 32Mbit Flash
| #!/bin/bash | |
| #Detect the name of the display in use | |
| display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" | |
| #Detect the user using such display | |
| user=$(who | grep '('$display')' | awk '{print $1}' | head -n 1) | |
| #Detect the id of the user | |
| uid=$(id -u $user) | |