Skip to content

Commit

Permalink
Reinstalled local instance with venv
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwikc committed Aug 8, 2024
1 parent b22667a commit a7edf22
Show file tree
Hide file tree
Showing 31 changed files with 1,537 additions and 17 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .cache/plugin/git-committers/page-authors.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"cache_date": "2024-08-05", "page_authors": {"docs/index.md": {"last_commit_date": "2024-07-31", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/Ksia\u0328z\u0307ka/Lu\u017ane notatki i pomys\u0142y.md": {"last_commit_date": "2024-07-31", "authors": []}, "docs/Untitled.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/00_Strona G\u0142\u00f3wna.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/Digital Garden.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/blog/2021-04-15-budowanie-wiezi-z-dzieckiem-wspolne-przezywanie-emocji.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/ksiazka/Lu\u017ane notatki i pomys\u0142y.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/ksiazka/README.md.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/Obsidian-Dropshare Plugin.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}}}
{"cache_date": "2024-08-08", "page_authors": {"docs/index.md": {"last_commit_date": "2024-07-31", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/Ksia\u0328z\u0307ka/Lu\u017ane notatki i pomys\u0142y.md": {"last_commit_date": "2024-07-31", "authors": []}, "docs/Untitled.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/00_Strona G\u0142\u00f3wna.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/Digital Garden.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/blog/2021-04-15-budowanie-wiezi-z-dzieckiem-wspolne-przezywanie-emocji.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/ksiazka/Lu\u017ane notatki i pomys\u0142y.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/ksiazka/README.md.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}, "docs/Obsidian-Dropshare Plugin.md": {"last_commit_date": "2024-08-03", "authors": [{"login": "ludwikc", "name": "ludwikc", "url": "https://github.com/ludwikc", "avatar": "https://avatars.githubusercontent.com/u/9521799?v=4"}]}}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ site/
ludwikc-pov/private/
ludwikc-pov/personal/
ludwikc-pov/.smart-env/
ludwikc_pov/_templates/
.obsidian/
.pub_blog_temp/
.cache/
Expand Down
5 changes: 5 additions & 0 deletions ludwikc-pov/00_StronaGłówna.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
title: Strona Główna
publish: "true"
slug: home
---


# Hello World

[[Point of View]]

[Point of View](04_digital-garden/Point%20of%20View.md)
14 changes: 13 additions & 1 deletion ludwikc-pov/02_książka/Index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
---
title: Lifehacker
publish: "true"
slug: lifehacker-vol1
---


O książce
O książce


## Współautorzy

Książka jest wspólnym dziełem Hackerów.

Dla ułatwienia tworzenia treści przez osoby nietechniczne, treści serwowane przez innych Hackerów znajdują się w naszym [Toolbox](Toolbox.md)


![](SIADLAK-Screenshot-202408051336wbjsc.png)

16 changes: 15 additions & 1 deletion ludwikc-pov/03_społeczność/Index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
---
title: Hackerzy.pl
publish: "true"
icon: material/dharmachakra
status: new
---


O społeczności Hackerów
# Po co to robię?

Ktoś mógłby zastanawiać się:
> Ej, ale jak już umiesz budować społeczności, to po co oddawać tę wiedzę za darmo?
> Zrób z tego kurs!
I pewnie miałby rację.

Tylko że zbyt wiele razy widziałem, jak ludzie którzy się naprawdę do tego nie nadają zaczynają *tworzyć społeczności*(1) tylko i wyłącznie dlatego że widzę w tym dobry biznes. Idea stworzenia tego frameworku do tworzenia społeczności jest koncert o którym przeczytałem w Open Organization Framework czyli zaprezentowanie "what good looks like". { .annotate }

1. *Tworzyć społeczności* to oczywiście nadużycie. Mam na myśli produktyzowanie i sprzedawanie idei i nadziei, które niespełnione psują rynek dokładnie tak samo, jak zniszczony został termin *coaching*.


12 changes: 12 additions & 0 deletions ludwikc-pov/03_społeczność/Roadmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
title: Untitled
date: 2024-08-05 14:14:13
publish: "true"
slug: hackerzy-roadmap
---
# Roadmap

Tracker rozwoju społeczności Hackerzy.pl



7 changes: 7 additions & 0 deletions ludwikc-pov/03_społeczność/Toolbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: Toolbox Hackerów
date: 2024-08-05 13:38:27
publish: "true"
permalink: toolbox
---
Toolbox jest opartą o Notion bazą wiedzy, współtworzoną przez Hackerów.
68 changes: 68 additions & 0 deletions ludwikc-pov/04_digital-garden/Github and Dreamhost Repos.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
title: Doubling Down on Git
date: 2024-08-05 19:57:33
publish: "true"
slug: git-dreamhost
tags:
- git
- tech
---
# SOP for Working with Static Websites

My SOP on working with static websites involves maintaining the code on GitHub while serving the actual website from Dreamhost. Here is the procedure I follow to set up my workflow:

## Steps

1. **Create a GitHub Repository**
- Create the repository on GitHub as usual.

2. **Clone the Repository to Dreamhost's Domain Folder**
- Clone the repository in the desired domain folder on Dreamhost.

3. **Add a Second Remote Repository**

```sh
git remote -v
origin https://github.com/ludwikc/silnaglowa.pl.git (fetch)
origin https://github.com/ludwikc/silnaglowa.pl.git (push)
```

Add the Dreamhost remote:

```sh
git remote add dreamhost ssh://[email protected]/home/ludwikc/silnaglowa.pl
```

Verify the remotes:

```sh
git remote -v
dreamhost ssh://[email protected]/home/ludwikc/silnaglowa.pl (fetch)
dreamhost ssh://[email protected]/home/ludwikc/silnaglowa.pl (push)
origin https://github.com/ludwikc/silnaglowa.pl.git (fetch)
origin https://github.com/ludwikc/silnaglowa.pl.git (push)
```

4. **Setup Post-Receive Hook on Dreamhost**

Create a post-receive hook script in the `.git/hooks/` directory:

```sh
[ludwikc@dreamhost]$ cat ../silnaglowa.pl/.git/hooks/post-receive
#!/bin/bash
GIT_WORK_TREE=/home/ludwikc/silnaglowa.pl git checkout -f main
```

Make the hook executable:

```sh
chmod +x .git/hooks/post-receive
```

5. **Configure Git to Allow Updating the Current Branch**

```sh
git config receive.denyCurrentBranch updateInstead
```

From this point onward, your workflow should be set up and functional.
25 changes: 25 additions & 0 deletions ludwikc-pov/04_digital-garden/Installing mkdocs on macOS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: Installing mkdocs on macOS
date: 2024-08-08 09:58:20
publish: "true"
slug: mkdocs-install
---

Since `pip` is not supported on macOS, it has to be installed within the virtual environment.

If you've already installed mkdocs system-wide, uninstall it using
```sh
pipx uninstall mkdocs
rm /Users/USER/.local/bin/mkdocs # clear PATH
```


Create virtual environment, install mkdocs, all the plugins and serve the site

```sh
python3.12 -m venv myenv
source myenv/bin/activate
pip install mkdocs
pip install ... # all the plugins requried by your mkdocs.yml
mkdocs serve
```
104 changes: 104 additions & 0 deletions ludwikc-pov/04_digital-garden/Moving Notes based on a Tag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
---
publish: "true"
tags:
- test1
- test2
title: Moving Obsidian Notes
---



This guide shows how to automate Obsidian to move a note to a specific location based on a tag using the Obsidian "Templater" and "Dataview" plugins, along with a bit of custom scripting.

Here's a step-by-step guide to achieve this:

### Step 1: Install Necessary Plugins

1. **Install Templater Plugin:**

- Go to Settings -> Community plugins -> Browse.
- Search for "Templater" and install it.
- Enable the Templater plugin.
2. **Install Dataview Plugin:**

- Go to Settings -> Community plugins -> Browse.
- Search for "Dataview" and install it.
- Enable the Dataview plugin.

### Step 2: Create a Templater Script

Create a script in Templater to move notes based on tags. Templater allows you to run JavaScript within your templates, which you can use to automate the movement of files.

1. **Create a Template Folder:**

- Go to Settings -> Templater -> Template folder location.
- Set a folder where you want to store your templates, e.g., `Templates`.
2. **Create a Script Template:**

- Create a new note in the `Templates` folder named `MoveByTag.md`.
3. **Add Script to Template:**

- Open `MoveByTag.md` and add the following script:

javascript

Copy code

```js
<%*
const dv = this.app.plugins.plugins["dataview"].api;
const {app} = this;
const note = app.workspace.activeLeaf.view.file;
const tags = dv.page(note.path).tags;

// Define tag-to-folder mapping
const tagToFolder = {
"#public": "public_docs",
"#private": "private_docs",
// Add more tag-folder mappings as needed
};

let destinationFolder = null;

// Check tags and determine destination folder
for (const tag of tags) {
if (tagToFolder[tag]) {
destinationFolder = tagToFolder[tag];
break;
}
}

if (destinationFolder) {
const newPath = `${destinationFolder}/${note.name}.md`;
await app.fileManager.renameFile(note, newPath);
new Notice(`Note moved to ${newPath}`);
} else {
new Notice("No matching tag found. Note not moved.");
}
%>


```

### Step 3: Run the Script

1. **Create a New Note with a Tag:**

- Create a new note and add a tag from your mapping (e.g., `#public`).
2. **Run the Templater Script:**

- Open the note you want to move.
- Press `Ctrl+P` (or `Cmd+P` on Mac) to open the command palette.
- Type and select "Templater: Run template".
- Select `MoveByTag` from the template options.

The script will check the tags of the note and move it to the corresponding folder based on the tag-to-folder mapping defined in the script.

### Explanation

- **Templater Plugin:** Allows running custom JavaScript scripts in templates.
- **Dataview Plugin:** Used to access the metadata of the notes, such as tags.
- **Script Logic:** The script checks the tags of the active note and moves it to a predefined folder based on the tag.

This approach automates the process of moving notes to specific folders based on their tags, leveraging Obsidian's plugin ecosystem.
Loading

0 comments on commit a7edf22

Please sign in to comment.