Video from the vehicle accident on Vejlevej in Horsens #press
Frederik Handberg
npub1nj0c...2gqz
23 🇩🇰 Studying for a degree in Software Engineering while building fun projects and working freelance as a News Photographer 📷
I share my software projects, photos and videos from my work as a news photographer, and progress updates as I learn to sew garments.
Basically, I just write about my hobbies.
frederikhandberg.com
I checked again. It’s still there.
Apparently, it’s normal for deer moms to leave their babies alone for up to 24 hours before coming back with food.
It’s breathing pretty heavily. It’s lying right in the sun, so that’s understandable. And I suppose it’s also scared of seeing a human…
Didn’t touch it of course. Even though it looks so soft and adorable ☺️
Hope no fox or similar animal is gonna find it :(
View quoted note →
Found this little fella on my walk with the dog.
It’s breathing.
Hopefully the family is nearby 🙏
I’m gonna go check later today, if it’s still there. #animal #nature


Driver of Tesla killed in collision with semi truck. #press
It has now been confirmed by police, that the driver of the white Tesla did not survive the accident with a semi truck. #press


The helicopter took off from the scene of the vehicle crash. #press
Vehicle crash on Vejlevej in Horsens 8700.
Road completely closed. #press


#press
View quoted note →
View quoted note →A few more pictures from the fire. #press
View quoted note →

Fire on Torsted Alle, 8700 Horsens. #press


Implementing a markdown editor using a WebView in a native macOS application feels a bit like cheating. I would love to build it 100% native in AppKit and SwiftUI, but manipulating an NSTextView to support markdown and have live-preview where markdown syntax is being hidden and displayed (like Obsidian) is just too difficult for me to accomplish. I'm basically a complete beginner at Swift and AppKit, but have been doing webdev for a while, so it's much easier for me to use a WebView where I can write HTML, JavaScript, and CSS – it feels much more familiar.
Also, a WebView allows me to use packages like CodeMirror. #dev #Swift
View quoted note →
I tried building a markdown editor with live preview using an NSTextView, but the performance was absolutely horrible. The application kept freezing and unfreezing - this would just happen over and over again.
Now trying to use a WebView and I am getting much better results.
I do have some trouble getting the markdown syntax to show and hide depending on if the user has selected the text with styling.
The markdown syntax hides correctly, but does not show when selecting. I want it to be like Obsidian.
#dev #Swift #AppKit
**Building my notes app in Electron**
When I’m finished with my notes app for macOS, I think it’d be fun to develop the exact same app, but in Electron instead of native AppKit and SwiftUI in Swift.
I could also do it in Flutter, but that would require me to learn Dart, and I think at this point, I am already learning enough programming languages in college and my spare time (Java, C#, Python, C, TypeScript, and Swift).
Building the app in Electron should be pretty easy as the UI is just developed in React and TailwindCSS. I already have quite a bit of experience in React (Next.js) from my social network portfolio project.
What I’m really interested in is how easy you can make the app feel smooth and native by using Electron? Are the animations going to look as smooth and beautiful as in Swift, because making pretty animations and transitions in SwiftUI is super easy. Also, I’m interested to see if it’s easier to find resources for implementing features like gesture interactions.
Of course, the biggest benefit of Electron is that it’s cross platform so the app is going to work on Windows, Linux, and macOS.
Another benefit, at least for me personally, is that I can code the app in just VSCode. I know the shortcuts really well and I’ve set it up to look really nice with a translucent blurry background that just looks amazing.
Xcode is fine, but the UI can’t really be customized and I’m missing some of my favorite shortcuts from VSCode. Insert line above and below by using `SHIFT + OPTION + ARROW UP/DOWN` is super handy.
Recognizing two finger swiping in a macOS app is surprisingly difficult. On iOS, there is the `UISwipeGestureRecognizer`, but there is no equivalent for macOS. I tried using the `DragGesture` from SwiftUI, but it only works when clicking and then dragging. That's not what I want for my use-case.
There aren’t many resources available online related to this issue, so this seems like it's going to be tricky to implement. #dev #swift
I’ve finally implemented a long awaited feature on my personal website’s blog page.
Now, I am able to embed quoted notes in my Nostr notes, that I show on my blog page in a timeline. I think it looks pretty nice.
But after implementing this new feature, I am experiencing glitches with images embedded in notes. The images are disappearing and showing again instantly. This happens multiple times. The glitches seem to stop when all notes are loaded.
But it does not happen for all images. Only some images are glitching and it seems to be completely random when I reload the page.
Pretty annoying… #dev #NextJS


I love how #Nostr is an open protocol meaning that anyone can fetch notes with just a little amount of code.
For example, I’m fetching my notes to show them on my personal website in a blog section.


**Unsaved changes popup**
Implemented a popup that is displayed when trying to close a note with unsaved changes.
Next, I need to implement some kind of indication that makes it clear if a note contains unsaved changes.
Also, I should add an option in the settings where the user can decide if they want the app to automatically save changes in notes or if they manually want to do it.
The default option will be to automatically save. #dev #swift


#nature


Today I’ve made some progress on the notes app. Been working on implementing functionality to automatically save changes made in the notes.
I simply use the `write()` method provided by Swift. I also made sure to change the App Sandbox to allow reading and writing to user-selected documents.
I need to figure out if this is something where I should show a popup to ask the user if they want to allow the app to open the file and save changes to it.
Next step is to figure out how I can manually save the files. I should allow the user to select if they want the app to automatically save changes or to manually save the files by clicking `CMD + S` or going up into the ‘Files’ menubar item to click the ‘Save’ option. #dev #swift
🐴

