Skip to content

Instantly share code, notes, and snippets.

View kareiva's full-sized avatar

Simonas kareiva

  • Red Hat
  • Vilnius
View GitHub Profile
@kareiva
kareiva / compose.yml
Created June 9, 2026 13:06
A Minimal Wordpress Podman-Compose
---
volumes:
db_data:
services:
wordpress:
image: wordpress:latest
ports:
- 8081:80
environment:
- WORDPRESS_DB_HOST=db
@kareiva
kareiva / execution-environment.yml
Created May 27, 2026 17:48
A cowsay-enabled AAP Execution Environment for AU374
---
version: 3
images:
base_image:
name: aap.lab.example.com/ee-minimal-rhel8:latest
dependencies:
galaxy: requirements.yml
python: requirements.txt
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 32 // OLED display height, in pixels
#define SCREEN_ADDRESS 0x3C ///< See datasheet for Address; 0x3D for 128x64, 0x3C for 128x32
@kareiva
kareiva / podman-setup.sh
Last active December 2, 2025 18:41
FreeBSD Podman Setup
#!/bin/sh
pkg install -y sudo podman
sysrc pf_enable=YES
sysrc linux_enable=YES
cp /usr/local/etc/containers/pf.conf.sample /etc/pf.conf
IFACE=$( netstat -rn | grep default | awk '{print $4}' )
sed -i '' -e "s/ix0/$IFACE/g" /etc/pf.conf
#!/bin/bash
myenv=""
if [ ! -z $container ]; then
myenv="${myenv}In a $container container. "
else
myenv="${myenv}On a $(uname) server. "
fi
@kareiva
kareiva / gameoflife.c
Last active May 8, 2024 13:35
Quick and dirty implementation of Conway's Game of Life in C
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
int main (void)
{
@kareiva
kareiva / gameoflife.sh
Last active May 8, 2024 06:58
Primitive implementation of Conway's Game of Life in Bash
#!/bin/bash
#
# Problematic life by Simonas@irc.data.lt
# Studying of bash performance
# v0.2.0
term_width=$(($(tput cols) ))
term_height=$(($(tput lines) * 2 - 2))
full_square='█'
upper_square='▀'
@kareiva
kareiva / moontrack.py
Created February 4, 2024 19:27
Simple Moon tracker for hamlib rotator control (rotctld)
import re
import time
import ephem
import telnetlib
# put your rotctld address and port here
rot_addr = "192.168.1.124"
rot_port = "4533"
home_lat = "54.687157"
@kareiva
kareiva / Dockerfile
Created October 24, 2023 15:39
Dockerfile to build WSJT-Z version 1.22 inside an Ubuntu container
FROM ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC
ENV WSJTZ_VERSION="wsjtz-2.5.4-1.22.zip"
RUN apt update && apt install -y cmake asciidoc g++ gfortran automake libtool libboost-dev \
libboost-log-dev libfftw3-dev libusb-1.0-0 libusb-1.0-0-dev \
qtbase5-dev libqt5serialport5-dev libqt5multimedia5 \
qtmultimedia5-dev qttools5-dev-tools qttools5-dev git
#xxxxxxxxxxxxx IT 2 kursas 1 grupë 2013 m. ruduo
#/bin/bash
hex=16
echo "Pasirinkite veiksma:"
echo "1. Sesioliktainis_sk = Desimtainis_sk"
echo "2. Desimtainis_sk = Sesioliktainis_sk"
echo "3. Baigti darba"
read number
if [ -z $number ]