Hi! Welcome to PäksTech! On this blog you'll find topics about programming, web development, Raspberry Pi, etc.

I hope you enjoy your stay!

- Janne

Subscribe to my newsletter

What's new with PäksTech? Subscribe to receive occasional emails where I will sum up stuff that has happened at the blog and what may be coming next.

powered by TinyLetter | Privacy Policy

From the blog

Return Many Values as Attributes in Python Janne Kemppainen |

When you need to return complex data from a function you typically think of two options:

  1. put the values in a dictionary
  2. create a new object/class

The first option is simple to implement but you need to access the individual values by their keys. The second …

Import ES6 Modules in Node.js Janne Kemppainen |

With the ECMAScript modules definition we can use the import and export keywords to load and publish library code. However, if you try to use them in your Node.js project you might encounter the following error:

Github Actions Repository Dispatch Janne Kemppainen |

There are lots and lots of events that can be used to trigger GitHub Actions. But if you want to control your actions programmatically from the outside you will need to use repository dispatch. In this post I will go through the essential things you need to …

Schedule Netlify Builds with GitHub Actions Janne Kemppainen |

Would you like to be able to schedule the blog posts for your static site into the future but don't want to use up all of your free Netlify build quota? In this post we'll create a GitHub Actions workflow that triggers a site rebuild when a post has been …

Define a Python Script Inside a GH Actions Workflow File Janne Kemppainen |

GitHub Actions gives you lots of freedom to define custom workflows by combining different actions and running command line programs. Sometimes you might want to run small snippets of code, and that is already possible by running scripts from the command line …

Dynamic Attributes in Python Janne Kemppainen |

When you define an object in Python you usually give it some attributes that hold the necessary pieces of information in a place that makes sense. However, Python does not limit the use of attributes to the set that were described at object creation time.