Skip to content

Instantly share code, notes, and snippets.

@jwillmer
jwillmer / resize_partition.sh
Created March 20, 2024 13:41
Resize partition and add swap to Ubuntu
# disable swap
sudo swapoff -a
# check space
df -h
# check partitions
lsblk
# recreate partition
@jwillmer
jwillmer / Dockerfile
Created February 2, 2024 14:11
Install docker (compose) in Alpine with fixed version
ENV DOCKER_VERSION=24.0.7
ENV DOCKER_COMPOSE_VERSION=2.21.0
# Install tooling
RUN apk add --update --no-cache bash diffutils curl wget nano git openssh rsync envsubst grep gawk diffutils bind-tools
# Install docker
RUN curl -sSLf https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz | tar -xzvf - docker/docker && chmod +x docker/* && mv docker/* /bin
# Install docker compose
@jwillmer
jwillmer / Dockerfile
Created September 7, 2022 11:24
Create image without root user and folder access
FROM mcr.microsoft.com/dotnet/aspnet:6.0-bullseye-slim as base
RUN apt-get update \
&& apt-get install -y --no-install-recommends libcap2-bin \
&& rm -rf /var/lib/apt/lists/*
# Allow binding to port 80 and 443 for non root user
RUN setcap 'cap_net_bind_service=+ep' /usr/share/dotnet/dotnet
# Create maranics group and user
#include <SystemStatus.h> // Get VCC
#include <avr/sleep.h> // Sleep Modes
#include <avr/wdt.h> // Watchdog timer
// PIN Definition - Remember to change pinMode(PIN) in setup when changing pin definitions
#define LED_PIN 0
#define SOLAR_PIN 7
#define RX_PIN 3
#define TX_PIN 4
@jwillmer
jwillmer / LED_pulse.ino
Last active April 28, 2022 08:23
Pulse a LED
// Source: https://www.sparkfun.com/tutorials/329
// To understand the code you need to look at the sinus curve in the toturial.
const int LED = 0;
void setup() {
}
void loop()
V 2.8.6.2
- Updated GroupTalk authentication
V 2.8.6.1
- Updated GroupTalk API key
V 2.8.5.0
@jwillmer
jwillmer / utc_offset_list.txt
Created March 16, 2014 19:57
List of UTC offsets
Time offset Example time(ISO 8601 notation) Example locations
=========== =============================== =================
UTC−12:00 2014-03-14T20:19:12-12:00 Baker Island, Howland Island (both uninhabited)
UTC−11:00 2014-03-14T21:19:12-11:00 American Samoa, Niue
UTC−10:00 2014-03-14T22:19:12-10:00 United States (Hawaii)
UTC−09:30 2014-03-14T22:49:12-09:30 Marquesas Islands
UTC−09:00 2014-03-14T23:19:12-09:00 Gambier Islands
UTC−07:00 2014-03-15T01:19:12-07:00 Canada (northeastern British Columbia), Mexico (Sonora), United States (Arizona)
UTC−06:00 2014-03-15T02:19:12-06:00 Canada (almost all of Saskatchewan), Costa Rica, El Salvador, Ecuador (Galápagos Islands), Guatemala, Honduras, Mexico (most), Nicaragua