Skip to main content

ยท 5 min read

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.

Warning ๐ŸŒถโ€‹

  • This guide requires the use of command line and git, and storing your data privately online, like on GitHub. Therefore, it is not end-to-end encrypted, and Github developers could have access to your data.
  • If you are unwilling, there are other ways to sync Obsidian Vaults, e.g. using Google Drive, Dropbox or paying for the Sync Service from Obsidian directly.
  • If you want end-to-end encryption for your files, use the Obsidian Sync Add-On Service (currently $8/mo).

Brief notes about my note taking ๐Ÿ“โ€‹

  • Markdown is an open file format to store your information, and it was created by Aaron Swartz and John Gruber.
    • It's readable even in its raw format (text) without an app, eg (MS Word), but you can make it look even better with apps like Typora and Obsidian.
    • Open file format: This means if the app you're using shuts down, changes it's pricing or is unethical, you can take your data to another app without much cost.
  • I started using Typora when it was free, and it was great. As they previously warned, it became paid software, and that is fair - it's a great app.
  • I found Obsidian on a variety of websites and from a colleague. Over time, I realised it would organise all the notes I made in the past, and make them searchable.
  • Eventually, I abandoned Typora to use Obsidian completely since I could do everything in Obsidian.

Example ๐Ÿ˜ƒโ€‹

Here's a picture of a file from my Obsidian Vault I wrote on macOS, but it's viewable and editable from Android. My Android device screen is captured using scrcpy

android screenshot of Obsidian app

Steps ๐Ÿ—บโ€‹

Put your notes in a git repo hosted online. ๐ŸŒŽโ€‹

  • Basically, use Github, Gitlab or other cloud provider which hosts git repositories.
  • You probably want a private repo so that other people can't read your files.
  • Github has a guide for this: Create a repo

Clone the repo on your android phone ๐Ÿ“ฒโ€‹

  • Install GitJournal from the Play Store. GitJournal is an app that allows cloning repos, and syncing files back to the cloud.
  • Configure GitJournal to store repo files in the local directory, not in the internal app data:
    • Open GitJournal, Press Hamburger button > Settings > Storage & File Formats > Enable "Store Repo Externally"
    • Create a new folder (e.g. called repos). I chose Documents/repos/. Then, select the repos folder to the be the directory. GitJournal will store all the repos, 1 folder each.
      • Some notes about paths:
        • GitJournal will show the true path for the directory (ie /storage/emulated/0/Documents), whereas
        • the Files app only shows files inside of /storage/emulated/0 as the root aka. Internal storage folder.
      • Warning ๐ŸŒถ: You might get some permissions issues if you did not create the folder yourself, or you are using a restricted directory. In that case, GitJournal will show an error related to permissions. Delete the previous folder (using the Files app) and find/create a different folder.

Open the Obsidian Vault ๐Ÿ“–โ€‹

Usage ๐Ÿ”โ€‹

  • Make changes to your Vault in Obsidian
  • sync with the Cloud using GitJournal

Ending ๐Ÿ‘‹โ€‹

  • I wrote this document (you are reading it) on Obsidian, and in fact, Obsidian's new WYSIWIG editor is what inspired me to write SSH into your private machines from anywhere, for free, using Cloudflare Tunnel I posted on HN earlier this year. With the extensions installed, my Obsidian looks like: obsidian editor screenshot on macOS

  • Let's chat in the comments: Was I not clear on some of the steps? Do you have any ideas or suggestions on improving my Obsidian workflow?

  • Alternatives:

    • I also tried Termux and cloned my repo there. However, I stopped using it because it didn't have an easy button to press, unlike the sync button on GitJournal. You have to a run a few commands in the terminal to set up the file permissions and update the package repositories so you can install git, vim and other useful tools.
    • If you install adb, you can enter the command line on the Android by running adb shell. You can explore the Android filesystem and use adb to manually copy files using scp or rsync from your machine.
  • Not for iOS: This guide doesn't work for iOS, but there is a way to use git to sync files on iOS, but the software is paid (Working Copy, $19.99) if you want to make changes on iOS.

Extra Hint: git conflictsโ€‹

If you do use git to sync files, you might find some merge conflicts between devices caused by the .obsidian/workspace file. To fix this, in your Obsidian Vault, create a .gitignore file and add .obisidian/workspace in the file. If you have already previously committed the file, run git rm --cached .obsidian/workspace to untrack the file.

ยท 6 min read

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".

ยท 2 min read

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

ยท 3 min read

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.

ยท 4 min read

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:

ยท 3 min read

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.

ยท 4 min read

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