<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mikołaj Przybysz on Medium]]></title>
        <description><![CDATA[Stories by Mikołaj Przybysz on Medium]]></description>
        <link>https://medium.com/@mikoay?source=rss-b3b528e7ac13------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xc_U-mQVwstuBx0Q0x3Qvw.jpeg</url>
            <title>Stories by Mikołaj Przybysz on Medium</title>
            <link>https://medium.com/@mikoay?source=rss-b3b528e7ac13------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 23:56:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mikoay/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to run a great in-house hackathon]]></title>
            <link>https://medium.com/@mikoay/how-to-run-a-great-in-house-hackathon-43b891f7cfdf?source=rss-b3b528e7ac13------2</link>
            <guid isPermaLink="false">https://medium.com/p/43b891f7cfdf</guid>
            <category><![CDATA[gaming]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[hackathons]]></category>
            <category><![CDATA[development]]></category>
            <dc:creator><![CDATA[Mikołaj Przybysz]]></dc:creator>
            <pubDate>Thu, 23 Jan 2020 14:02:13 GMT</pubDate>
            <atom:updated>2020-01-23T14:02:13.068Z</atom:updated>
            <content:encoded><![CDATA[<p>TL;TR; I will show how to run in-house hackathon using online platform codinggame.com</p><h3>Story</h3><p>Over the years hackathons became associated with a bring-us-ideas model, where companies run hackathons in order to get some fresh ideas for new product features, business ideas or simply finding security vulnerabilities in exchange for some prizes which hopefully include money and not a free yearly subscription to our service that you will never use. While those events will probably never stop to happen as they serve companies great, it’s about time we start thinking about another hackathon model, which mainly focuses on team building, skills development and most importantly on having fun.</p><h3>How CodingGame platform works</h3><p>Best way to understand it is to play it so simply go to <a href="http://www.codinggame.com/">www.codinggame.com</a> and press “GET STARTED” button. Now you can skip logging in and initial tutorial. The only thing you have to do now is to select the programming language you want to use, I will go with Groovy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YgDFoSPB3lRupSuM6Gu0qw.png" /><figcaption>Selecting programming language</figcaption></figure><p>You play the game by controlling avatar you are given on turn basis, meaning you have to configure it’s the behaviour on each round based on the parameters you are given via standard input, by printing commands to standard output. So how to play it? Let’s try executing the sample code we are given. Simply find and press “PLAY TESTCASE” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZVo1uTahHMvltTYlv2DLQ.png" /><figcaption>This is how to lose</figcaption></figure><p>Once we know how to test our code, let’s see what do we have to do. You can find the goal under the game visualization or just search for “the goal”. This game’s goal is to order our avatar to shoot at the enemy who is closer. To do that we have to print the name of the enemy that we are given as parameter. So let’s comment <em>println</em> that’s there and add some logic to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QsfEu2TrhhxFGXhCZL7zFA.png" /><figcaption>Once you test your logic and it works you win</figcaption></figure><p>As you can see I simply added if statement that selects the enemy who is closer and prints it’s name.</p><h3>How hackathon will work</h3><p>Since you already know how the game works, now imagine, having a couple of people around with some food and drinks to improve the team-building experience. Everyone will have couple of hours to play the same game but a little bit more complex and will be scored based on their solution. Finally, there will be a scoreboard showing live results, where everyone can see how they are doing against others.</p><h3>How to run hackathon</h3><p>Simply go to the homepage fo <a href="http://www.coding/">www.coding</a>game.com and scroll to the bottom where you can find the hackathons link, press it and follow instructions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43b891f7cfdf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hosting static websites with Google Cloud Storage]]></title>
            <link>https://medium.com/@mikoay/hosting-static-websites-with-google-cloud-storage-4b1ba6486f41?source=rss-b3b528e7ac13------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b1ba6486f41</guid>
            <category><![CDATA[static-website-hosting]]></category>
            <category><![CDATA[cloud-hosting]]></category>
            <category><![CDATA[web-hosting]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <dc:creator><![CDATA[Mikołaj Przybysz]]></dc:creator>
            <pubDate>Sat, 26 Oct 2019 18:20:24 GMT</pubDate>
            <atom:updated>2019-10-28T21:33:57.751Z</atom:updated>
            <content:encoded><![CDATA[<p>TL;TR: Use Github pages or Google Firebase for hosting static websites.</p><p>In this post, I would like to show you how you can host static websites on google cloud. I will create a very simple HTML website with a homepage, about us page and page for handling 404 error (page not found). The contents of the page are not imported it’s just to show the page works and how to deploy it. If you want you can also host this way pages created using React or Jekyll. Alright, let’s get right into it and please comment if you find anything not clear.</p><h4>Prerequisites</h4><p>Before we start let’s make sure we got all the necessary prerequisites.</p><ul><li>Registered domain — which has to be used later as the bucket name so it has to follow Google Cloud Storage bucket naming convention (more about restrictions here: <a href="https://cloud.google.com/storage/docs/naming">https://cloud.google.com/storage/docs/naming</a>)</li><li>Google Cloud Account — Go to <a href="https://cloud.google.com/">https://cloud.google.com/</a> to create one</li><li>gsutil — Go to <a href="https://cloud.google.com/sdk/docs/quickstarts">https://cloud.google.com/sdk/docs/quickstarts</a> and follow installation instruction for your system</li><li>Website you want to host — you can use mine (<a href="https://github.com/mikolajprzybysz/static-website-google-cloud-storage">https://github.com/mikolajprzybysz/static-website-google-cloud-storage</a>)</li></ul><h4>Create Cloud DNS Zone</h4><p>Since we have to create a bucket that name contains dots (.) to be able to host websites with it we need to verify it. We will verify it by adding DNS TXT entry. To do that we will create DNS Zone.</p><p>Once that is done we can open Google Cloud DNS console and check the details of the zone we have created by clicking on its name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yka9wtni0T8X7bSSzf23nQ.png" /><figcaption>Cloud DNS Zones</figcaption></figure><p>In the zone details, you can find NS record which holds addresses of the Google DNS servers handling your zone. Simply redirect your domain to these servers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tWahw6Y3YDdHEpD0Jofnvg.png" /><figcaption>Cloud DNS Zone record sets</figcaption></figure><h4>Verify your domain</h4><p>To do that go to <a href="https://www.google.com/webmasters/verification">https://www.google.com/webmasters/verification</a> and <strong>add a property</strong> (your property is the domain name).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_DzJIkIi_cyfq8Eq43hGIg.png" /></figure><p>There are many methods of verification, but since your website is not yet up we will do it by adding DNS TXT record. You can find value for your record by selecting <strong>Alternate methods &gt; Domain name provider &gt; Other</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x15dGYfT-ceCtR_2z0nAbw.png" /><figcaption>DNS TXT record to be added</figcaption></figure><p>Once we got the DNS TXT record value we can move on to creating an actual record.</p><p>Unfortunately, it takes 24 to 48 hours for the DNS change to propagate over the internet, so you need to wait for it to be available and to verify your domain in <a href="https://www.google.com/webmasters/verification">https://www.google.com/webmasters/verification</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LEOB6AYe9M_BaNB4mnf81g.png" /><figcaption>Webmaster Central website verified</figcaption></figure><h4>Creating a bucket in Google Cloud Storage</h4><p><strong>The bucket name has to be a valid domain name and it cannot be an apex domain.</strong> This is the single most important thing otherwise you won’t be able to set up website configuration or redirection from domain to the bucket. We will use <em>www.samplewebsite.pl</em> as our bucket name for this tutorial.</p><p><em>gsutil mb gs://www.samplewebsite.pl</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t0mMsZ5VW6U1M2bwoktpig.png" /><figcaption>Bucket created</figcaption></figure><h4>Make bucket public</h4><p>To allow users to view files in our bucket we will make it as well as all the files inside the public by adding <em>objectViewer</em> permission for all the users.</p><p><em>gsutil iam ch allUsers:objectViewer gs://www.samplewebsite.pl</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s1gebHORHus1fubZiFhUaQ.png" /><figcaption>Bucket published</figcaption></figure><h4>Upload website to Google Cloud Storage</h4><p>Once our bucket is created and it&#39;s public let’s copy website files from the local directory. I will also exclude some files by adding -x flag with files I want to exclude from copying.</p><p><em>gsutil rsync -x “.git|README.md” -R . gs://www.samplewebsite.pl</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*grYn3_sgLVG7Q2jsdlSOvQ.png" /></figure><h4>Perform website configuration on the bucket</h4><p>We have to set the entry point of the website and page to show when the user tries to access the non-existing page.</p><p><em>gsutil web set -m index.html -e 404.html gs://www.samplewebsite.pl</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eyk4YaaqpFJTGO2fNfegvw.png" /></figure><h4>Redirect users to the bucket</h4><p>Finally, let’s add a CNAME (alias) record to make user accessing domain to be redirected right into the bucket we have created.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a7e67df08e5b81a48b8681445c6dd5fe/href">https://medium.com/media/a7e67df08e5b81a48b8681445c6dd5fe/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NS2TGcXbjY3z_Ip0ckL_BQ.png" /></figure><h4>Summary</h4><p>It is possible, but it does not mean you should do it. I have found many issues with this solution like missing apex to www redirect or lack of implicit SSL setup at this point I would recommend Github pages or Google Firebase.</p><h4>FAQ</h4><p>Q: I can’t do website configuration for my google cloud storage bucket.</p><p>A: If you don’t see website configuration in your bucket options it usually means that the name of your bucket is not the correct domain name.</p><p>Q: Can I redirect (root) apex domain to the bucket?</p><p>A: So far I have not found any easy way to do that.</p><p>Q: Will this solution setup an SSL certificate automatically?</p><p>A: Unfortunately I also have not found any convenient way to have it done automatically.</p><h4>Source</h4><ul><li><a href="https://serverascode.com/2018/01/14/gcloud-dns-setup.html">https://serverascode.com/2018/01/14/gcloud-dns-setup.html</a></li><li><a href="https://hackernoon.com/hosting-a-free-static-website-on-google-cloud-storage-d0d83704173b">https://hackernoon.com/hosting-a-free-static-website-on-google-cloud-storage-d0d83704173b</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b1ba6486f41" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplest ssh key generation on Windows with docker]]></title>
            <link>https://medium.com/@mikoay/simplest-ssh-key-generation-on-windows-with-docker-c6422dd92653?source=rss-b3b528e7ac13------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6422dd92653</guid>
            <category><![CDATA[ssh-keygen]]></category>
            <category><![CDATA[ssh-keys]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Mikołaj Przybysz]]></dc:creator>
            <pubDate>Tue, 05 Feb 2019 08:26:00 GMT</pubDate>
            <atom:updated>2019-02-05T08:26:00.860Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tgH9MbT89V-23QeutWsE_A.jpeg" /></figure><p>Docker brings to linux tools directly to Windows. There is no need anymore to install any further windows software, when you can simply run 5 megabyte alpine linux, install whatever you need run and remove container once you finish. Fast clean and simple, this is for example how you can generate ssh private and public key on Windows with one command:</p><pre>docker run --rm -it -v %cd%:/root/.ssh/ alpine sh -c &quot;apk add openssh-keygen &amp;&amp; ssh-keygen -t rsa -C example@email.com&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6422dd92653" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Platform agnostic nodejs rest api “Hello World” webservices with express and docker-compose]]></title>
            <link>https://medium.com/@mikoay/platform-agnostic-nodejs-rest-api-hello-world-webservices-with-express-and-docker-compose-3302b4ed84a?source=rss-b3b528e7ac13------2</link>
            <guid isPermaLink="false">https://medium.com/p/3302b4ed84a</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[hello-world]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[express]]></category>
            <dc:creator><![CDATA[Mikołaj Przybysz]]></dc:creator>
            <pubDate>Tue, 29 Jan 2019 08:26:01 GMT</pubDate>
            <atom:updated>2019-01-29T08:26:01.524Z</atom:updated>
            <content:encoded><![CDATA[<p>This article will talk about how to create from scratch sample node webservice that will expose hello world endpoint. This article’s aim is to provide you instruction how to develop sample node endpoint and how to run it and manually test it.</p><p>To avoid problems with differences between various operating systems we will use docker-compose, which enable us to create one docker-compose.yml which will work on all host operating system.</p><p>Lets get to it! Open console and start hacking, first lets create directory for our tutorial:</p><pre># in console<br>mkdir tutorial-app<br>cd tutorial-app</pre><p>Now let’s create our docker-compose container configuration</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f93312ed328d458b476c3dd505475b13/href">https://medium.com/media/f93312ed328d458b476c3dd505475b13/href</a></iframe><p>At this point we have our configuration in docker-compose.ymlfile, now we only need to run one simple command to start our alpine linux with node:</p><pre>docker-compose run --rm --entrypoint sh tutorial-app</pre><p>Once we run the container, let’s setup our application, we will use npm init for it, which will create application configuration package.json file. Once you run the command it will ask you couple of questions, most of them is optional, so you can skip them:</p><pre>/app # npm init<br>This utility will walk you through creating a package.json file.<br>It only covers the most common items, and tries to guess sensible defaults.</pre><pre>See `npm help json` for definitive documentation on these fields<br>and exactly what they do.</pre><pre>Use `npm install &lt;pkg&gt;` afterwards to install a package and<br>save it as a dependency in the package.json file.</pre><pre>Press ^C at any time to quit.</pre><pre>package name: (app) tutorial-app<br>version: (1.0.0) 0.1.0<br>description:<br>entry point: (index.js)<br>test command:<br>git repository:<br>keywords:<br>author:<br>license: (ISC)<br>About to write to /app/package.json:</pre><pre>{<br>  &quot;name&quot;: &quot;tutorial-app&quot;,<br>  &quot;version&quot;: &quot;0.1.0&quot;,<br>  &quot;description&quot;: &quot;&quot;,<br>  &quot;main&quot;: &quot;index.js&quot;,<br>  &quot;scripts&quot;: {<br>    &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;<br>  },<br>  &quot;author&quot;: &quot;&quot;,<br>  &quot;license&quot;: &quot;ISC&quot;<br>}</pre><pre>Is this OK? (yes) yes</pre><p>Alright, since we have package.json already, we can move on and install express nodejs framework, with npm dependency manager by simply running the following command:</p><pre>npm install express --save<br># and close container<br>exit</pre><p>At this point, since we have all neccessary dependencies we can move on to write our first javascript webserver, here is how it will look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4493b2765893cd8941e98c5729f47b42/href">https://medium.com/media/4493b2765893cd8941e98c5729f47b42/href</a></iframe><p>As you can see the whole thing is not that complicated, simply create app by requiring express module and making a function call on top of it. Once we have express instance, we simply attach function that will be called when requestGET / will be send to our app. In our case we simply return “Hello World” string as a response. Another thing we need to do is bind our application to a port we will expect HTTP requests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*7NGPQOrLjWsPvK088wPhLQ.jpeg" /></figure><p>Well, thats basically it, I will use this tutorial as a base for more complex things, so if find anything unclear do tell!</p><p>Now you only need to run it with the following command:</p><pre>docker-compose up</pre><p>Open your browser and type <a href="http://localhost/">http://localhost/</a></p><p>References:</p><ul><li><a href="https://github.com/mikolajprzybysz/tutorial-node-rest-api">Complete code repository to the sample node service</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3302b4ed84a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Test driven api building in distributed microservice environment]]></title>
            <link>https://medium.com/@mikoay/test-driven-api-building-in-distributed-microservice-environment-9a7d0e0080d2?source=rss-b3b528e7ac13------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a7d0e0080d2</guid>
            <category><![CDATA[restful-api]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[swagger]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[distributed-teams]]></category>
            <dc:creator><![CDATA[Mikołaj Przybysz]]></dc:creator>
            <pubDate>Mon, 24 Sep 2018 07:47:25 GMT</pubDate>
            <atom:updated>2018-09-24T07:47:25.289Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article I will design api with open api v3 (swagger), setup mock it with wiremock for everyone else to use and for you to create api tests, create api tests, implement endpoint’s logic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/45138f25173eb8ecbb80e15de842a9e8/href">https://medium.com/media/45138f25173eb8ecbb80e15de842a9e8/href</a></iframe><p>I wanted to write this article as guideline for everyone working in large organisation where delivering something fast is as important as delivering quality software. I will try to show you how to approach building simple RESTful api with the goal to deliver fast results without compromising the quality. Lets get onto it, lets create our endpoint with swagger</p><p>What we have achieved with swagger api definition is setting up a proposition of a contract between us and our clients (or other teams) that will be used by our api and by our clients. Keep in mind that at this point you are at the negotiation stage, you should start sharing the contract with other involved parties in order to gather feedback and to have your proposed contract reviewed.</p><p>Based on this contract we will move into next stage, which is creating a mock server to deliver sample responses based on requests recieved. Providing mock response will enable other teams to test their implementations even before we develop anything, therefore we will have a situation where each team can develop without the need to wait for others.</p><p>Lets setup a mock server, my favorite is wiremock as it is extremly easy to use and has some powerful features that you might want to use later on. We only need to create two mappings (json files describing request and response that wire mock should respond with) for existing and non-existing book. We will put both of them into following directory:&lt;<em>project_root&gt;/tests/wiremock/mappings</em></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90f825b347fc70df58984a54a4e5b419/href">https://medium.com/media/90f825b347fc70df58984a54a4e5b419/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f61545bee87a08e02b6e94d36db3acea/href">https://medium.com/media/f61545bee87a08e02b6e94d36db3acea/href</a></iframe><p>Once we have both files lets run docker container with wiremock (there is multiple ways to run, like runnnig it directly from a jar locally I simply prefer docker). Of course you can always copy ekino dockerfile and use your own image.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9487c46780bf28040a93b88257d8b381/href">https://medium.com/media/9487c46780bf28040a93b88257d8b381/href</a></iframe><p>All right, so at this point we have mock server and our clients can start using it already in development, you can test it with follwing curl:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/25acb602a18075d62dc5c7d5c0f01dbe/href">https://medium.com/media/25acb602a18075d62dc5c7d5c0f01dbe/href</a></iframe><p>At this point the only thing left is to create api test and start developing. My choice for api testing will be PHP Codeception as the api I am creating will be done in PHP, however you can really use anything you prefer. To bootsrap codeception simply follow the script below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0e7fbf381504800398fe53253fbf7e59/href">https://medium.com/media/0e7fbf381504800398fe53253fbf7e59/href</a></iframe><p>With all that done its time to test if everything is working fine and we can start developing. I will show you how to do it step by step with docker as this might be a little more clear, however you can also use docker-compose if you know how to set it up. The only problem we have right now is that we need to run both containers in the same network in order for them to be able to communicate between each other.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a58766984e8bcb35445120dc0b50377/href">https://medium.com/media/7a58766984e8bcb35445120dc0b50377/href</a></iframe><p>And we’re done, at this point you simply start development and run tests against your implemenetation instead of mock server. I hope you liked it and it will help you deliver better quality.</p><p>If you have any question and propositions for improvement I will be greatful for any feedback.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a7d0e0080d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>