Merge pull request 'added vault builder from public tag documents' (#1) from master into main
Reviewed-on: #1
This commit is contained in:
@@ -6,10 +6,12 @@ ENV FLASK_DEBUG=$DEBUG_MODE
|
||||
ENV FLASK_APP=app.py
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 443
|
||||
ENTRYPOINT ["flask"]
|
||||
|
||||
15
build.sh
Executable file
15
build.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#! /bin/sh
|
||||
|
||||
#check for user args
|
||||
if [ -z "$1" ]; then
|
||||
echo no args
|
||||
elif [ "$1" = "-b" ]; then
|
||||
build="--build"
|
||||
echo building
|
||||
elif [ "$1" = "-d" ]; then
|
||||
up="-d"
|
||||
echo daemon
|
||||
fi
|
||||
|
||||
docker compose down
|
||||
docker compose up $up $build
|
||||
@@ -1,7 +1,6 @@
|
||||
services:
|
||||
ccu-host:
|
||||
app:
|
||||
build:
|
||||
# context: /home/venus/code/crimson-clinic/Dockerfile
|
||||
context: app
|
||||
args:
|
||||
- DEBUG_MODE=1
|
||||
@@ -9,3 +8,9 @@ services:
|
||||
- '80:80'
|
||||
volumes:
|
||||
- ./content:/content
|
||||
public_vault_builder:
|
||||
build:
|
||||
context: public_vault_builder
|
||||
volumes:
|
||||
- ${obsidian_vault}:/vault
|
||||
- ./public_vault:/content
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# This is a test
|
||||
and this is p
|
||||
*italics*
|
||||
|
||||
75
public_vault/Cyber-Crime.md
Normal file
75
public_vault/Cyber-Crime.md
Normal file
@@ -0,0 +1,75 @@
|
||||
#public
|
||||
- **Cyber Crime**: Use computer/digital device to further illegal ends
|
||||
> "nothings black and white in what we do, everything's got some gray"
|
||||
## Types of crime
|
||||
- **Crimes Against People**: A digital crime where the victim is a person
|
||||
- **Crimes Against Property**: A digital crime that damages, or illegally interacts with property
|
||||
- **Crimes Against Government**: A digital crime to undermine the efficacy of a government
|
||||
> Life is not Black and White, Consider what the greatest impact is
|
||||
|
||||
| Crime | category |
|
||||
| --- | --- |
|
||||
| Harrassement | People |
|
||||
| Stalking | People |
|
||||
| Credit Card fraud | People |
|
||||
| Id theft | People |
|
||||
| DOS attack | Property |
|
||||
| Hacking | Property |
|
||||
| Vandalism | Property |
|
||||
| Cyber Warfare | Government|
|
||||
| Cyber Terrorism | Government|
|
||||
|
||||
> Online Harassment is a growing field, stalking, bullying, doxing, etc.
|
||||
|
||||
> Modern wars be started with infrastructure hacks, Power grid hacks of Ukraine, Iran, Etc.
|
||||
|
||||
### Cyber-stalking and bullying
|
||||
- **Cyber Bulling**: People attacking reputation and self esteem of other people trough online means like social media campaigns.
|
||||
- **Cyber Stalking**: Stalking someone through their online footprint. Often to find information with which to exploit the victim.
|
||||
> Typically older person stalking a younger person. As opposed to bullying, which is usually across the same age
|
||||
### Cyber Terrorism
|
||||
- **Cyber Terrorism**: Politically motivated attacks on major infrastructure Money can be a factor, but usually the political is the primary motivation
|
||||
- Instill fear in a society to elicit some reaction
|
||||
- financial/reputation gain
|
||||
- revenge
|
||||
- etc.
|
||||
|
||||
## Examples
|
||||
Stux-Net
|
||||
Nation-state attacks on power grids before Wars
|
||||
|
||||
- **Sneaker Net**: Moving information across barriers physicality
|
||||
> proving an attack is one of the hardest questions to answer
|
||||
# U.S. National cyber strategy
|
||||
- **U.S. National cyber strategy**: anually updated policy document from the white house detailing the national cyber objectives
|
||||
|
||||
> it has been similar last few years
|
||||
|
||||
- promote American people
|
||||
- promoting American prosperity
|
||||
- preserve peace through strength
|
||||
- deterrent
|
||||
- advanced American cyber influence
|
||||
- strong alliances
|
||||
- promote international policies
|
||||
- Shaping adversary behavior
|
||||
- regulatory environment
|
||||
- Federal government security
|
||||
- criticial infrastructure security
|
||||
- cyber skills workforce gap
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
82
public_vault/Website Tutorial.md
Normal file
82
public_vault/Website Tutorial.md
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
tags:
|
||||
- public
|
||||
- notes
|
||||
- tutorial
|
||||
- code
|
||||
- project
|
||||
- blog
|
||||
---
|
||||
# So you need a website
|
||||
## Overview
|
||||
1. How do websites work
|
||||
2. 3 things that you need
|
||||
3. What are your options
|
||||
1. Premium
|
||||
2. Custom
|
||||
3. DIY
|
||||
1. Registering a domain
|
||||
1. What is DNS
|
||||
2. Picking a domain
|
||||
3. setting up a registrar
|
||||
2. Building a frontend
|
||||
1. Chat GPT
|
||||
2. DeepSite
|
||||
3. DIY options
|
||||
4. UX and frontend resources
|
||||
3. Setting up GH pages
|
||||
1. GH account
|
||||
2. Set up New Repo
|
||||
3. Importing Code
|
||||
4. Setting the DNS
|
||||
## how do websites work
|
||||
There are 3 main elements of the internet: your computer, the website's code, and the path between the two.
|
||||
You can download [this page]() and open it in your computer. Notice how your browser's address doesn't say "Https://%url%" but instead shows a file location on your own machine.
|
||||
The internet is the same phenomenon, but between multiple computers. URL, (the technical name for a link, or website address) simply stands for Universal Resource Locator and is just a way of telling your computer how to access a file on someone else's computer.*
|
||||
There are lots of complicated standards for how computers actually talk to each other. The most relevant here is DNS, which stands for Domain Name System. It is how we assign internet-connected computers (called servers) with human readable names. There are special DNS servers which are responsible for telling your computer where in the world a specific website is stored.
|
||||
A URL, a frontend, and server to host it are all that you need to create a website. I will explain how to simply and affordably (or even for free) set up each of these elements.
|
||||
|
||||
*url's can end in [.pdf](example), [.jpg](example), or other file extensions. Just like files on your computer.*
|
||||
## What do you need
|
||||
### A URL
|
||||
Simply a link that is going to point to your website. You can buy one from a domain registrar and configure it in just a few minutes.
|
||||
### A Website file to display
|
||||
This is what people will see when they visit your website.
|
||||
### A computer to display it on
|
||||
There are myriad ways to accomplish this from renting a server from someone, to putting on in your house, to taking advantage of already free web hosting tools. I'm going to show you how to use GitHub's* free hosting service
|
||||
|
||||
*GitHub is owned by Microsoft and is the largest code distribution and hosting service. Most companies and developers rely on it's services daily.*
|
||||
|
||||
## Getting A Domain
|
||||
The process of registering a domain takes only a few minutes, and a couple of steps.
|
||||
|
||||
There are a number of websites that control who has access to websites, and which servers they point to. They are all basically the same. I've picked out [namecheap](https://namecheap.com) for this tutorial.
|
||||
|
||||
To register a domain just head over to their site, find a domain that you want, and purchase it. Watch out for these:
|
||||
1. First year prices are often discounted. Watch for a renewal rate.
|
||||
2. Save your password somewhere. You will hopefully have this website for a long time, and you may have someone else manage it for you eventually.
|
||||
3. Marketable domains are often short and easy to spell. Imagine verbally telling someone how to visit the website.
|
||||
|
||||
Make sure to verify your email and save your login information, as we will be needing to log back in shortly.
|
||||
|
||||
### Building a frontend
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
7
public_vault/test.md
Normal file
7
public_vault/test.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
public: "true"
|
||||
tags:
|
||||
- public
|
||||
---
|
||||
# This is a test
|
||||
and this is p
|
||||
11
public_vault_builder/Dockerfile
Normal file
11
public_vault_builder/Dockerfile
Normal file
@@ -0,0 +1,11 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
CMD ["python", "build.py"]
|
||||
22
public_vault_builder/build.py
Normal file
22
public_vault_builder/build.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from obsidian_parser import Vault
|
||||
import shutil
|
||||
|
||||
dest = "/content"
|
||||
src = "/vault"
|
||||
# Load a vault
|
||||
vault = Vault(src)
|
||||
|
||||
if vault:
|
||||
print ("found vault")
|
||||
else:
|
||||
print("could not find vault")
|
||||
|
||||
# Find notes by exact name
|
||||
note = vault.get_note("test")
|
||||
|
||||
# Findd all public notes
|
||||
publicNotes = vault.get_notes_with_tag("public")
|
||||
|
||||
for note in publicNotes:
|
||||
print(note.title)
|
||||
shutil.copy2(f"{note.path}", dest)
|
||||
1
public_vault_builder/requirements.txt
Normal file
1
public_vault_builder/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
obsidianmd-parser
|
||||
Reference in New Issue
Block a user