Skip to content

Instantly share code, notes, and snippets.

View bunsyy's full-sized avatar

Bunsy Chhay bunsyy

View GitHub Profile
@bunsyy
bunsyy / obsidian-git-first-time.md
Last active July 24, 2024 09:04
How I initialize Git in Obsidian with Github.

Adding Git to Your Obsidian

  1. Install Obsidian Git Plugin
  2. Setup SSH key
  3. Create a new repository for Obsidian Git
  4. Copy SSH URL
  5. In Obsidian, run command Git: Edit remotes and paste the SSH URL then select ....
  6. In Obsidian, run command Git: Initialize a new repo.
  7. In Obsidian, run command Git: Commit all changes.
  8. Using OS terminal or VSCode terminal, navigate to the vault and run git remote add origin .
@bunsyy
bunsyy / [README] - How I use Poetry with Jupyter Notebook in VSCode.md
Last active February 11, 2025 09:11
How I use Poetry with Jupyter Notebook in VSCode

Note

  • You can copy any part that you want. Feel free!
  • You can skip Step 1 and 2 if you aleady installed Poetry.

Poetry Setup Guide

Step 1 - Install Poetry

python3 -m pip install poetry
@bunsyy
bunsyy / 1-new-directory.sh
Last active May 7, 2024 07:48
Unleash Your Machine Learning Models: How to Customize Ollama's Storage Directory
mkdir /home/ollama/models
@bunsyy
bunsyy / scripts.md
Created March 21, 2024 05:38
Everything you need to test when syncing FormKH with FormSG

Scripts

  • Test if the backend is working
npm run build:backend
@bunsyy
bunsyy / docker.md
Created March 5, 2024 13:59
Docker Configuration for Mac Users

Problem

By default, Docker uses maximum CPU limit, Memory Limit, and Swap of your Mac. This leads to high CPU consumption and causes heat inside your mac. To address this, we can change the setting of the resources:

  • CPU Limit: 4
  • Memory Limit: 4GB
  • Swap: 1GB
@bunsyy
bunsyy / Obsidian Awesome Community Plugins.md
Last active May 7, 2024 09:10
🔮 Obsidian - Awesome Community Plugins

List

  1. Advanced Tables
  2. Dataview
  3. Excalidraw
  4. File Creation and Last Modified Timestamps in Status Bar
  5. Google Calendar
  6. Linter
  7. Outliner
  8. Plugin Update Tracker
  9. Projects
@bunsyy
bunsyy / README.md
Created January 10, 2024 09:28
Git Reset by Commit

Git Reset

Just note to use the last_working_commit_id, when reverting a non-working commit

git reset --hard <last_working_commit_id>

So we must not reset to the commit_id that we don't want.

Then sure, we must push to remote branch:

@bunsyy
bunsyy / README.md
Last active January 8, 2024 08:45
✨ Awesome Git Command Lines

Checkout to a Specific PR

git fetch upstream pull/ID/head && git checkout FETCH_HEAD
@bunsyy
bunsyy / Docker.md
Last active March 29, 2024 02:32
How to Fresh Start your Docker

How to Fresh Start your Docker

NOTE: Deleting volumes will wipe out their data. Back up any data that you need before deleting a container.

Procedure

  1. Stop all containers:
docker-compose down
@bunsyy
bunsyy / countryRegionKhmer.json
Last active September 25, 2023 02:38
A list of country region in Khmer and English
"countryRegionKh": {
"Afghanistan": "អាហ្គានីស្ថាន",
"Albania": "អាល់បានី",
"Algeria": "អាល់ហ្សេរី",
"American_Samoa": "សាម័រអាមេរិក",
"Andorra": "អង់ដូរ៉ា",
"Angola": "អង់ហ្គោឡា",
"Anguilla": "អង់ហ្គីឡា",
"Antigua": "អង់ទីហ្គា",
"Argentina": "អាហ្សង់ទីន",