<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shayan</title>
    <description>The latest articles on DEV Community by Shayan (@5hay).</description>
    <link>https://dev.to/5hay</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F592442%2Fb0b7b6a3-ace7-4423-a5bf-3ef74e6b8015.png</url>
      <title>DEV Community: Shayan</title>
      <link>https://dev.to/5hay</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/5hay"/>
    <language>en</language>
    <item>
      <title>Automate your Notion backups</title>
      <dc:creator>Shayan</dc:creator>
      <pubDate>Sat, 17 Apr 2021 13:32:35 +0000</pubDate>
      <link>https://dev.to/5hay/automate-your-notion-backups-1ief</link>
      <guid>https://dev.to/5hay/automate-your-notion-backups-1ief</guid>
      <description>&lt;p&gt;If you've read my &lt;a href="https://blog.shayan.eu/set-up-your-own-cross-platform-open-source-and-privacy-respecting-roam-research.html" rel="noopener noreferrer"&gt;last blog post&lt;/a&gt;, then you know I wanted to leave Notion for good.&lt;/p&gt;

&lt;p&gt;The problem is the other solutions are just not quite there yet for me. I really tried, but I'm probably just too accustomed to Notion and its features.&lt;/p&gt;

&lt;p&gt;One of the described issues in that post with Notion was the performance - or the lack of it. I feel like in the last few days the team behind Notion did some backend improvements (also a database upgrade). It definitely feels snappier now. Searching is faster, databases load quicker and you can actually use templates now without waiting forever for them to be set up in the page you're trying to create.&lt;/p&gt;




&lt;p&gt;But this post is not really about this, so let's not get into too much detail and focus on our topic.&lt;/p&gt;

&lt;p&gt;In the settings of Notion there is an &lt;em&gt;Export all workspace content&lt;/em&gt; button. And for backup purposes I did those regularly, but depending on the size of your workspace it can take a while, plus it's a pretty manual process that you have to constantly remind yourself about.&lt;/p&gt;

&lt;p&gt;And I'm the type of guy that tries to automate everything away so I can focus on the important things in my life (plus it's fun to do for an engineer, let's be honest).&lt;/p&gt;

&lt;p&gt;For this reason I have written a small open source command line application in Go that can do just that: &lt;strong&gt;back up your Notion workspace&lt;/strong&gt; or just specific parts of it - automatically. And thanks to Go it's platform independent, so you can even run it on macOS or Windows (there are &lt;a href="https://github.com/5hay/notionbackup/releases" rel="noopener noreferrer"&gt;pre-built binaries&lt;/a&gt; in the repository, if you don't want to build it yourself).&lt;/p&gt;

&lt;p&gt;You can find it on Github at&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/5hay" rel="noopener noreferrer"&gt;
        5hay
      &lt;/a&gt; / &lt;a href="https://github.com/5hay/notionbackup" rel="noopener noreferrer"&gt;
        notionbackup
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A small utility command line application that can recursively download Notion pages
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;The easiest way to run is by downloading a pre-built binary, but since it's open source you can of course build it yourself.&lt;/p&gt;

&lt;p&gt;Then you have to set at least 2 environment variables and you're good to go.&lt;/p&gt;

&lt;p&gt;The necessary env vars are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;NOTION_TOKEN&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;token_v2&lt;/strong&gt; cookie for Notion that is used for authenticating&lt;/li&gt;
&lt;li&gt;You should find enough search results if you just google "Notion token_v2"

&lt;ul&gt;
&lt;li&gt;Here's a quick explanation on how to retrieve that token in case you can't find anything: &lt;a href="https://www.redgregory.com/notion/2020/6/15/9zuzav95gwzwewdu1dspweqbv481s5" rel="noopener noreferrer"&gt;https://www.redgregory.com/notion/2020/6/15/9zuzav95gwzwewdu1dspweqbv481s5&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;code&gt;NOTION_PAGEID&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is the Notion page ID you want to set up for the automatic backup&lt;/li&gt;
&lt;li&gt;On every page you can hit those 3 dots in the corner and click &lt;strong&gt;Copy link&lt;/strong&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fffnmp7glox2u008zjpw5.png" alt="Page Options"&gt;

&lt;ul&gt;
&lt;li&gt;Alternatively, these 3 dots are also in the sidebar for every page if you hover with your mouse over them
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu8v3jrvn9fpo3gzichgz.png" alt="Page Options"&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;The page ID can look something like this&lt;/p&gt;

&lt;p&gt;&lt;code&gt;https://www.notion.so/username/PageTitle-3514g811b36849b3zi8322fdac38287f&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can either set this env variable to the whole URL or just the ID part at the end after the last &lt;code&gt;-&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;On Linux based systems you can put them into your .*rc files (&lt;code&gt;.bashrc&lt;/code&gt;, &lt;code&gt;.zshrc&lt;/code&gt;, ...), so they are always available.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;NOTION_TOKEN&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;someLongAlphanumericValue
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;NOTION_PAGEID&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"https://www.notion.so/username/......"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, &lt;code&gt;source&lt;/code&gt; your .*rc file and you're already set up.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;source ~/.bashrc&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;There are 2 other environment variables you can set for this application, but they have their defaults and don't need to be necessarily set (check the Github repository if you want to set them anyway).&lt;/p&gt;

&lt;p&gt;Now you can execute the binary application by calling &lt;code&gt;./notionbackup&lt;/code&gt; (assuming you have already &lt;code&gt;cd&lt;/code&gt;'d into that folder).&lt;/p&gt;

&lt;p&gt;That's pretty much it. Once the application has finished downloading your backup (it's gonna be a .zip file) you can do whatever you want with it, e.g. integrate it into your backup solution and forget about it.&lt;/p&gt;

&lt;p&gt;You could also automatically unzip it after every export so your backup solution can deduplicate the files better. There are endless possibilities. The important thing is just to have a backup in case something happens.&lt;/p&gt;

&lt;p&gt;I keep it pretty simple.&lt;/p&gt;

&lt;p&gt;I have set up a cron job for once per week that does a backup of my workspace and then pushes the file into my encrypted Google Drive folder with &lt;a href="https://rclone.org/" rel="noopener noreferrer"&gt;rclone&lt;/a&gt; (great tool if you're not familiar yet). The contents of my encrypted Google Drive folder are also replicated into other backup systems, but that's irrelevant for this post.&lt;/p&gt;




&lt;p&gt;I hope you found this blog post and the tool useful. If there's only one thing to learn from this post, it's to always have backups for the worst case scenario.&lt;/p&gt;

&lt;p&gt;If you want to follow me or just chat, you can find me on Twitter: &lt;a href="https://twitter.com/5hay" rel="noopener noreferrer"&gt;@5hay&lt;/a&gt;&lt;/p&gt;

</description>
      <category>go</category>
      <category>notion</category>
      <category>backup</category>
      <category>automation</category>
    </item>
    <item>
      <title>Set up your own cross platform, open source and privacy respecting Roam Research</title>
      <dc:creator>Shayan</dc:creator>
      <pubDate>Mon, 08 Mar 2021 15:19:39 +0000</pubDate>
      <link>https://dev.to/5hay/set-up-your-own-cross-platform-open-source-and-privacy-respecting-roam-research-4ejf</link>
      <guid>https://dev.to/5hay/set-up-your-own-cross-platform-open-source-and-privacy-respecting-roam-research-4ejf</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;A few weeks ago I stumbled upon &lt;a href="https://roamresearch.com/"&gt;Roam Research&lt;/a&gt;. At first glance it's&lt;br&gt;
just another note-taking tool like &lt;a href="https://notion.so"&gt;Notion&lt;/a&gt; and &lt;a href="https://evernote.com"&gt;Evernote&lt;/a&gt;.&lt;br&gt;
But after a few minutes I realized how powerful this type of note-taking could be.&lt;/p&gt;

&lt;p&gt;This is how Roam Research describes their own product:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A note-taking tool for networked thought.&lt;/p&gt;

&lt;p&gt;As easy to use as a document. As powerful as a graph database. Roam helps you organize your research for the long haul.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Basically, what Roam Research does differently is the ability to have bi-directional links between notes and see the relation between these notes in a graph. &lt;/p&gt;

&lt;p&gt;Why this is such a powerful feature and to get a pretty good understanding of the power of such a tool, I suggest you watch this YouTube video by Nat Eliason:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/syKAar8ZD-U"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;There's a problem though with Roam and the other apps I've mentioned: No privacy because these services can see the contents of all my notes.&lt;/p&gt;

&lt;p&gt;I've been using Notion for the past 2+ years now and it's such a good product that I tried to ignore this problem. But due to the fact that lately Notion struggles with (performance) issues and the discovery of Roam, I decided that it's time to find a way for me to get back full control of my data without storing my most private data on servers I have no control over.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Alternatives
&lt;/h2&gt;

&lt;p&gt;There are a couple of other note taking apps that try to replicate the functionality of Roam Research.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://notion.so"&gt;Notion&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Yes, Notion itself can be a (although basic) alternative to Roam as they've implemented the backlinking functionality into Notion in September 2020&lt;/li&gt;
&lt;li&gt;Doesn't solve our problem though&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://obsidian.md/"&gt;Obsidian&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Privacy friendly as the data is only stored locally&lt;/li&gt;
&lt;li&gt;App is closed source though which I don't like&lt;/li&gt;
&lt;li&gt;No official way to take notes on mobile yet&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/athensresearch/athens"&gt;Athens&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Open source, can be selfhosted (though in very early stage)&lt;/li&gt;
&lt;li&gt;I don't want to use Java-ish stuff&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://logseq.com/"&gt;Logseq&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Open source, can be selfhosted (in early stage)&lt;/li&gt;
&lt;li&gt;more focused on you storing all your notes on Github, which gets us back to my initial problem&lt;/li&gt;
&lt;li&gt;Again, Java world&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/foambubble/foam"&gt;Foam&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Open Source, selfhosted&lt;/li&gt;
&lt;li&gt;Notes are just Markdown files&lt;/li&gt;
&lt;li&gt;You can use Git to version control your notes and have a history of the changes you make to the notes&lt;/li&gt;
&lt;li&gt;built on &lt;a href="https://code.visualstudio.com/"&gt;Visual Studio Code&lt;/a&gt; (the majority of us are probably using it anyway). This fact alone probably makes you realize how much potential this has&lt;/li&gt;
&lt;li&gt;full control of the data&lt;/li&gt;
&lt;li&gt;Early development stage, but already very functional&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You probably already guessed it. In this post we're going to look at &lt;a href="https://github.com/foambubble/foam"&gt;Foam&lt;/a&gt; as well as how to install and configure it so that it becomes platform independent and be used on every relevant platform: Windows, Mac, Linux, iOS and Android. Because as you know, VSCode is not available on mobile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation and Configuration
&lt;/h2&gt;

&lt;p&gt;You probably know &lt;a href="https://github.com/Microsoft/vscode"&gt;VSCode&lt;/a&gt; as the Desktop application that is used by so many developers around the world. VSCode is open source and is built with JavaScript&lt;br&gt;
(TypeScript to be more precise). So there are ways to make it run on the Web (read: in the browser). One such way is the project &lt;a href="https://github.com/cdr/code-server"&gt;code-server&lt;/a&gt;. It's literally VSCode that you know from Desktop running in the browser (pretty cool, right?).&lt;/p&gt;

&lt;p&gt;Now you should already have a pretty good understanding about how we're going to accomplish the cross platform functionality.&lt;/p&gt;

&lt;p&gt;We're going to use Docker (and docker-compose) to install code-server. If you're not familiar with Docker yet, there are already countless posts about that topic on this website and the Web in general. It's out of scope for this post.&lt;/p&gt;

&lt;p&gt;I have code-server (and Foam) installed on my server, but it will also without a problem run on something like a Raspberry Pi that you have lying at home.&lt;/p&gt;

&lt;p&gt;I'm going to assume you have Docker and &lt;a href="https://docs.docker.com/compose/install/"&gt;docker-compose&lt;/a&gt;&lt;br&gt;
already installed.&lt;/p&gt;

&lt;p&gt;So let's finally start with the steps required to get Foam installed and configured.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new folder for this project on your server (I'm going to call it &lt;strong&gt;code-server&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;In that folder create the following folder structure:

&lt;ol&gt;
&lt;li&gt;&lt;code&gt;mkdir -p config/.config&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;mkdir {notes,code}&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;Create the &lt;code&gt;docker-compose.yml&lt;/code&gt; file in the just created &lt;strong&gt;code-server&lt;/strong&gt; folder with the following content:
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;   &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2.1"&lt;/span&gt;

   &lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
     &lt;span class="na"&gt;code-server&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
       &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ghcr.io/linuxserver/code-server&lt;/span&gt;
       &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
       &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;code-server&lt;/span&gt;
       &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;8443:8443&lt;/span&gt;
       &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./config:/config&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./notes:/notes&lt;/span&gt; &lt;span class="c1"&gt;# where our notes will be stored&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./code:/code&lt;/span&gt; &lt;span class="c1"&gt;# optional, if you want to also use this VSCode instance as your dev environment&lt;/span&gt;
       &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;PUID=1000&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;PGID=1000&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;TZ=Europe/Berlin&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;PASSWORD=MyPassword&lt;/span&gt; &lt;span class="c1"&gt;#optional, password protect your VSCode instance&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;SUDO_PASSWORD=MyRootPassword&lt;/span&gt; &lt;span class="c1"&gt;#optional, for root access on the terminal of the Docker container&lt;/span&gt;

         &lt;span class="c1"&gt;# open-vsx.org extension marketplace&lt;/span&gt;
         &lt;span class="c1"&gt;# the default extension marketplace in code-server is not that great (very outdated extensions and slow)&lt;/span&gt;
         &lt;span class="c1"&gt;# this one is much better, but has also some outdated stuff&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;SERVICE_URL=https://open-vsx.org/vscode/gallery&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ITEM_URL=https://open-vsx.org/vscode/item&lt;/span&gt;

         &lt;span class="c1"&gt;# Microsoft extension marketplace&lt;/span&gt;
         &lt;span class="c1"&gt;# gray area, Microsoft officially only allows its own products to use this marketplace&lt;/span&gt;
         &lt;span class="c1"&gt;#- SERVICE_URL=https://marketplace.visualstudio.com/_apis/public/gallery&lt;/span&gt;
         &lt;span class="c1"&gt;#- ITEM_URL=https://marketplace.visualstudio.com/items&lt;/span&gt;

         &lt;span class="c1"&gt;# optional, if you also want to use this browser based VSCode instance as your dev environment (I can highly recommend you test it out).&lt;/span&gt;
         &lt;span class="c1"&gt;# For other available mods check out the image's Docker Hub page&lt;/span&gt;
         &lt;span class="c1"&gt;# https://hub.docker.com/r/linuxserver/code-server&lt;/span&gt;
         &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;DOCKER_MODS=linuxserver/mods:code-server-golang|linuxserver/mods:code-server-nodejs|linuxserver/mods:code-server-php8|linuxserver/mods:code-server-python3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ol&gt;
&lt;li&gt;(Optional) You can also run it behind a reverse proxy like &lt;a href="https://traefik.io/"&gt;Traefik&lt;/a&gt; or
nginx, but this it out of scope for this post. Check out
&lt;a href="https://nginxproxymanager.com/"&gt;Nginx Proxy Manager&lt;/a&gt; for a very easy to manage way to use nginx as your reverse proxy.&lt;/li&gt;
&lt;li&gt;Pull the Docker image and start the code-server container (you must be in the &lt;strong&gt;code-server&lt;/strong&gt; directory you created in the first step)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;docker-compose up -d&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;(you can stop the container with &lt;code&gt;docker-compose down&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;You should now have a running version of VSCode in the browser on &lt;a href="http://localhost:8443"&gt;http://localhost:8443&lt;/a&gt; (give it some time, especially if you're using the &lt;code&gt;DOCKER_MODS&lt;/code&gt;). You can check the logs of this container&lt;br&gt;
by running &lt;code&gt;docker logs -f code-server&lt;/code&gt; to see once it's ready.&lt;/p&gt;

&lt;p&gt;If you used the env var &lt;code&gt;PASSWORD&lt;/code&gt; then you should log in with this password (there are also ways to store your password as a hash in the compose file).&lt;/p&gt;

&lt;p&gt;The difficult part is already done, now we only need to get Foam up and running in our browser based VSCode and configure some settings.&lt;/p&gt;

&lt;p&gt;For this you can check out the &lt;a href="https://github.com/foambubble/foam/blob/master/docs/index.md"&gt;Foam Getting Started&lt;/a&gt; guide.&lt;/p&gt;

&lt;p&gt;But basically, you need to either &lt;code&gt;git clone&lt;/code&gt; or just download the&lt;br&gt;
&lt;a href="https://github.com/foambubble/foam-template/archive/master.zip"&gt;zip file&lt;/a&gt; and unzip it in the folder you want to use for your notes (the &lt;strong&gt;notes&lt;/strong&gt; subfolder in this example).&lt;/p&gt;

&lt;p&gt;After opening this folder within your code-server instance (that's why we've created the &lt;strong&gt;notes&lt;/strong&gt; subfolder and added it as a volume to our container), VSCode should display a message about recommended extensions to install for Foam. Install (or review before installing) them.&lt;/p&gt;

&lt;p&gt;Other extensions I'd recommend:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens"&gt;GitLens&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;better Git integration&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gitdoc"&gt;GitDoc&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Allows you to automatically and periodically commit (and push) the changes to your notes to a Git repository of your choice&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode"&gt;Prettier&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;Automatically format your notes, e.g. wrap long lines on Save etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=jsartelle.web-clipper"&gt;Web Clipper&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;A web clipper like Notion has that turns websites into Markdown and stores them in notes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://marketplace.visualstudio.com/items?itemName=vscodevim.vim"&gt;Vim&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;If you're a vim enthusiast like me and need your vim keybindings pretty much everywhere&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here are the global VSCode settings that I've set for myself, feel free to use them to get a good starting point.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"workbench.startupEditor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"newUntitledFile"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"terminal.integrated.shell.linux"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"/bin/bash"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"files.autoSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"off"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"window.autoDetectColorScheme"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.tabSize"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.matchBrackets"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"always"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.minimap.enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"breadcrumbs.enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.renderControlCharacters"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"workbench.sideBar.location"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"left"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"workbench.colorTheme"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Default Dark+"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"gitdoc.autoCommitDelay"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;300000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"workbench.editor.enablePreview"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"workbench.editor.enablePreviewFromQuickOpen"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"foam.openDailyNote.directory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"journal"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"prettier.enable"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"prettier.printWidth"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"prettier.proseWrap"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"always"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"editor.formatOnSave"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"[markdown]"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"editor.defaultFormatter"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"esbenp.prettier-vscode"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"vscodeMarkdownNotes.newNoteDirectory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"WORKSPACE_ROOT"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're done with all these steps, you can start getting to know and using Foam by opening the &lt;code&gt;getting-started.md&lt;/code&gt; file in the &lt;strong&gt;notes&lt;/strong&gt; folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: After you got a good understanding of Foam and deleted the test files (like readme.md, getting-started.md, etc.), you can &lt;code&gt;git init&lt;/code&gt; that folder. With the &lt;strong&gt;GitDoc&lt;/strong&gt; extension (see my&lt;br&gt;
recommended extensions) every change will be periodically commited (and optionally pushed). That way you have unlimited revisions of your private knowledge base.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now you're all set with a fully working, cross platform VSCode and your own privacy respecting and open source Roam Research alternative.&lt;/p&gt;

&lt;p&gt;Coding on an Android tablet / iPad in VSCode (with vim)? Coding on every computer without having to re-configure your environment? Of course you can now also take your notes on every platform. The&lt;br&gt;
possibilities are endless.&lt;/p&gt;

&lt;p&gt;Thank you very much for reading. I hope you're going to have as much fun with your cross platform dev environment and powerful as well as privacy friendly note taking app as me.&lt;/p&gt;

&lt;p&gt;I'm a Berlin based Software Engineer, mainly working with C++, Go and JS in the medical industry. If you want to follow or chat with me, you can find me on Twitter &lt;a href="https://twitter.com/5hay"&gt;@5hay&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>crossplatform</category>
      <category>vscode</category>
      <category>roamresearch</category>
      <category>notes</category>
    </item>
  </channel>
</rss>
