Skip to content

Instantly share code, notes, and snippets.

View albertmoravec's full-sized avatar

Albert Moravec albertmoravec

View GitHub Profile
@albertmoravec
albertmoravec / Docker.md
Last active April 29, 2022 22:35
Proxmox Hetzner setup
apt-get update
apt-get install ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update
apt-get install docker-ce docker-ce-cli containerd.io
curl -L "https://github.com/docker/compose/releases/download/v1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
@albertmoravec
albertmoravec / dev.exs
Last active August 20, 2021 11:04
Phoenix Vue 3
watchers: [
node: [
"node_modules/@vue/cli-service/bin/vue-cli-service.js",
"serve",
cd: Path.expand("../assets/vue", __DIR__)
]
]
@albertmoravec
albertmoravec / adc.rs
Last active January 26, 2021 20:35
ADC DMA multiple channels
#![no_std]
#![no_main]
#[macro_use]
mod utilities;
use stm32f4xx_hal as hal;
use cortex_m::singleton;
use hal::{
@albertmoravec
albertmoravec / libftdi-windows-vcpkg.md
Last active October 4, 2020 20:46
How to install libftdi and libus libraries on Windows using vcpkg

1. Install vcpkg

> git clone https://github.com/microsoft/vcpkg
> .\vcpkg\bootstrap-vcpkg.bat
> .\vcpkg\vcpkg integrate install

2. Install libftdi and libusb (static - likely what you want)

> vcpkg install libftdi1:x64-windows-static-md libusb:x64-windows-static-md
#!/bin/bash
if [ "$EUID" -ne 0 ]; then
echo "Please run this script as sudo"
exit 1
fi
echo "Installing wireguard packages"
sudo curl -Lo /etc/yum.repos.d/wireguard.repo https://copr.fedorainfracloud.org/coprs/jdoss/wireguard/repo/epel-7/jdoss-wireguard-epel-7.repo
sudo yum -y install epel-release
@albertmoravec
albertmoravec / docker_install.sh
Created August 2, 2019 19:28
Docker installation on Ubuntu 18.04
#!/bin/sh
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -