---
title: "Maciek Sitkowski (@sitek94) | Hashnode"
description: "mostly frontend. Read the latest articles by Maciek Sitkowski on Hashnode."
url: "https://hashnode.com/@sitek94"
---

@sitek94

# Maciek Sitkowski

@sitek94 · Poland · Joined January 2022

mostly frontend

[Website](https://macieksitkowski.com/)

### [How to split string to strings of equal length in JavaScript?](https://blog.macieksitkowski.com/how-to-split-string-to-strings-of-equal-length-in-javascript?utm_source=hashnode&utm_medium=feed)

Solution 'abcdabcdabcdabcdabcd'.match(/.{1,4}/g) // \['abcd', 'abcd', 'abcd', 'abcd', 'abcd'\] Here's original StackOverflow answer. Context In today's Advent of Code challenge, I had to simulate drawing pixels on 40x6 CRT screen. First I computed li...

1 min read · [blog.macieksitkowski.com](https://blog.macieksitkowski.com/how-to-split-string-to-strings-of-equal-length-in-javascript?utm_source=hashnode&utm_medium=feed)

[Dec 10, 2022](https://hashnode.com/posts/how-to-split-string-to-strings-of-equal-length-in-javascript/63945d1b21a257bd0d9f5a9f)

### [Advent of Code - preparing input data](https://blog.macieksitkowski.com/advent-of-code-preparing-input-data?utm_source=hashnode&utm_medium=feed)

When solving Advent of Code puzzles, sometimes you will come across an input data, that consist of two parts: configuration and instructions: \[S\] \[C\] \[Z\] \[F\] \[J\] \[P\] \[T\] \[N\] \[G\] \[H\] \[G\] \[Q\] \[G\] \[D\] ...

2 min read · [blog.macieksitkowski.com](https://blog.macieksitkowski.com/advent-of-code-preparing-input-data?utm_source=hashnode&utm_medium=feed)

[Dec 5, 2022](https://hashnode.com/posts/advent-of-code-preparing-input-data/638e3d19ff3bc097c2bda97c)

### [Improve your problem solving skills with Advent of Code](https://blog.macieksitkowski.com/improve-your-problem-solving-skills-with-advent-of-code?utm_source=hashnode&utm_medium=feed)

It's December already, so it's time for another edition of Advent of Code. Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like. I usu...

1 min read · [blog.macieksitkowski.com](https://blog.macieksitkowski.com/improve-your-problem-solving-skills-with-advent-of-code?utm_source=hashnode&utm_medium=feed)

[Dec 1, 2022](https://hashnode.com/posts/improve-your-problem-solving-skills-with-advent-of-code/63890f5ec7b242c79c97f03c)

### [How to add overlay color to <img />](https://blog.macieksitkowski.com/how-to-add-overlay-color-to-img?utm_source=hashnode&utm_medium=feed)

If you want to change the color of a remote image, that you display like this: <img alt="freeCodeCamp logo" src="https://unpkg.com/simple-icons@7.20.0/icons/freecodecamp.svg" /> You can use CSS filter property. It offers a variety of different co...

1 min read · [blog.macieksitkowski.com](https://blog.macieksitkowski.com/how-to-add-overlay-color-to-img?utm_source=hashnode&utm_medium=feed)

[Nov 26, 2022](https://hashnode.com/posts/how-to-add-overlay-color-to-img/6381f1da0b2d08f84c44ea94)

### [How to query image dimensions from Sanity?](https://blog.macieksitkowski.com/how-to-query-image-dimensions-from-sanity?utm_source=hashnode&utm_medium=feed)

I haven't used Sanity before, so it took me a while to figure out, how to get photos dimensions using GROQ queries. Here's how I've done it: GROQ query export const query = groq\` \*\[\_type == "photo"\] { image{ "dimensions": asset->metadata...

1 min read · [blog.macieksitkowski.com](https://blog.macieksitkowski.com/how-to-query-image-dimensions-from-sanity?utm_source=hashnode&utm_medium=feed)

[Nov 25, 2022](https://hashnode.com/posts/how-to-query-image-dimensions-from-sanity/6380a05a02ed71f5750f0c56)
