Compare commits

..

23 Commits

Author SHA1 Message Date
4f2c59ee37 [Slide] Selfhosting 2025-10-12 20:18:33 +02:00
c227dbbad0 [Slide] Kombucha 2025-10-12 20:14:59 +02:00
1d7bb032f3 [Slide] DeGoogle 2025-10-12 20:09:43 +02:00
05c6becee4 [Slide] rss 2025-10-11 13:20:32 +02:00
c74b861442 add joyous bash 2025-08-26 23:03:07 +02:00
599ccd2881 refactor makefile 2025-02-14 16:23:28 +01:00
b191a9e5d4 note speedy compiles 2024-12-09 01:39:47 +01:00
e98d4ffbac place arch install instructions 2024-12-09 01:27:18 +01:00
f067b0200b fix robocop 2024-12-09 00:30:18 +01:00
e2814b08e1 Added dependencies for Debian in README 2024-12-08 00:13:18 -05:00
2f33669330 update readme 2024-12-08 22:13:46 +01:00
cee27356f6 reconfigure makefile 2024-12-06 09:18:40 +01:00
f358103f79 dependency ladder example 2024-11-25 14:28:59 +01:00
4c51ade750 PS: more Makefiles 2024-11-18 18:03:49 +01:00
0d2d466dac typo 2024-11-17 14:19:28 +01:00
8cc2a71235 note python makefile 2024-11-17 14:19:28 +01:00
fa026b7eda ending notes 2024-11-13 16:40:30 +01:00
7bc84ab8a3 finish examples 2024-11-13 16:06:46 +01:00
e59538a3bd place example makefiles 2024-11-13 14:23:44 +01:00
a9f7fd7f75 add basic makefile examples 2024-11-12 03:58:47 +01:00
3adc7ce3a7 fix typo in algebragrupe slides 2024-10-22 00:26:17 +02:00
131e9a1c3f add algebera slides and link to decentrala slide 2024-10-21 16:08:57 +02:00
Jovan Vuceljic
44871e36ff ekonomija update 2024-09-29 23:41:28 +02:00
47 changed files with 2 additions and 819 deletions

View File

@@ -7,14 +7,10 @@ help: ## Print the help message
# Search should not include slides separated by '***', as those are for mdp, not pandoc.
markdown != find slides/ -maxdepth 2 -type f -name "*.md" -exec grep -LF '***' '{}' ';'
pdfs = $(patsubst %.md, %.pdf, $(markdown))
handouts = $(patsubst %.md, %_handout.pdf, $(markdown))
$(pdfs): %.pdf: %.md
pandoc -t beamer -V theme:Warsaw -i $< -o $@
$(handouts): %_handout.pdf: %.md
pandoc -t beamer -V handout -V theme:Warsaw -i $< -o $@
.PHONY: pdfs
pdfs: $(pdfs) ## Generate all pdfs (try `make -j pdfs`)

View File

@@ -1,166 +0,0 @@
# 3D Printing
***
## Machine brands
- Creality Ender
- Prusa
- Elagoo
- Bamboo
...and more
Suggestion [Elagoo centauri](https://us.elegoo.com/products/centauri-carbon) - [40k](https://aldorshop.rs/proizvod/elegoo-centauri-carbon/)
***
## Main parts
- Motors x,y,z
- Buildplate (print bad)
- Extruder
- Bowden tube
- Hotend
- Nozzle
- BL Touch
***
## Filamets
- PLA and PLA+
- PETG
- ASA/ABS
- Resin
...and other
***
## Filament - variations
- Dual colors
- Shiny, glitter
- Transparent
- Glow in dark
- Elastic
- Wood like
***
## Calibration and troubleshooting
[guide](https://teachingtechyt.github.io/calibration.html)
- bed leveling
- line height
- extruder tensioning
- fillament temperature
***
## Modeling
- Blender
- FreeCAD
... and a lot of propriatary tools
***
## Platforms and community
- [Thingiverse](https://www.thingiverse.com)
- [Printables](https://www.printables.com/)
- [MyMiniFactory](https://www.myminifactory.com/)
- [GrabCAD](https://grabcad.com/library)
- [STL Finder](https://www.stlfinder.com/)
... and much more
***
## Slicing
- Prusa Slicer
- Cura
- Bamboo lab
- Supports
- Positioning
***
## Some techniques
- Color change
- Inserting magnets
- Combining with other things
- screws
- marbles
- spinners
- electronics
- Afterjobs
- sanding
- polishing
- coloring
***
## Monitoring
- Builtin from vendor
- [OctoPrint](https://octoprint.org/)
- OctoPi
- OctoPhone
Note: don't expose, use home VPN, tailscale or similar
***
## Uses and projects
- Fixing stuff
- Upgrading stuff
- Tools, skadis
- Home appliances
- Electronic devices (ESP, arduino, etc)
- Toys
- Gifts
***
## Resources - Subreddits
- r/FixMyPrint
- r/functionalprint
- r/3Dprinting
- r/PrintedMinis
- r/3dprinter
- r/3DPrintTech
***
## Serbia
- [DMZ forum post](https://forum.dmz.rs/t/3d-printing/417/4)
- [Voxellab](https://voxellab.rs/)
- [Radnja u staklencu](https://3dmarket.rs/3D/3d-stampaci/)
***
## Misc and upgrades
- Printed parts / upgrades
- Nozzle brush (automated cleaning)
- Filament cleaner
- Filament case and heataer
- Silicone instead of springs for leveling
- Sanding tools
- Custom firmware upgrades

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 611 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 746 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 263 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 KiB

View File

@@ -1,226 +0,0 @@
---
title: Ansible
author: Malin
theme: Warsaw
colortheme: orchid
---
# First: Idempotence
## My Setup Script
```sh
# Place locale info
echo 'LANG=en_GB.UTF-8' >> /etc/locale.conf
/etc/default/libc-locales
xbps-reconfigure -fy glibc-locales
# Start cron service
xbps-install -y crontab
ln -s /etc/sv/cronie /var/service
sv start crontab
# Add default dot files
git clone https://gitlab.com/andonome/mkdots.git /etc/skel/.dots
useradd -m ghost
usermod -aG wheel
```
***
> Error: no package 'cron tab'
***
```sh
# Place locale info
echo 'LANG=en_GB.UTF-8' >> /etc/locale.conf
/etc/default/libc-locales
xbps-reconfigure -fy glibc-locales
# Start cron service
xbps-install -y cronie
ln -s /etc/sv/cronie /var/service
sv start cronie
# Add default dot files
git clone https://gitlab.com/andonome/mkdots.git /etc/skel/.dots
useradd -m ghost
usermod -aG wheel
```
> ...loading locales
***
> Error: No command 'git'
> Error: user already exists
***
```sh
# Place locale info
echo 'LANG=en_GB.UTF-8' >> /etc/locale.conf
/etc/default/libc-locales
xbps-reconfigure -fy glibc-locales
# Start cron service
xbps-install -y cronie git
ln -s /etc/sv/cronie /var/service
sv start cronie
# Add default dot files
git clone https://gitlab.com/andonome/mkdots.git /etc/skel/.dots
useradd -m ghost
usermod -G wheel
```
***
> `$ cat /etc/locale.conf`
```sh
LC_COLLATE=C
LANG=en_GB.UTF-8
LANG=en_GB.UTF-8
LANG=en_GB.UTF-8
LANG=en_GB.UTF-8
LANG=en_GB.UTF-8
LANG=en_GB.UTF-8
```
> `$ ???`
***
```sh
grep en_GB /etc/locale.conf || \
echo 'LANG=en_GB.UTF-8' >> /etc/locale.conf
```
***
# So Ansible...
```sh
ansible --module-name=ping localhost
ansible -m package -a 'upgrade=yes' localhost
```
## Lines in Files
```sh
ansible -m lineinfile -a 'line=test create=yes path=/tmp/x' localhost
ansible -m say -a 'voice=en_GB msg="Testing"' localhost
ansible -m say -a 'voice=en_GB msg="Testing"' localhost
```
***
# More Hosts!
Hark at the hosts in `~/.ssh/config`:
```sh
Host soft
HostName soft.dmz.rs
Port 2222
User ghost
IdentityFile ~/.ssh/id_rsa
Host krov
HostName krov.dmz.rs
User malin
Host kralizec
HostName dmz.rs
User root
Host laka
HostName 192.168.0.50
IdentityFile ~/.ssh/id_rsa
```
***
## Hosts in toml
```toml
[webby]
nginx12
[webby:vars]
user=alice
```
This is easy to read, but breaks standards.
***
`ansible-play -i hosts.toml playbooks/mmcli`
***
Better to stick with standards, even if you can't read it!
***
Very yaml:
```yml
all:
vars:
ansible_python_interpreter: /usr/bin/python3.13
cow_selection: random
username: ghost
locale: Europe/Belgrade
libc_locale: en_GB.UTF-8 UTF-8
children:
arch:
children:
archyay:
hosts:
ratking:
archkube:
nimbus:
void:
hosts:
hex:
debian:
vars:
ansible_python_interpreter: /usr/bin/python3.12
hosts:
laka:
proxmox:
```
***
`ansible-play -i hosts.yml playbooks/mmcli`
***
# What it Does
- Installs packages
- Copies configs *to* host
- Fetches files *from* host
* Backup ssl certs
* Backup ssh identify keys
***
# Check the Repository Here!
`[ $git_repo_address ]`

View File

@@ -1,22 +0,0 @@
---
- name: Compile BIND
hosts: hex
become: false
environment:
PATH: '{{ ansible_env.PATH }}'
tasks:
- name: Git pull BIND
ansible.builtin.git:
repo: https://gitlab.com/bindrpg/core.git
dest: "{{ ansible_user_dir }}/core"
clone: true
verify_commit: true
version: master
- name: Make BIND
community.general.make:
chdir: "{{ ansible_user_dir }}/core"
jobs: 3
target: all

View File

@@ -1,27 +0,0 @@
---
- name: Install Mermaid ASCII
hosts: laka
become: true
tasks:
- name: Install deps
ansible.builtin.package:
name:
- git
- golang
- make
- name: Ensure local src dir exists
ansible.builtin.file:
path: /usr/local/src/
state: directory
mode: '0755'
- name: Clone mermaid-ascii
ansible.builtin.git:
repo: https://github.com/AlexanderGrooff/mermaid-ascii.git
dest: /usr/local/src/mermaid-ascii/
update: yes
- name: Install mermaid
community.general.make:
chdir: /usr/local/src/mermaid-ascii/
target: install

View File

@@ -1,10 +0,0 @@
---
- name: Install tlmgr
hosts: june
become: true
tasks:
- name: Install texlive
ansible.builtin.script: mintex.sh
args:
creates: /usr/local/bin/tlmgr

View File

@@ -1,18 +0,0 @@
---
- name: Make crontab
hosts: june
become: true
tasks:
- name: Late-night transmission start
ansible.builtin.cron:
name: start transmission
minute: 0
hour: 3
job: /usr/bin/systemctl start transmission
- name: Late-night transmission end
ansible.builtin.cron:
name: stop transmission
minute: 0
hour: 6
job: /usr/bin/systemctl stop transmission

View File

@@ -1,24 +0,0 @@
---
- name: Install tspreed
hosts: october
become: true
tasks:
- name: Ensure local src dir exists
ansible.builtin.file:
path: /usr/local/src/
state: directory
mode: '0755'
- name: Install make
ansible.builtin.package:
name: make
state: present
- name: Clone tspreed
ansible.builtin.git:
repo: https://github.com/n-ivkovic/tspreed.git
dest: /usr/local/src/tspreed
update: yes
- name: Install tspreed
community.general.make:
chdir: /usr/local/src/tspreed
target: install

View File

@@ -1,40 +0,0 @@
## init
```sh
go mod tidy
go mod init hello
```
## Build
```sh
go build .
go tool dist list ## list arch
```
## Types
int32,ing64,
int -> depends on arch
rune -> utf char
string -> array of runes
### Other
```sh
ldd ./hello
ls -lah
strip hello
```
[online compiler](https://godbolt.org)
### Notes
- standard lib is huge
- [beginer go](https://gobyexample.com/)
- [advanced go](https://go.dev/ref/spec)

View File

@@ -1,5 +0,0 @@
module hello
go 1.24.3
require github.com/radovskyb/watcher v1.0.7 // indirect

Binary file not shown.

View File

@@ -1,62 +0,0 @@
package main
import (
"net/http"
)
type Point struct {
x int
y int
}
type Boja int
const (
plava = iota //asc
zuta
crvena
)
const (
plava = iota << 1
zuta // 010
crvena // 100
)
type Vektor2d struct {
x int
y int
}
type Vektor3d struct {
x ,y, z int
}
type(p Point) D
type Vektor interface {
Duzina() float32
}
func main() {
p:= Vektor2d[
x:1,
y:1
]
fmt.Println(p.)
// web server
http.HandleFunc("/", a )
http.ListenAndServe(":8080", nil)
}
func a(w http.ResponseWriter, r *http.Request){
w.Write([]byte("Hello Web"))
}

View File

@@ -1,45 +0,0 @@
//go:build exclude
package main
import "fmt"
func main() {
var a int
var s string = "hello world " + "!!!"
var c = 5
a = a + 1
b := 1
b := []byte(a)
c := string(b)
_ = b
_ = c
fmt.Println("Hello Wordl", "qwe")
fmt.Println(s)
{
d = d
}
d := 5
f(d)
fmt.Println(a, "1")
// std lib
a : = []byte{1,2,3,4}
fmt.Println(hex.EncodeToString(a))
crypto.MD5.New()
}
func f(str *int) {
a=1
}

View File

@@ -1,20 +0,0 @@
//go:build exclude
package main
import (
"net/http"
)
func main() {
// web server
http.HandleFunc("/", a )
http.ListenAndServe(":8080", nil)
}
func a(w http.ResponseWriter, r *http.Request){
w.Write([]byte("Hello Web"))
}

Binary file not shown.

View File

@@ -1,3 +0,0 @@
module dmz
go 1.25.1

View File

@@ -1,100 +0,0 @@
package main
import (
"encoding/json"
"html/template"
"fmt"
"net/http"
// "github.com/radovskyb/watcher"
)
func main(){
// w := watcher.New()
port := ":8080"
http.HandleFunc("/{$}", HtmlContentMiddleware(HomeHandler))
http.HandleFunc("/about", HtmlContentMiddleware(AboutHandler))
http.HandleFunc("GET /api", HtmlContentMiddleware(ApiHandler))
http.HandleFunc("POST /api", HtmlContentMiddleware(ApiHandler))
http.HandleFunc("/", NotFoundHandler)
fmt.Println("http://localhost"+port)
http.ListenAndServe(port, nil)
}
type handleFunc func(w http.ResponseWriter, r *http.Request)
func HtmlContentMiddleware(f handleFunc) handleFunc {
return func(w http.ResponseWriter, r *http.Request){
w.Header().Add("Content-Type", "text/html")
f(w,r)
}
}
func HomeHandler(w http.ResponseWriter, r *http.Request){
// data := struct{
// Name string
// }{
// Name: "Coja",
// }
temp := template.New("home")
temp.Parse(baseTemplate)
temp.Execute(w,messages)
// home := "<html><body><i>Hello world</i></body></html>"
// w.Header().Add("Content-Type", "text/html")
w.Write(temp)
}
func AboutHandler(w http.ResponseWriter, r *http.Request){
// w.Header().Add("Content-Type", "text/html")
w.Write([]byte("about"))
}
func NotFoundHandler(w http.ResponseWriter, r *http.Request){
// w.Header().Add("Content-Type", "text/html")
w.WriteHeader(http.StatusNotFound)
w.Write([]byte("404 Not Found"))
}
func ApiHandler(w http.ResponseWriter, r *http.Request){
w.Header().Add("Content-Type", "application/json")
w.WriteHeader(http.StatusNotFound)
// w.Write([]byte("[1,2,3]"))
var filteredMessages []Message
userParam := r.URL.Query().Get("user")
if userParam != ""{
for _ ,m:=range messages {
if userParam == m.User{
filteredMessages = append(filteredMessages, m)
}
}
} else{
filteredMessages = messages
}
json.NewEncoder(w).Encode(filteredMessages)
}
func NewMessageHandler(w http.ResponseWriter, r *http.Request){
var message Message
err := json.NewDecoder(r.Body).Decode(&message)
userParam := r.URL.Query().Get("user")
if err != nil{
w.WriteHeader(http.StatusBadRequest)
return
}
if userParam != ""{
w.WriteHeader(http.StatusBadRequest)
return
}
// messages.append(messages, message)
}

View File

@@ -1,25 +0,0 @@
package main
type Message struct {
Content string
User string
}
var messages []Message = []Message {
{
Content: "hi",
User: "dmz",
},
{
Content: "hello",
User: "admin",
},
{
Content: "sup?",
User: "dmz",
},
{
Content: "s3nd nud3s",
User: "admin",
},
}

View File

@@ -1,20 +0,0 @@
package main
var baseTemplate =`
<html>
<head>
<title>Home</title>
<style>
p {
background-color: #f4f4f4;
border-radius: 5px;
}
</syle>
</head>
<body>
{{range .}}
<p>{{.Content}} {{.Name}}</p>
{{end}}
</body>
</html>
`

View File

@@ -23,7 +23,7 @@ echo blacklist pcspkr > /etc/modprobe.d/nobeep.conf
```sh
curl wttr.in
curl -s wttr.in/
curl -s wttr.in/Београд
curl wttr.in/Moon
```
@@ -150,7 +150,7 @@ set keymap vi
set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string " "
set vi-cmd-mode-string "W "
set vi-cmd-mode-string " "
set keymap vi
```