Zápisník Josefa Rouska

Python a React.js programátor, zaměřený na Shopify integrace

Virtual support phone number with Twilio

For a long time I was looking for a simple and, well, cheap solution to isolate my support phone number from my personal number and I’m going to share my solution with you.

Cool image loading with Gatsby.js v2 and Netlify CMS v2

Time has come and even I got the opportunity to try out currently trending Gatsby.js static site generator. The most popular feature, at least from my point of view, is Image Processing with gatsby-transformer-sharp. I thought “Everyone talks that I can have out of the box responsive images and other cool things!”. Yeah sure, but they didn’t use it together with Netlify CMS while using beta of v2 :)

Visualizing Strava activites with Folium and Jupyter Notebook

Few days ago I participated in my first race ever! It was short triathlon called Slapský triatlon. My friend was talking me into it for almost two years. The swimming is 500m, cycling is 34km and running is 4.5km. I don’t swim or run that much but I was pretty sure I can handle this. I was pretty confident with cycling which turned out to be a mistake. I was happy with the result overall. I wasn’t last. I’m pretty satisfied with swimming and running, but I could push a bit harder on the bike. The result is that I have some interesting data I can play around.

Stuff I wish I knew when starting with Flow

Typing in dynamic languages is hard. Especially in small projects where interaction with libraries is hiding on every corner. I tried to get into Flow at least two times before. Now I finally think I got far enough to experience enough of important obstacles that suffice to write about them.

Local state management pomocí Apollo

Apollo je sada nástrojů pro práci s GraphQL od tvůrců Meteor.js. Apollo Client slouží k napojení UI na data, Apollo Engine na infrastrukturu a tooling a nakonec Apollo Server pro zpřístupnění REST API pomocí GraphQL.

Jak umožnit doručení pomocí Zásilkovna.cz na Shopify

Klient mě oslovil se záměrem poskytovat doručování pomocí Zásilkovna.cz na Shopify. Vzhledem k omezeným možnostem ovlivnit checkout proces u levnějších Shopify variant se to ukázalo jako cvičení tvořivosti.

Shopify - Fakturoid: Variabilní symbol z externího systému

Máte systém na zpracování objednávek generující vlastní čísla objednávek a potřebujete použít toto číslo jako variabilní symbol?

Statically generated e-commerce using Shopify and Netlify

I recently fell in love with Netlify because of its simplicity and speed. Nelify allows you to build and host your website in one place with generous pricing levels. I wanted to explore what are possibilities when it comes to e-commerce so I decided to create a simple statically generated website where I could sell some products.

Export Rails model data as CSV

I needed to allow my customer to export a bunch of tables. After some digging, I found a pretty neat solution.

Toggl reports to Slack for free plan

I wanted to expose a bit of insight to my team. As we work in kind of upredictable manner we could use a report on who worked a day before. We use Trello as our time tracking tool. It supports weekly email reports but the price for this feature was a bit expensive for us. So I did a quick research and found Trello report script that does exactly what I wanted. It outputs markdown to STDOUT.

Next.js - server-side rendering bez práce

Next.js je minimalistický framework pro tvorbu React aplikací s důrazem na jednoduchost server-side renderingu. Ukážeme si, jak nám pomůže vytvořit aplikaci, která bude přátelská jak pro uživatele, tak i pro vyhledávače.

Tips for writing maintainable redux apps

I attended great talk by Gabe Scholz which was full of useful and concise tips for writing better and more maintainable redux apps. It struck me that I was just recently coping with these issues so I decided to share my view on these issues.

Going headless with Firefox - since '55

Recently I found that Firefox supports headless mode on Linux for a month now. Windows and MacOS are now in beta and will be released on September 26, 2017. I was pretty excited to find out so I immediately switched over Travis configuration for Selenium tests in my Django project.

Upload multiple files in Django admin

In my current project I wanted to let user upload multiple photos at once in Django admin. I got intimidated by huge libraries that do this and dozens of other things. So I ended up using small tweak which works surprisingly well.

Automatizace platby převodem na Shopify pomocí Fakturoidu

Můj klient potřeboval automatizovat platbu převodem v obchodě na platformě Shopify. Vymysleli jsme řešení, jak pomocí proformy využít schopnosti Fakturoid.cz. Fakturoid při zaplacení proformy vytvoří fakturu a následně informuje o jejím vytvoření.

Next.js - server side rendering for masses

Recently I had opportunity to use Next.js on a client project. I already heard how much work it saves but I just couldn’t believe how simple it was.

Why I got interested in GraphQL and why should you too

GraphQL is query language created by developers in Facebook to make their app development manageable. There are quite a few reasons why should we be interested in it even at small scale.

Automatically format your javascript files on commit using Prettier

I recently fell in love with prettier. Prettier is an opinionated code formatter. Having consistently formatted code is very pleasant feeling for me and having formatting done automatically? Woah! The best part is that you can easily run prettier on git commit. That way you can write messy code and it will get cleaned up automatically. Let’s do it.

React Amsterdam 2017

Last Friday I attended my first React conference. It took place in Amsterdam. So once again I got the opportunity to visit Amsterdam because of a conference. I want to thank organizers of PragueJS meetup for giving me a ticket!

On writing and publishing Shopify application

Recently I got interested in small and hopefully profitable projects, sometimes called Micropreneurship. Later I found that one of the most “simple” ways to start a SAAS is Shopify application.

Expose local port as HTTPS endpoint on the internet

I recently needed to expose local port of my dev machine to the internet. I realized I could combine SSH port forwarding, nginx and letsencrypt. Ubuntu 16.04 is my OS of choice on the server.

Převléknutí plastových reproduktorů do stylovější podoby

Už jsou to tři roky, co jsem rozebral plastové reproduktory a jejich elektroniku naskládal do krabice od vína a přikryl lepenkou z IKEA. Chtěl jsem jednu bednu, ideálně s bluetooth, ale nepotřebuji drahý stylový reproduktor. Nedlouho poté jsem svůj výtvor vylepšil bluetooth příjmačem a designová reprobedna byla na světě.

Django: Under The Hood

This year I a had an opportunity to attend Django: Under The Hood. A single track conference focused solely on Django. Due to a fact that significant number of contributors are attending, it’s great opportunity to discuss almost any issue with people who actually have a clue what is going on.

Nodemon: Breakpoints in node applications

Nodemon is tool to improve backend JS development. It reloads files automatically so you don’t have to restart the server every time. Another cool thing is that you can debug the code in chrome dev tools.

Python, LEDs and WiFi

I lost interest in electrotechnics almost a year ago. I turned off my binary clock, temperature sensor and left it in a drawer. But before that I bought ESP8266, cheap WiFi microcontroller running lua. It was unreliable and hard to program.

Island: část 2.

Cesta do Þórsmörk pro nás začíná u vodopádu Seljalandsfoss. Vodopád Seljalandsfoss jsme pocítili na vlastní kůži, dopad vody, která už ve vzduchu působí úžasným dojmem, vytváří mlhu rozlétávající se do okolí. V jeho blízkosti je ještě jeden, velmi zajímavý vodopád zvaný Gljúfrabúi. Je totiž skrytý ve skalní průrvě.

Island: část 1.

Island mě překvapil na několika frontách. Jak odlišně, čistě a nádherně působí zdejší příroda, jak malá jsou města a vesnice mimo Rejkjavík.

Bristol

Bristol. Naše přestupní stanice na Island. Jediné, co jsem znal předem byl Banksy a Bath. Nakonec na Bath ani nedošlo, Bristol nás zabavil víc než dost.

Irsko: země, kde není nadávkou jít do hospody

Právě sedíme v našem dočasném pokoji u Bristolských Airbnb hostitelů. Je tedy čas napsat o mých pocitech z Irska.

Recommending Instagram photos using scikit-learn

I recently published first working version of my latest project. It is an Instagram newsletter based on pretty basic Machine Learning method. I called it socialist. Feel free to try it out I would love to hear your feedback.

Adventure with matplotlib, virtualenv and MacOS

Recently I’ve developed passion for machine learning. Which includes many hours of fun with various modeling and plotting libraries.

Výlet do Finska

Na konci října jsem si udělal výlet do Finska. Ani nevím proč, rukavice nosím hned jak teplota klesne pod 10°C a válení se na slunci je mojí oblíbenou aktivitou. Nejspíš kvůli jazyku, který mě vždy přihoval. Původní úvahy začínaly na 14 dnech, nakonec jsem skončil na sedmi. A to je, opravdu málo. Tři dny v Helsinkách, přibližně jeden den ve městě Jyvaskyla a dva dny v Oulu.

DigiSpark talking with .NET

With black Friday sales I decided to buy few DigiSparks to try them out and maybe spark some interest in electronics in my brother. Designer of the board did very good job, overall USB experience feels smooth and is easy to understand.

Using ATTiny2313 as gateway between DS18B20 and Netduino

For some time I was happy user of Stanislav “CW2” Šimíček’s modified firmware which brought OneWire capability to Netduino, but new version(4.2) of .NET MicroFramework came and I realized there are other possibilities.

Injecting dependecies into Web API Action Filters

When I was working with ASP.NET Web API I needed to inject dependencies to ActionFilters using Ninject.

Wireless RGB lamp - The controller

In this part I will show you how to control RGB lamp using Netduino. The basics such as wiring XBee to Netduino and XBee setup are described in my previous article, so I will highlight only most interesting bits.

Wireless RGB lamp

For a long time I wanted to have a wirelessly controlled RGB light in my kitchen. This idea got more specific shape when I saw hacked IKEA dioder light where original PIC microcontroller was removed and ATTiny took its place.

Control lights remotely using XBee and Netduino

I’m moving to my own appartment and I want to control lamp and mood light wirelessly. Because I want to extend mood light across whole appartment in future. I have decided to use XBee. Specifically XBee Series 2.

Netduino binary clock with PCF8574

Recently I found yet another binary clock and I realised that it might be nice way to try I2C expander PCF8574.