I wrote SSH into your private machines from anywhere, for free, using Cloudflare Tunnel in April which led to a lot of discussion on Hacker News. A lot of people started mentioning alternatives (Tailscale, ZeroTier and issues with Cloudflare).
Syncing Obsidian Vault on macOS and Android, for free, using git
Motivation 💪
- You have been using Obsidian to store your notes. I highly recommend it if you don't - in that case, come back to this page later.
- Your current solution to write notes is to use a separate app or separate Obsidian Vault on your phone. After you reach your computer, you manually copy and paste data into your primary Obsidian Vault. I previously used Google Keep for temporary notes, which were moved into Obsidian Vault when I found the time.
SSH into your private machines from anywhere, for free, using Cloudflare Tunnel
Outcome
By the end of this post, you'll be able to run: ssh $machine_name
from anywhere in the internet-connected planet, using SSH keys. It is free and requires no future maintainance. This guide uses Cloudflare Tunnel, a service by Cloudflare with a free-tier. It will filter traffic to your machines through Cloudflare's network, including authenticating you. Because of this, your machines won't directly be exposed to threat actors and "1337 haxors".
This was discussed on Hacker News.
Playing Android device audio on macOS
Why?
I want to listen to the instructor playing on an Android app (Fiit) on my speakers which are connected to my MacBook. I am already sharing the screen of my Android on my MacBook by using scrcpy
, a tool by Romain Vimont. sndcpy
lets us to do this, also a tool made by Romain Vimont. The naming of these tools were inspired by C library function, strcpy
, which copies strings between memory locations.
You want to play music or app sounds on your Android device on your macOS, and
- You are displaying your Android screen on the mac already, but you want sound too
- Your Android device doesn't have an audio jack
- Your speakers aren't bluetooth
- You don't want to use your headphones
- I do not want to sweat onto my headphones, or
- I want to share my music with others
- Your macOS is connected via AUX cable (or USB-C/HDMI) to speakers, so let's use them instead
How/when Flutter runs on iOS and Android
Being cross-platform, Flutter abstracts away Platform APIs, such as iOS, Android, Web, macOS, Windows and Linux. However, there are platform specific differences which will affect how you implement features or develop package plugins.
For example, on iOS, you need to implement
didReceive(_:completionHandler:)
in your app's main entrypoint (AppDelegate), where as on Android, you need to declare a Service or Broadcast Receiver in the AndroidManifest.xml
file, and override FirebaseMessagingService
onMessageReceived
method.
Debugging Push Notifications on iOS
The real value/uniqueness on this page is showing how to use Console.app for push notifications. I also include some more basic guidance to help you avoid some common problems.
What is the difference between a clang (C++, Objective-C, C) module and a Swift module?
They are different. At the end of the build process though, they both need to be linked to your application/ library's other .o
and .dylib
files for it to run.
The issue with standardisation
I work in a team that manages far more software libraries than there are people. I wanted to raise my concern about standardisation across projects/ libraries (e.g. readmes, tools, github workflow file naming conventions). For example, synchronizing all the projects to have:
How to debug Android apps (including Flutter) without launching from the debugger?
Motivation
You may want to observe/ debug behaviour related to your app's Activity, Broadcast Receiver or Service being launched by an Intent, without any side effects of the application already running. For example, I was testing push notifications, and wanted to debug the case where no other application components was running (Activity, Service), and only the Broadcast Receiver declared in my AndroidManifest.xml
was launched in response to the push notification message. This is only possible if the application hasn't been launched yet by Android Studio.
The trick is prevent your app from launching until the debugger is attached, and then to attach the debugger. This means you won't miss anything between the app launching and you attaching the debugger.
A case against Symlinks in Xcode
I've seen a few complaints 😈 related to symlinks in Xcode dotted around the internet, but nothing put things into perspective as much as me trying to use symlinks in Xcode, myself.
A small price to pay to avoid having to mess with symlinks which cause their own issues in Xcode - Joe Susnick
The package no longer appears as a package within Xcode (icon is like a terminal-stamped file), and it's not built anymore. - Raphael Sebbe