Skip to content

Instantly share code, notes, and snippets.

@Dawit-Sh
Dawit-Sh / tutorial.md
Created August 18, 2024 11:13 — forked from Makeshift/tutorial.md
Tutorial for automatically syncing an Obsidian vault with Git on an Android device

How to sync Obsidian with Git on Android

Limitations

  • If Termux is closed in the background by Android, the cron service will stop updating your repository and you must open Termux again. Refer to instructions for your device model to disable the killing of certain background applications.
  • This may negatively affect your devices battery life. I'm not entirely sure yet.

Setup

@Dawit-Sh
Dawit-Sh / visit-counter.js
Created May 10, 2024 07:41
simple visit counter for testing
if(localStorage.getItem('visitCount')) {
var visitCount = parseInt(localStorage.getItem('visitCount')) + 1;
localStorage.setItem('visitCount', visitCount);
} else {
localStorage.setItem('visitCount', 1);
}
document.write("Number of visits: " + localStorage.getItem('visitCount'));
@Dawit-Sh
Dawit-Sh / install-openbsd.sh
Created May 4, 2024 19:44
Automaticall Setup OpenBSD in qemu
#!/bin/bash
# 4e69676874204b696e67 :/
install_with_apt() {
apt-get update
apt-get install -y qemu-system-x86 qemu-utils
}
install_with_dnf() {
@Dawit-Sh
Dawit-Sh / doom.md
Created October 29, 2023 07:20 — forked from anhedonix/doom.md
Doom Emacs Cheatsheet

Doom Emacs Default keybindings cheetsheet

SPC

  • SPC find file
  • , switch bufferA
  • . browse files
  • : MX
  • ; EX
  • < switch buffer
.PHONY: help
help:
@printf "%s\n" "Useful targets:"
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m make %-15s\033[0m %s\n", $$1, $$2}'
.PHONY: db-reset
db-reset: ## Reset the database
docker-compose exec web flask db reset --with-testdb
.PHONY: routes