The Kakkonen Promotion Round Group A in Finland is set to witness some thrilling matches tomorrow, promising an exciting day for football enthusiasts. As the stakes are high, teams are gearing up to secure their spot in the higher league, making this round a pivotal moment in the Finnish football calendar. With expert betting predictions at hand, let's delve into the anticipated matches and explore what could unfold on the pitch.
Each team in Group A has been preparing rigorously for this crucial round. Coaches have been fine-tuning strategies, focusing on both offensive and defensive plays to outmaneuver their opponents. The key to success lies in exploiting the weaknesses of the opposition while reinforcing their own defensive lines.
Betting experts have analyzed past performances and current form to provide insights into potential outcomes. Here are some expert predictions for tomorrow's matches:
This match-up is one of the most anticipated fixtures of the round. Both teams have shown impressive form leading up to this game, making it a must-watch for fans.
This fixture promises a strategic battle between two well-rounded teams. With both sides aiming for victory, it will be interesting to see how tactics unfold on the field.
Betting odds provide insights into the likelihood of various outcomes. Understanding how these odds are calculated can help bettors make informed decisions.
To maximize potential returns, consider these strategies when placing bets on tomorrow's matches:
To fully enjoy tomorrow's matches, consider these tips for an enhanced viewing experience:
If you're unable to watch matches live at home or in public venues, explore streaming options available online or through sports networks offering live coverage of Kakkonen Promotion Round Group A matches.
A look at past performances can offer valuable insights into how teams might perform tomorrow:
Sports statistics provide a quantitative basis for predictions, helping bettors make data-driven decisions:
Injuries can dramatically influence match outcomes by affecting team dynamics and individual performances:
To manage risks associated with injuries during betting:
Different analysts bring unique perspectives based on their expertise and focus areas:
<ul michael-kruckenberg/michael-kruckenberg.github.io/_posts/2020-05-31-cyber-security.md --- layout: post title: "Cyber Security" date: "2020-05-31" tags: - Security --- I want my applications that run code that I don't write or trust (such as user uploaded files) execute inside a sandbox so that if something goes wrong I don't lose my data. For this I use [Firejail](https://firejail.wordpress.com/) which creates an isolated environment using Linux namespaces. This is really simple but also very powerful. Here is my configuration file: {% highlight bash %} # /etc/firejail/myapp.profile # Use network namespace net # Use pid namespace private # Only allow access via X11 socket x11 # Don't allow binding nofork # Don't allow DNS lookups noprofile # No network access nologin # No setuid binaries nosuid # No tmpfs norootfs # No access outside home directory private-dev private-tmp private-ro-bind=/home/user # Restrict filesystem access (only allow some directories) mount-ro-bind=/bin:/usr/bin:/lib:/lib64:/usr/lib:/usr/lib64 mount-ro-bind=/etc/myapp/ mount-ro-bind=/home/user/myapp/ # Restrict which processes are allowed inside this namespace (only allow myapp) whitelist /usr/bin/myapp # Don't allow any other processes inside this namespace except those started by myapp default deny* {% endhighlight %} And here is how I use it: {% highlight bash %} firejail --profile=/etc/firejail/myapp.profile /usr/bin/myapp --config=/home/user/myapp/config.yml --upload=/home/user/myapp/uploads --output=/home/user/myapp/output/ {% endhighlight %} And that's it! My application runs inside an isolated environment where it cannot modify any data outside its directory tree. It also cannot modify any system binaries such as `/bin/sh` or `/bin/ls`. Note that there are still some things you should take care about: * Make sure that `myapp` does not spawn any other process than what is allowed by `whitelist`. * Make sure that `myapp` does not modify any files inside `/etc/myapp` because then they would affect all instances. * Make sure that `/home/user` cannot be mounted from another filesystem (e.g., shared drive). You can read more about security implications [here](https://wiki.archlinux.org/index.php/Firejail). # michael-kruckenberg.github.io# michael-kruckenberg.github.io Source code of my personal website. ## Build & Run Locally 1) Install [Jekyll](https://jekyllrb.com/docs/installation/) 2) Install plugins: bundle install --path vendor/bundle --binstubs vendor/bundle/bin/ 3) Run locally: bundle exec jekyll serve --livereload --host=0.0.0.0 ## Build & Deploy 1) Install [Hugo](https://gohugo.io/getting-started/installing/) 2) Build site: hugo -d public --minify --cleanDestinationDir 3) Push `public` folder onto GitHub Pages. michael-kruckenberg/michael-kruckenberg.github.io/_posts/2020-03-09-golang-reflection.md --- layout: post title: "Golang Reflection" date: "2020-03-09" tags: - Golang - Reflection --- Recently I wanted my Go application interact with data coming from different sources (such as Kafka or HTTP). The data format was consistent but I didn't want to have different types depending on where it came from. I also wanted my application code not depend on any library so I could easily switch between different sources without having dependencies. To achieve this I used Go reflection which allows me inspecting types at runtime. In Go reflection you use `reflect.Value` which represents any value at runtime. ### Example Suppose we have this struct: go type User struct { Name string `json:"name"` Age int `json:"age"` } And we want our application handle input data as generic `map[string]interface{}`: go func main() { data := map[string]interface{}{ "name": "John", "age": "42", } user := User{} err := setStruct(&user, reflect.ValueOf(data)) if err != nil { panic(err) } fmt.Println(user.Name) fmt.Println(user.Age) } We want `setStruct` function take generic data (`map[string]interface{}`) as input. But we also want it fill out our specific struct (`User`) which means we need some way of matching keys in map with struct fields. This is where reflection comes into play. go func setStruct(dest interface{}, src reflect.Value) error { d := reflect.ValueOf(dest).Elem() s := src.Convert(reflect.TypeOf(map[string]interface{}{})) for i := 0; i != s.NumField(); i++ { field := d.Field(i) fieldName := field.Type().Field(i).Name if v := s.MapIndex(reflect.ValueOf(fieldName)); v.IsValid() { if field.CanSet() { field.Set(v.Convert(field.Type())) } } } return nil } We start by getting our destination struct (`User`) as `reflect.Value`. Then we convert our source map into type `map[string]interface{}` because we need `MapIndex` method which is only available if we use this type. After that we iterate over each field in destination struct (`User`) using `NumField`. We get each field name using `Field(i).Name`. Now we check if our source map has key with same name as destination field name. If so then we try setting its value into destination field using `field.Set`. We need `v.Convert(field.Type())` because otherwise Go complains about mismatched types (e.g., `"42"` vs `42`). Finally we return nil if everything went ok. ### Conclusion Go reflection can be really useful when you want your code work with generic types such as JSON data coming from different sources. It allows you inspecting types at runtime without having static dependencies between modules. If you want more details about Go reflection I recommend reading [this article](https://blog.golang.org/laws-of-reflection). @import url('https://fonts.googleapis.com/css?family=Open+Sans:400'); body { font-family: 'Open Sans', sans-serif; } .content { max-width: $content-width; } .content .post h1, .content .post h2, .content .post h3, .content .post h4, .content .post h5, .content .post h6 { font-weight: normal; } .content .post p { text-align: justify; } .content .post blockquote { margin-left: $indent; padding-left: $indent; border-left: solid $blockquote-border-width $blockquote-border-color; } .content .post pre code { padding-left: $indent; } .content .post ul li::before, .content .post ol li::before { margin-right: $indent; } footer { margin-top: $indent * 4; } footer nav ul li::before { margin-right: $indent / 4; } footer nav ul li:first-child::before { content: none; }@import url('https://fonts.googleapis.com/css?family=Inconsolata'); pre code, code.highlighter-rouge { font-family: 'Inconsolata', monospace; }michael-kruckenberg/michael-kruckenberg.github.io/_posts/2020-01-22-hugo-vs-jekyll.md --- layout: post title: "Hugo vs Jekyll" date: "2020-01-22" tags: - Hugo --- I've been using Jekyll since I started blogging back in college days but recently I've started playing around with Hugo which seems like quite promising static site generator. ## Jekyll vs Hugo Comparison I'll compare Jekyll with Hugo based on following categories: * Installation & Dependencies (including build time) * Themes & Plugins (including build time) * Markdown Support (including build time) ### Installation & Dependencies (including build time) Jekyll needs Ruby installed which isn't always trivial especially when using Windows. Also Jekyll requires RubyGems installed which is required by default but not always desired. Finally Jekyll requires plugins installed which adds additional dependencies including build time. Hugo only needs Go installed which is quite simple because you only need download binary once per platform (but Go comes pre-installed if you use Linux). Hugo does not require additional dependencies nor plugins so there aren't any extra build time overheads. Winner **Hugo** ### Themes & Plugins (including build time) Jekyll themes come as git repositories which contain full project structure including config files etc. This makes them easy to install using gemfiles but also makes them quite heavy because you get lots of unnecessary stuff included. Hugo themes come as zip files which contain only theme files (no config files etc). This makes them lighter than Jekyll themes but