Skip to content

Instantly share code, notes, and snippets.

@andramalech
andramalech / preparing_data_for_nextion.js
Created July 4, 2023 11:09 — forked from oriolrius/preparing_data_for_nextion.js
This is the code that I have in the node which prepares data before it is sent to the Nextion serial protocol.
var str = msg.payload;
var buf = [];
for (var i=0, l = str.length; i < l; i++) {
var ascii = str.charCodeAt(i);
buf.push(ascii);
}
buf.push(255);
buf.push(255);
buf.push(255);
@andramalech
andramalech / LinuxCNC-Ethercat.md
Created April 30, 2023 21:31 — forked from Bouni/LinuxCNC-Ethercat.md
Linux CNC + EtherCat + RPi 4 Setup

The folowing is a writup from Hakans forum post!

RPi Setup

  1. Download & Write image to SD card: www.linuxcnc.org/iso/linuxcnc-2.8.1-pi4.zip
  2. Configure Wifi via wpa_supplicant.conf
  3. Put SD card into RPi and verify that RT-PREEMT Kernel is running: uname -a
  4. Update everything and reboot: sudo apt update &amp;&amp; sudo apt upgrade &amp;&amp; sudo reboot
@andramalech
andramalech / README.md
Created November 25, 2022 15:18 — forked from tomdaley92/README.md
Proxmox - SPICE Client setup for MacOS

Proxmox - SPICE client setup for MacOS

  1. Install a working (and compiled) version of virt-viewer. You may view the homebrew package's upstream source on GitHub.

    brew tap jeffreywildman/homebrew-virt-manager
    brew install virt-viewer
  2. Once that's installed should be able make a call remote-viewer with a pve-spice.vv file downloaded from proxmox web interface

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
@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
adminer_container:
image: adminer:latest
environment:
ADMINER_DEFAULT_SERVER: thomasd_ignitionDev_db # Docker Compose db name
ADMINER_DESIGN: galkaev
ports:
- 21080:8080 # change port
@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 / 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 / WireGuard-site-to-site.md
Created February 13, 2022 05:01 — forked from insdavm/WireGuard-site-to-site.md
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

ssh-cheatsheet

Bash SSH command cheatsheet

Connecting to Remote Host From Local Client

SSH

SSH into a remote server.