Skip to content

Instantly share code, notes, and snippets.

View kravemir's full-sized avatar

Miroslav Kravec kravemir

View GitHub Profile
@kravemir
kravemir / readme.md
Created April 23, 2022 11:55 — forked from eddiewebb/readme.md
Hugo JS Searching with Fuse.js

NixOS NAS drives setup

My guide for setup of NixOS with LVM on multiple device LUKS on mdadm:

  1. mdadm for RAID 1:

    • for system and data physical volumes,
    • you can use RAID5 or other levels, based on needs,
  2. LUKS for device encryption:

package main
import (
"bytes"
"encoding/base64"
"fmt"
"io/ioutil"
"log"
"os"
#!/usr/bin/env bash
set -e
if [ "$#" -ne 1 ]
then
echo "Usage: convert-video.sh input-video"
exit 1
fi
GALLIUM_HUD=.w50cpu,.w50.c75fps,.w50GPU-load+GPU-shaders-busy glxgears
@kravemir
kravemir / .editorconfig
Last active October 7, 2023 05:33
GNOME 3 configuration
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
* {
box-sizing: border-box;
}

This is my response to an email asking about Domain-Driven Design in golang project.

Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.

That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.

Conclusions could be very different, if there was a different project, team or a story-teller.

Short story

@kravemir
kravemir / mikrotik-setup-scheduled-domain-blocking
Last active December 29, 2022 05:50
MikroTik scheduled domain blocking
########################################
# remove old "Block Web" configuration #
########################################
/system scheduler remove [/system scheduler find name~"Block Web*"]
/system script remove [/system script find name~"Block Web*"]
/ip firewall filter remove [/ip firewall filter find comment~"Block Web*"]
/ip firewall address-list remove [/ip firewall address-list find list="blocked_web"]
# EditorConfig is awesome: http://EditorConfig.org
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true