shopping list init

main
Mel 3 years ago
parent b6f33bcddf
commit fd7225123b

@ -16,12 +16,11 @@
"obsidian-dice-roller",
"obsidian-pocket",
"note-refactor-obsidian",
"code-block-copy",
"meld-encrypt",
"find-and-replace-in-selection",
"obsidian-auto-link-title",
"obsidian-itinerary",
"file-tree-alternative",
"customjs",
"obsidian42-brat"
"obsidian42-brat",
"code-block-copy"
]

@ -1,22 +0,0 @@
{
"ribbonIcon": true,
"showRootFolder": true,
"showFilesFromSubFolders": true,
"searchFunction": true,
"showFilesFromSubFoldersButton": true,
"excludedExtensions": "",
"excludedFolders": "",
"folderIcon": "default",
"folderCount": true,
"folderCountOption": "notes",
"evernoteView": true,
"filePreviewOnHover": false,
"sortFilesBy": "name",
"fixedHeaderInFileList": false,
"openFolders": [
"/"
],
"pinnedFiles": [],
"customHeight": 0,
"activeFolderPath": "02.01 London"
}

File diff suppressed because one or more lines are too long

@ -1,10 +0,0 @@
{
"id": "file-tree-alternative",
"name": "File Tree Alternative Plugin",
"version": "1.5.7",
"minAppVersion": "0.9.12",
"description": "This plugin allows you to have an alternative file tree view.",
"author": "Ozan Tellioglu",
"authorUrl": "https://www.ozan.pl",
"isDesktopOnly": false
}

@ -1,235 +0,0 @@
.oz-file-tree-header {
height: 22px;
color: var(--text-normal);
font-size: 15px;
font-weight: bold;
text-align: center;
}
.oz-nav-action-button {
color: var(--text-normal);
display: inline-block;
padding: 3px 0px 0 3px !important;
}
.oz-input-container {
margin-bottom: 3px !important;
margin-top: 3px !important;
height: 30px;
}
.oz-nav-buttons-right-block {
text-align: right;
}
.oz-nav-file-title {
padding-left: 2px !important;
padding-right: 2px !important;
}
div.workspace-leaf-content[data-type='file-tree-view'] > div.view-content {
padding: 10px 5px 5px 5px;
}
.oz-flex-container {
display: flex;
flex-direction: row;
justify-content: space-between;
height: 26px;
}
.is-mobile .oz-flex-container {
height: 31px;
}
.oz-explorer-container {
padding-left: 3px !important;
padding-right: 3px !important;
}
.oz-file-tree-files {
padding-top: 3px !important;
}
.drag-entered,
.oz-folder-element:hover,
.oz-nav-file:hover {
background-color: var(--text-selection);
}
.oz-folder-contents {
will-change: transform, opacity, height;
margin-left: 6;
padding: 4px 0px 0px 14px;
border-left: 1px dashed;
border-left-color: var(--text-muted);
font-size: 12.8px;
}
.oz-folder-toggle {
width: 1em;
height: 1em;
margin-right: 10px;
cursor: pointer;
vertical-align: middle;
}
.treeview {
position: relative;
padding: 4px 0px 0px 0px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
vertical-align: middle;
}
.oz-folder-type {
text-transform: uppercase;
font-family: monospace;
font-size: 0.6em;
vertical-align: middle;
display: inline-block;
}
.oz-folder-name {
vertical-align: middle;
display: inline-block;
color: var(--text-normal);
font-size: 13px;
}
div.oz-folder-name.is-root-folder {
font-size: 16px;
}
.is-mobile .oz-folder-name.is-root-folder {
font-size: 18px;
}
.is-mobile .oz-folder-name {
font-size: 15.5px;
}
.is-mobile div.oz-nav-file-title .nav-file-title-content {
font-size: 15px;
}
.oz-icon-div {
display: inline-block;
}
.oz-folder-block {
display: inline-block;
width: 100%;
}
.oz-folder-count.no-root {
float: right;
padding-right: 25px;
}
.oz-folder-count.with-root {
float: right;
padding-right: 32px;
}
.oz-folders-tree-wrapper {
overflow: hidden;
overflow-y: auto;
padding-bottom: 5px;
padding-left: 8px;
height: 100%;
}
.oz-folder-element {
line-height: 1.35em;
padding: 0px 0px 0px 0px;
}
.oz-input-container > input {
padding-left: 8px;
padding-right: 4px;
}
.oz-nav-action-button:hover {
color: var(--interactive-accent);
}
.oz-nav-action-button .fa-lg {
font-size: 1.15em;
}
.file-tree-container {
display: flex;
flex-direction: column;
height: 100%;
max-height: 100%;
}
.file-tree-plugin-view {
height: 100%;
}
.oz-folder-pane {
display: block;
width: 100%;
overflow-y: auto;
height: 50%;
resize: vertical;
}
.oz-file-list-pane {
display: block;
width: 100%;
overflow-y: auto;
flex: 1;
}
.oz-coffee-div {
text-align: center;
margin-top: 20px;
}
#file-tree-divider {
height: 2.5px;
background-color: var(--text-muted);
cursor: row-resize;
}
.is-folder-active {
color: var(--text-accent);
font-weight: bold;
}
.file-tree-header-fixed {
position: fixed;
width: 100%;
left: 0;
padding-left: 4px;
padding-right: 4px;
background-color: var(--background-secondary);
}
.file-tree-files-fixed {
padding-top: 50px !important;
display: flex;
flex-direction: column;
}
.is-mobile .file-tree-files-fixed {
padding-top: 55px !important;
}
.file-tree-files-fixed-with-search {
padding-top: 80px !important;
display: flex;
flex-direction: column;
}
.is-mobile .file-tree-files-fixed-with-search {
padding-top: 85px !important;
}
svg.oz-folder-toggle path {
fill: var(--interactive-accent);
}

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
{
"id": "meld-encrypt",
"name": "Meld Encrypt",
"version": "1.4.2",
"version": "1.5.1",
"minAppVersion": "0.12.15",
"description": "Hide secrets in your notes",
"author": "meld-cp",

@ -1 +1,38 @@
Not Found
.meld-e-row{
display: flex;
margin-bottom: 1em;
}
.meld-e-icon{
flex: 1;
display: inline-block;
margin-right: 1em;
}
.meld-e-row input{
flex: 20;
}
.meld-e-platform-desktop .meld-e-button-confirm {
margin-left: 2.8em;
padding: 1em 2em;
}
.meld-e-platform-desktop .meld-e-button-confirm:focus{
font-weight: bold;
}
.meld-e-message{
margin-left: 2.8em;
margin-bottom: 1em;
}
.meld-e-button-next{
margin-left: 1em;
flex: 3;
}
.meld-e-platform-mobile .meld-e-button-next{
display: inline-block;
margin: 0 0 0 1em;
width: auto;
}

@ -92,8 +92,8 @@
}
},
"syntaxHighlight": false,
"copyButton": false,
"version": "6.3.5",
"copyButton": true,
"version": "6.4.1",
"autoCollapse": false,
"defaultCollapseType": "open",
"syncLinks": true,

File diff suppressed because one or more lines are too long

@ -1,7 +1,7 @@
{
"id": "obsidian-admonition",
"name": "Admonition",
"version": "6.3.5",
"version": "6.4.1",
"minAppVersion": "0.11.0",
"description": "Admonition block-styled content for Obsidian.md",
"author": "Jeremy Valentine",

@ -36,6 +36,7 @@
justify-content: center;
margin: 0 0.5em 0 0.25em;
min-width: 1em;
width: min-content;
}
.admonition-title-markdown {
@ -259,3 +260,4 @@ input.is-invalid {
box-shadow: 0px 0px 5px rgb(0 0 0 / 50%);
border-color: var(--background-modifier-border-focus);
}

@ -7,11 +7,8 @@
"id": "c1cbd199334b4022",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "00.01 Admin/Templates/NewFile1.md",
"mode": "source"
}
"type": "empty",
"state": {}
}
}
],
@ -54,14 +51,6 @@
"useHierarchy": true
}
}
},
{
"id": "dc65fd5a9b9d6216",
"type": "leaf",
"state": {
"type": "file-tree-view",
"state": {}
}
}
],
"currentTab": 0
@ -76,7 +65,6 @@
"state": {
"type": "backlink",
"state": {
"file": "00.01 Admin/Templates/NewFile1.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -115,15 +103,15 @@
},
"active": "c1cbd199334b4022",
"lastOpenFiles": [
"00.01 Admin/Templates/NewFile1.md",
"01.01 Life Orga/@Life Organisation.md",
"01.02 Home/MRCK.md",
"02.01 London/@@London.md",
"02.02 Paris/@@Paris.md",
"03.02 Travels/@Travels.md",
"03.01 Reading list/@Reading master.md",
"06.02 Investments/@Investment Task master.md",
"06.02 Investments/@Investment master.md",
"05.02 Networks/@Networks.md"
"03.02 Travels/Turkey.md",
"05.02 Networks/VPS Console Dialogue.md",
"05.02 Networks/Server VPN.md",
"05.02 Networks/Server Tools.md",
"05.02 Networks/Server Cloud.md",
"05.02 Networks/Server Alias.md",
"05.02 Networks/Selfhosting.md",
"05.02 Networks/Configuring UFW.md",
"05.02 Networks/Configuring Postfix.md",
"05.02 Networks/Configuring Monit.md"
]
}

@ -1,12 +1,8 @@
class templaterFunc {
createNewFile(tp) {
const fileName = this.getUserInput(tp, "File name")
const templateName = this.getUserInput(tp, "File name")
return tp.file.create_new(tp.file.find_tfile("Template ") + templateName, filename, true, tp.file.folder())
createNewFile(tp, templatelist) {
const fileName = await tp.system.prompt("File name")
const templateName = await tp.system.suggester(templatelist, templatelist)
return tp.file.create_new(tp.file.find_tfile("Template ") + templateName, fileName, tp.file.folder())
}
getUserInput(tp, promptScript) {
const tempresult = await tp.system.prompt(promptScript)
return tempresult
}
}

@ -1,4 +1,5 @@
<%*
const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS
templaterFunc.createNewFile(tp)
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
tp.file.content.replace(/[\w\W]+?\n+?/,"")
%>

@ -1,5 +1,5 @@
```ad-code
~~~
~~~bash
<% tp.file.selection() %>
~~~
```

@ -1,5 +1,3 @@
```ad-path
~~~
<% tp.file.selection() %>
~~~
```

@ -13,24 +13,80 @@ ChildrenType: ["Note", "Task", "Recipe"]
```button
name Create Note
type append template
action NewFile2
action NewFile1
color blue
templater true
```
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
tp.file.content.replace(/[\w\W]+?\n+?/,"")
%>
const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS
templaterFunc.createNewFile(tp)
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].api.customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const templaterFunc = this.app.plugins.plugins["CustomJS"].api.customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const templaterFunc = this.app.plugins.plugins["CustomJS"].customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const {templaterFunc} = customJS
templaterFunc.createNewFile(tp)
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const {templaterFunc} = app.plugins.plugins.CustomJS
templaterFunc.createNewFile(tp)
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].api.customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const {templaterFunc} = customJS
templaterFunc.createNewFile(tp)
const {templaterFunc} = this.app.plugins.plugins["CustomJS"].customJS
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const {templaterFunc} = this.app.plugins.plugins["CustomJS"]
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
tR += const {templaterFunc} = this.app.plugins.plugins["CustomJS"]
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
tR += const {templaterFunc} = this.app.plugins.plugins["customJS"]
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
tR += const {templaterFunc} = this.app.plugins.plugins["customJS"].api
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
tR += const {templaterFunc} = this.app.plugins.plugins["CustomJS"].api
templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
tR += const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS
%>
<% templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType) %>
tR += const {templaterFunc} = customJS
%>
<% templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType) %>
const templaterFunc = customJS
tR += templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const templaterFunc = tp.obsidian.plugins.plugins.CustomJS
tR += templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>
const {templaterFunc} = tp.obsidian.plugins.plugins.CustomJS
tR += templaterFunc.createNewFile(tp, tp.frontmatter.ChildrenType)
%>

@ -0,0 +1,105 @@
class shoppingFunc {
getNewItems(args) {
const {
dv,
catItem
} = args;
return 0
}
getItems2Change(args) {
const {
that,
app,
dv,
luxon,
theme,
} = args;
const { metaedit, buttons } = app.plugins.plugins
const { update } = metaedit.api
const { createButton } = buttons
const btnStr = this.getBtnName(theme)
const updateSct = "Groceries"// await app.obsidian.system.suggester(["groceries", "health", "household"], ["groceries", "health", "household"]); //"Groceries"
const updateStr = this.getPoint(dv, updateSct)
return dv.el('p',
createButton({
app,
el: that.container,
args: { name: btnStr, color: 'blue' },
clickOverride: { click: update, params: [updateSct, updateStr, dv.current().file.path]}
}),
)
}
getBtnStrings(dv, oprType) {
let categItems = ["groceries", "health", "household"];
let tempRes1 = "Test" //await app.system.suggester(catItems, catItems);
let tempRes2 = "Test"
switch(oprType) {
case 'to0':
tempRes2 = "Test"
break;
case 'add':
// const listItems = this.getNewItems(dv, catItem: updateSct);
tempRes2 = "Test" ////await dv.system.suggester(listItems, listItems);
break;
}
return tempRes2
}
getBtnName(arg1) {
let tempresult = "Test";
switch(arg1) {
case 'to0':
tempresult = "Reset shopping list"
break;
case 'add':
tempresult = "Add an item"
break;
}
return tempresult
}
getPoint(p, datapoint) {
let result = null
switch(datapoint) {
case 'Groceries':
result = p.Groceries
break;
case 'Health':
result = p.Health
break;
case 'Household':
result = p.Household
break;
case 'type':
result = p.DocType
break;
case 'createddate':
result = p.Date
break;
case 'tag':
result = p.Tag
break;
case 'hierarchy':
result = p.Hierarchy
break;
case 'alias':
result = p.Alias
break;
case 'location':
result = p.location
break;
}
return result
}
}

@ -0,0 +1,23 @@
const {globalFunc} = customJS;
let {items} = input;
let ing = [];
let j = 0;
if (!Boolean(items)) {
return "⚠️ <b>Warning</b>\nYou have not specified ahoppong items!\n<b>The shopping list cannot be printed.</b>"
}
for (let i = 0; i < items.length; i++) {
let name = items[i].replace(items[i].split(" ")[0] + " " + items[i].split(" ")[1]+ " " + items[i].split(" ")[2], "");
let unit = items[i].split(" ")[2];
if (unit.contains('whole')) {unit = ""}
let amount = items[i].split(" ")[1];
let emoji = items[i].split(" ")[0];
if (amount > 0) {
ing[j] = emoji + " " + amount + " " + unit + " <b>" + name + "</b>"
j++
}
}
dv.el('p', globalFunc.BuildList(ing, "\n"))

@ -0,0 +1,126 @@
---
Alias: ["Shopping list"]
Tag: ["Groceries"]
Date: 2021-10-25
DocType: "Groceries"
Hierarchy: "NonRoot"
TimeStamp:
location:
CollapseMetaTable: Yes
Groceries:
- 🍶 6 bottle(s) Coke 0
- 🍿 1 whole Snacks
- 🧈 0 packet(s) Beurre
- 🫒 0 bottle(s) Olive oil
- 🍺 0 bottle(s) Beers
- 🥯 0 packet(s) Bagels
- 🍯 1 jar(s) Bonne Maman
- 🍌 6 whole Bananas
- 🧀 0 packet(s) Fromage rape
- 🥩 0 packet(s) Cured meat
- 🍐 6 whole Fruit
- 🍝 2 packet(s) Pasta
- 🌶️ 1 bottle(s) Tabasco
Health:
- 🚿 1 whole shower gel
- 🧴 1 whole shampoo
- 🪥 1 whole toothbrush
- 🦷 1 whole toothpaste
- 👂 1 whole earbuds
- 🪒 1 whole razor blades (mach3)
- 🍦 1 whole shaving cream
- 🧻 1 whole loo rolls
- 🦨 1 whole deo
Household:
- 👔 1 whole Washing gel
- 🧻 1 whole Kitchen towel
- 🧽 1 whole Sponge
- 👕 1 whole Softener
- 🍽️ 1 whole Dishwasher tablets
- 🧂 1 whole Dishwasher salt
- 🚰 1 whole Dishwasher rinsing aid
---
Parent::
---
&emsp;
```button
name Save
type command
action Save current file
id Save
```
^button-ShoppinglistNSave
&emsp;
```dataviewjs
const {shoppingFunc} = customJS
shoppingFunc.getItems2Change({app: app, dv: dv, luxon: luxon, that:this, theme: "to0"})
```
# Shopping list
&emsp;
```ad-abstract
title: Summary
collapse: open
Shopping list management.
```
&emsp;
```toc
style: number
```
&emsp;
---
&emsp;
### Groceries
&emsp;
```dataviewjs
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Groceries})
```
&emsp;
---
&emsp;
### Health
&emsp;
```dataviewjs
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Health})
```
&emsp;
---
&emsp;
### Household
&emsp;
```dataviewjs
dv.view("00.01 Admin/dv-views/print_shoppingitems", {items: dv.current().Household})
```
&emsp;
&emsp;

@ -100,6 +100,8 @@ Paris, Zürich, London
&emsp;
60's is their best decade
&emsp;
---

@ -37,6 +37,11 @@ id CreateNote
```
^button-ReadingNewNote
```button
name Save
type command

@ -145,15 +145,13 @@ sudo chown -R caddy:caddy /var/log/caddy
Caddy's configuration file is inder:
```ad-path
~~~
/etc/caddy/Caddyfile
~~~
```
Default configuration is:
```ad-code
~~~
~~~yaml
(localhost) {
root * /var/www/html
encode gzip zstd
@ -176,15 +174,13 @@ Default configuration is:
To update php, edit the following file:
```ad-path
~~~
sudo nano /etc/php/7.4/fpm/pool.d/www.conf
~~~
/etc/php/7.4/fpm/pool.d/www.conf
```
Change all 'www-data' user reference with 'caddy' including:
```ad-code
~~~
~~~yaml
listen.owner = caddy
listen.group = caddy
~~~
@ -211,7 +207,7 @@ sudo systemctl restart php7.4-fpm
##### Preliminary CORS code snippet
```ad-code
~~~
~~~yaml
(cors) {
@origin{args.0} header Origin {args.0}
header @origin{args.0} Access-Control-Allow-Origin "{args.0}"
@ -224,7 +220,7 @@ sudo systemctl restart php7.4-fpm
##### CORS for a sub-domain
```ad-code
~~~
~~~yaml
import cors (http://subdomain.tld)
header Access-Control-Allow-Methods "POST, GET, OPTIONS, PUT"
header Access-Control-Allow-Headers "*"
@ -242,7 +238,7 @@ sudo systemctl restart php7.4-fpm
Configuration requires to add the following in the sub-domain definition:
```ad-code
~~~
~~~yaml
handle_path /(suffix)* {
root * /(path to suffix)
file_server
@ -261,7 +257,7 @@ Configuration requires to add the following in the sub-domain definition:
Configuration of a service attached to the docker network is easy:
```ad-code
~~~
~~~yaml
(hostname) {
encode zstd gzip
reverse_proxy xxx.yyy.zzz.aaa:port
@ -297,7 +293,7 @@ caddy hash-password
2. **Define the array of users and hashed password**
```ad-code
~~~
~~~yaml
(basic-auth) {
basicauth / {
user hashed-password
@ -309,7 +305,7 @@ caddy hash-password
3. **Define the snippet to test whether the cookie is installed**
```ad-code
~~~
~~~yaml
(proxy-auth) {
% if cookie not = some-token-nonsense
@no-auth {
@ -332,7 +328,7 @@ caddy hash-password
After setting up a new subdomain/page and appropriate DNS records, define it as follows:
```ad-code
~~~
~~~yaml
auth.example.com {
route / {
% require authentication
@ -361,7 +357,7 @@ auth.example.com {
Simply add the following at the top of all declarations for sub-domain definitions:
```ad-code
~~~
~~~yaml
import proxy-auth
~~~
```
@ -381,9 +377,7 @@ import proxy-auth
Look for a folder with the following sequence:
```ad-path
~~~
/.local/share/caddy
~~~
```
&emsp;

@ -181,7 +181,7 @@ Maintaining containers with docker is arduous and easier to do with docker-compo
Easiest is to create aliases in the .bashrc of home directory by adding:
```ad-code
~~~
~~~bash
alias dc-up='sudo docker-compose --compatibility up -d'
alias dc-update='sudo docker-compose pull && sudo docker-compose --compatibility up -d'
alias dc-update-all='for d in ./*/ ; do (cd "$d" && dc-update); done'
@ -191,9 +191,7 @@ alias dc-update-all='for d in ./*/ ; do (cd "$d" && dc-update); done'
To the following file:
```ad-path
~~~
~/.bashrc
~~~
```
The command needs to be run periodically.
@ -229,15 +227,13 @@ sudo systemctl stop docker
2. **Edit the json config file**
```ad-path
~~~
/var/lib/docker/containers/(container id)/config.v2.json
~~~
```
Within the 'Env' declaration, add the requested data field:
```ad-code
~~~
~~~bash
"DATA_FIELD=data_value"
~~~
```

@ -120,15 +120,13 @@ Once set up, the next step is to enable the web interface.
The following configuration file need to be amended:
```ad-path
~~~
/etc/monit/monitrc
~~~
```
By unchecking the following:
```ad-code
~~~
~~~bash
set httpd port 2812
allow admin:monit
~~~
@ -157,15 +155,13 @@ sudo ufw allow 2812
The following configuration file need to be amended:
```ad-path
~~~
/etc/monit/monitrc
~~~
```
By unchecking the following:
```ad-code
~~~
~~~bash
set mailserver localhost
set mail-format { from: monit@(localhost)
set alert (dest email address)
@ -223,7 +219,7 @@ sudo touch /etc/monit/conf-available/(processname)
Edit the document with at least the below declarations:
```ad-code
~~~
~~~bash
check process (processname) matching "(processname)"
start program = "(path to command)"
stop program = "(path to command)"
@ -257,7 +253,7 @@ sudo chmod 711 /etc/monit/scripts/check_container_(container name).sh
2. Edit the script
```ad-code
~~~
~~~bash
#! /bin/bash
docker top "(container name)"
exit $?
@ -275,7 +271,7 @@ sudo touch/vi /etc/monit/conf-available/(container name)
4. Edit the config file
```ad-code
~~~
~~~bash
CHECK PROGRAM (container name) WITH PATH /etc/monit/scripts/check\_container_(container name).sh
START PROGRAM = "/usr/bin/docker start (container name)"
STOP PROGRAM = "/usr/bin/docker stop (container name)"

@ -95,9 +95,7 @@ The basic configuration is run in detail below.
#### Main.cf
[[#^Top|TOP]]
```ad-path
~~~
/etc/postfix/main.cf
~~~
```
Edit the file whilst editing the following values:
@ -107,7 +105,7 @@ Edit the file whilst editing the following values:
```ad-code
title: main.cf
~~~
~~~bash
###### POSTFIX config file, adapted for SimpleLogin
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
@ -180,16 +178,14 @@ smtpd_recipient_restrictions =
#### relay domains
[[#^Top|TOP]]
```ad-path
~~~
/etc/postfix/pgsql-relay-domains.cf
~~~
```
Below is the default config for the file (replace mydomain.com with relevant value):
```ad-code
title: master.cf
~~~
~~~bash
###### postgres config
hosts = localhost
user = myuser
@ -206,16 +202,14 @@ query = SELECT domain FROM custom_domain WHERE domain='%s' AND verified=true
#### transport maps
[[#^Top|TOP]]
```ad-path
~~~
/etc/postfix/pgsql-transport-maps.cf
~~~
```
Below is the standard declaration of the file (replace mydomain.com with the relevant value):
```ad-code
title: pgsql-transport-maps.cf
~~~
~~~bash
###### postgres config
hosts = localhost
user = myuser
@ -280,9 +274,7 @@ Definition of permitted networks to restrict access (in [[Configuring Postfix#Ma
##### Submission/SMTPD
```ad-path
~~~
/etc/postfix/master.cf
~~~
```
Options are coded in the file by default. Uncheck necessary directives.

@ -237,9 +237,7 @@ The service itself does not require particular management as all features are em
Parameters can only be amended through the config file under the root user:
```ad-path
~~~
sudo vim ~/simplelogin.env
~~~
```
Sample configs can be found [here](https://github.com/simple-login/app/blob/master/example.env)

@ -135,11 +135,9 @@ A comprehensive tutorial on the MPM switch can be found [here](https://www.digit
**php.ini** files can be found at:
```ad-path
~~~
/etc/php/7.4/fpm/php.ini
/etc/php/7.4/apache2/php.ini
/etc/php/7.4/cli/php.ini
~~~
```
&emsp;
@ -157,14 +155,12 @@ Nothing particular to note on MySQL apart from initial set-up and user managemen
Configuration file is under:
```ad-path
~~~
/etc/mysql/mysql.conf.d/mysqld.cnf
~~~
```
```ad-code
title: Optimise memory usage of mysql
~~~
~~~yaml
[mysqld]
% Disable performance schema to hugely reduce RAM usage
performance_schema = OFF
@ -212,8 +208,8 @@ sudo crontab -u www-data -e
2. **Add cronjob**
```ad-code
~~~
\*/5 * * * * php -f /var/www/html/nextcloud/cron.php --define apc.enable_cli=1
~~~bash
*/5 * * * * php -f /var/www/html/nextcloud/cron.php --define apc.enable_cli=1
~~~
```
@ -292,9 +288,7 @@ From the server's command line, Nextcloud offers the ability to perform some tas
[[Nextcloud]] offers a command-line tool which permission needs to be set to "executable". It is located here:
```ad-path
~~~
/var/www/html/nextcloud/occ
~~~
```
The tool needs to be invoked by the "www-data" user and compiled with PHP:
@ -380,17 +374,13 @@ rclone sync source:'datapath' dest:'datapath'
1. **Local file structure**
```ad-path
~~~
/var/www/html/nextcloud/data/USERNAME/files
~~~
```
2. **Webdav file structure**
```ad-path
~~~
/remote.php/dav/files/USERNAME
~~~
```
&emsp;

@ -164,7 +164,7 @@ sudo nano /etc/fail2ban/jail.d/sshd.local
With the following parameters:
```ad-code
~~~
~~~yaml
[sshd]
enabled = true
port=2227
@ -284,15 +284,11 @@ title: service parameters
2 files are used to configure the service:
```ad-path
~~~
~/standalone/.env
~~~
```
```ad-path
~~~
~/standalone/docker/auth/.env
~~~
```
Docs can be found [here](https://docs.standardnotes.com/self-hosting/docker).
@ -404,9 +400,7 @@ User management has not been parametered to exclude new users but an admin panel
```ad-path
title: Config file
~~~
~/gitea/gitea/gitea/conf/app.ini
~~~
```
&emsp;
@ -414,7 +408,7 @@ title: Config file
```ad-code
title: email setup
Gitea can work on internal mail points through:
~~~
~~~bash
ENABLED = true
FROM = (user addresss)
USE_SENDMAIL = false
@ -457,9 +451,7 @@ List of monitored services:
#### Cert storage
```ad-path
~~~
/var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/
~~~
```
&emsp;

@ -134,7 +134,7 @@ sudo nano /etc/fail2ban/jail.d/sshd.local
With the following parameters:
```ad-code
~~~
~~~yaml
[sshd]
enabled = true
port=2227
@ -192,16 +192,12 @@ title: wireguard installer
```ad-path
title: Client Config files
~~~
/home/melchiorbv/wg0-client-(clientname).conf
~~~
```
```ad-path
title: Server Config file
~~~
/etc/wireguard/wg0.conf
~~~
```
&emsp;
@ -221,7 +217,7 @@ title: In `~` for `melchiorbv`
```ad-code
title: WireGuard config
~~~
~~~bash
IPv4 or IPv6 public address: 5.135.0.192
Public interface: eth0
WireGuard interface name: wg0

@ -252,7 +252,7 @@ touch/vim ~/.ssh/config
The declaration of a connection follows this nomenclature:
```ad-code
~~~
~~~bash
Host (scriptname) (serverIP)
HostName (serverIP)
IdentityFile ~/.ssh/(private key path)
@ -284,7 +284,7 @@ sudo (nano/vim) /etc/ssh/sshd_config
The following parameters enable to restrict access to the server:
```ad-code
~~~
~~~javascript
// Enables SSH Key authentication
PubkeyAuthentication yes
@ -606,9 +606,7 @@ mkdir sys
Check:
```ad-path
~~~
/etc/udev/rules.d/70-persistent-net.rules
~~~
```

Loading…
Cancel
Save