Skip to content

Instantly share code, notes, and snippets.

View kakoni's full-sized avatar

Karri Niemelä kakoni

View GitHub Profile
# Contributing to a Rails 8 Application
This document outlines the conventions and best practices for contributing to this Rails 8 application. Adhering to these rules ensures consistency, testability, and a streamlined development process for everyone involved.
## Quick Rules (Read Me First)
- **Task Management**: Before starting, review and update the `CURRENT_TASK.md` file with your current objective. Delete the file when your task is complete.
- **Quality Gates**: Always run the quality suite before committing: `bundle exec rubocop && bundle exec rails test`.
- **Development Environment**: Use `bin/dev` to start all necessary development services, including the Rails server and any background job processors or asset watchers defined in `Procfile.dev`.
- **Logging**: Utilize `Rails.logger.info!`/`debug!`/`warn!`/`error!` for logging. Avoid using `puts` or `p` in application code. Per-request logging should be sufficient for most cases; avoid excessive logging in loops.
- **Architecture**: Prefer "fat mod

Basic Ubuntu Server Hardening Steps

This checklist covers essential baseline security measures for a new Ubuntu VPS.

1. Update and Upgrade the System

Ensure all packages are up-to-date to patch known vulnerabilities.

sudo apt update
Eve MB31 Prismatic 314Ah. 91.95e
https://eu.nkon.nl/rechargeable/lifepo4/prismatisch/eve-mb31-prismatic-314ah-lifepo4-3-2v-a-grade.html
@kakoni
kakoni / gist:a087698f010e0eec1dec21e245f74ed6
Created August 9, 2023 10:17
Reset Apache Superset user password using docker
You can do this via docker compose
docker compose -f docker-compose-non-dev.yml exec superset flask fab reset-password
or
docker exec -it superset_app flask fab reset-password
@kakoni
kakoni / Dockerfile
Created February 3, 2022 09:26
Autotune docker
FROM node:12-alpine
RUN apk add git jq bash sudo curl coreutils
WORKDIR /app
RUN git clone -b dev git://github.com/openaps/oref0.git .
RUN npm install
RUN cd bin && ./create_symlinks.sh
ENV PATH="/app/bin:$PATH"
@kakoni
kakoni / elastic.nomad
Created November 19, 2021 15:21
Elasticsearch nomad cluster
job "elasticsearch" {
datacenters = ["dc1"]
type = "service"
update {
max_parallel = 1
min_healthy_time = "10s"
healthy_deadline = "3m"
progress_deadline = "10m"
auto_revert = false
@kakoni
kakoni / gist:4ba7a883ec5e8919e20e6f53bab4ea69
Last active August 12, 2020 11:09
Satamia saaristomerelle
Bodö
Jungfruskär
Örö
Kökar (Sandviken)
Kumlinge Glada laxen
Kastelholma
Sottunga
Lappo
Rödhamn
# Motors
GoldenMotor BLDC. https://www.goldenmotor.com/frame-bldcmotor.htm
Motenergy
# Mounts
https://www.kit-elec-shop.com/gb/197-engine-mounts
https://www.electro-mobile.se/produkt/motorstativ/
Daly BMS
https://daly.aliexpress.com
varicore cell
@kakoni
kakoni / gist:e71e711550e91bc596b0eb484bacbd89
Created February 28, 2020 08:03
Terveydenhuolto. ATK. Historia
https://trepo.tuni.fi/bitstream/handle/10024/93676/gradu01230.pdf?sequence=1&isAllowed=y