powRSS
Home Recent Glimpses Shuffle Blogs Random

New: Explore conversations across blogs with powRSS Mentions

vknabel

Valentin Knabel

Developer, cyclist, coffee nerd, human. Open Source, kindness, honesty, vegan. It is fine to be imperfect, as long as we are honest and have fun along the way.

Top Words

  • swift
  • code
  • hugo
  • swiftui
  • async
  • simple
  • reminder
  • manager
  • debugging
  • vapor
  • angular
  • language

All posts (109)

4y
Back in 2019 I wrote an article about how to debug your Swift Package Manager projects in Visual Studio Code. In late december 2021, the Swift Server Working group released a brand new extension for vscode, which dramatically improves debugging your Swift code. Especially for linux! Time for an update! Running,...
4y
In case your UINavigationBar has been set to a custom color and the navigation bar is not translucent, you will experience a visual regression when updating to Xcode 13. The navigation bar background will be black - until you start scrolling. Then it behaves as expected. Thankfully there is a workaround and an easy...
4y
Today I learned about asdf, which is a pluggable version manager. Previously I used nvm, rvm, swiftenv and more. I now use asdf. Just add the plugin of your choice and install your desired versions. The only drawback is installing completely new versions of the tools. You are only able to install exact versions. You...
4y
Copying contents from the web often copies weird characters, like the invisible character U+FEFF or “Zero Width No-Break Space”. Code editors like VS Code might highlight those characters depending on your config, but other websites don’t. In my case I copied a secret for my CI pipeline including the invisible...
4y
I tried to keep my work stuff separate from my personal stuff on the same machine. I created two admin users, set up a group for homebrew and set the permissions accordingly. Sadly this didn’t work out in the long run. So I started to run Homebrew as my preferred admin user. if [ "$(whoami)" != "vknabel" ]; then...
4y
A few months ago Swift 5.5 has been released and made async/await available. And in 4.50.0 Vapor added support for it, too! If you are still on Vapor 3, you first need to upgrade your server to Vapor 4. Now we can migrate most usages of Swift NIO’s EventLoopFuture with async. But we don’t have to! This is not a...
5y
Converting a simple and small iOS app was far easier than expected. Of course webviews, gesture recognizers, navbars, etc. are not supported or work differently, but at a first glance there are not a lot parts with visual regressions!
5y
UIApplication.shared isn’t available within an iOS app extension. To annotate your code paths not needed in an extension, but using UIApplication.shared, just use the @available(iOSApplicationExtension, unavailable) annotation. Now you will receive the same error when using the annotated api from an extension!
5y
Nestjs has very great decorators to annotate your routes, dtos and controllers. This makes it really easy to keep your Swagger or OpenAPI documentation up to date. https://docs.nestjs.com/openapi/types-and-parameters Only downside: as TypeScript interfaces do not exist at runtime, you need to declare all your data...
5y
XPath is a really powerful tool to query XML documents, if you are forced to. But in contrast to JSON queries, XPath does not return the actual values, but the nodes or attribtes you queried. XPath ist ziemlich mächtig und man kommt relativ flott an das gewünschte Ziel. Anders als bei JSON queries erhält man aber...
5y
Using enums in Swift for static Table View Data Sources is really great. Especially when declaring them as enum X: Int and using the rawValue to reflect the section or row index. You can even use the CaseIterable protocol to count the number of sections or rows.
5y
I have never actually seen serious code that’s running in production, that uses base64 encoding for password for over a decade. Today I did. Here is the not so friendly reminder: base64 is no encryption or hashing algorithm. You should not use it to encode passwords. And you should’t send the password over HTTP and...

Page 6 of 10