Skip to content

Instantly share code, notes, and snippets.

View pickaxe828's full-sized avatar

Pickaxe828 pickaxe828

  • Asia, China, Hong Kong
View GitHub Profile
@pickaxe828
pickaxe828 / obsidian-livesync-synology.md
Created May 3, 2024 02:12 — forked from gabeosx/obsidian-livesync-synology.md
Obsidian LiveSync Self-Hosted on Synology

Intro

obsidian-livesync is an Obsidian plugin, which allows you to Synchronize your Obsidian vault between devices, using a CouchDB database.

Synology NAS devices offer Docker support, which is a convenient way to host your CouchDB.

Setup the CouchDB container on Synology

Pre-requisites

  1. Create a directory for your Docker data (e.g. /volume1/docker/obsidian-couchdb)
  2. Create a user with permissions to that directory - put them in the users group
@pickaxe828
pickaxe828 / obsidian-livesync-synology.md
Created May 3, 2024 02:12 — forked from gabeosx/obsidian-livesync-synology.md
Obsidian LiveSync Self-Hosted on Synology

Intro

obsidian-livesync is an Obsidian plugin, which allows you to Synchronize your Obsidian vault between devices, using a CouchDB database.

Synology NAS devices offer Docker support, which is a convenient way to host your CouchDB.

Setup the CouchDB container on Synology

Pre-requisites

  1. Create a directory for your Docker data (e.g. /volume1/docker/obsidian-couchdb)
  2. Create a user with permissions to that directory - put them in the users group
@pickaxe828
pickaxe828 / obsidian-livesync-synology.md
Created May 3, 2024 02:12 — forked from gabeosx/obsidian-livesync-synology.md
Obsidian LiveSync Self-Hosted on Synology

Intro

obsidian-livesync is an Obsidian plugin, which allows you to Synchronize your Obsidian vault between devices, using a CouchDB database.

Synology NAS devices offer Docker support, which is a convenient way to host your CouchDB.

Setup the CouchDB container on Synology

Pre-requisites

  1. Create a directory for your Docker data (e.g. /volume1/docker/obsidian-couchdb)
  2. Create a user with permissions to that directory - put them in the users group
@pickaxe828
pickaxe828 / caesar_cipher.js
Created August 10, 2023 08:49
Caesar cipher written in JavaScript. This only works for A-Z. Lowercase and symbols is not shifted intentionally.
// This only works for A-Z. Lowercase and symbols will not be shifted.
let str = "UAMG! VJKU QPNA YQTMU HQT C-B."
let shift = -2
let arr = Array.from(str).map((item) => item.charCodeAt(0))
arr = arr.map((item) => {
if (item >= 65 && item <= 90) { // is A-Z
let temp = item + shift
if (!(temp >= 65 && temp <= 90)) { // result out of bound
if (shift < 0) { return temp + 26 } // if shift is neg