Compare commits
9 Commits
master
...
0d2d466dac
| Author | SHA1 | Date | |
|---|---|---|---|
|
0d2d466dac
|
|||
|
8cc2a71235
|
|||
|
fa026b7eda
|
|||
|
7bc84ab8a3
|
|||
|
e59538a3bd
|
|||
|
a9f7fd7f75
|
|||
|
3adc7ce3a7
|
|||
|
131e9a1c3f
|
|||
|
|
44871e36ff |
65
slides/algebragrupe/algebragrupe.md
Normal file
65
slides/algebragrupe/algebragrupe.md
Normal file
@@ -0,0 +1,65 @@
|
||||
---
|
||||
title:
|
||||
- Algebra (Grupe)
|
||||
|
||||
theme:
|
||||
- Warsaw
|
||||
colortheme:
|
||||
- orchid
|
||||
---
|
||||
|
||||
# Uvod
|
||||
- Skupovi
|
||||
- Celi brojevi (beskonacni)
|
||||
- Ostatci pre deljenju (konacne)
|
||||
- Operacije
|
||||
- mnozenje (binarna)
|
||||
- negacija (unarna)
|
||||
|
||||
# Grupe
|
||||
- Rezlutat ostaje unutar skupa
|
||||
- Neutral
|
||||
- Inverz
|
||||
- Asocijativnost
|
||||
- Abelove grupe (komutativnost)
|
||||
- Ciklicne grupe (ostatak pri deljenju)
|
||||
|
||||
# Podgrupe
|
||||
- Celi/Racionalni brojevi
|
||||
- Red grupe
|
||||
- Red podgrupe deli red grupe
|
||||
|
||||
# Kriptografija
|
||||
- Skup poruka m odredjene velicine
|
||||
- Operacija sifrovanja/potpisivanja $\oplus$
|
||||
- jednosmerna (kao i hash funkcije)
|
||||
- Neutral (e)
|
||||
- Inverz kljuceva (k1, k2)
|
||||
- $k1 \oplus k2 \equiv e$
|
||||
- Sifrovanje/Potpisivanje ( $c \equiv m \oplus k1$ )
|
||||
- Desifovanje/Provera ( $c \oplus k2 \equiv m$ )
|
||||
- Asocijativnost
|
||||
- $c \oplus k2 \equiv (m \oplus k1) \oplus k2 \equiv m \oplus (k1 \oplus k2)$
|
||||
- $m \oplus (e) \equiv m$
|
||||
|
||||
# Kljucevi
|
||||
- Jedan kljuc (simetricna)
|
||||
- $k1 \equiv k2$
|
||||
- $1 \oplus 1 \equiv 0 \mod 2$ (komplement)
|
||||
- Dva kljuca (asimetricna)
|
||||
- $2+3 \equiv 0 \mod 5$
|
||||
|
||||
# Razmena kljuceva
|
||||

|
||||
|
||||
# Razmena kljuceva
|
||||
- Diffie–Hellman (DH)
|
||||
- parametri (g,n,...)
|
||||
- Abelova grupa (komutativnost)
|
||||
- $g \oplus a \oplus b \equiv g \oplus b \oplus a$
|
||||
- $(g \oplus a) \oplus b \equiv (g \oplus b) \oplus a$
|
||||
- $A \oplus b \equiv B \oplus a$
|
||||
|
||||
# Sifrovanje/Potpisivanje
|
||||
- Direktno sifrovanje (RSA)
|
||||
- DH + simetcina = asimetricna (EC)
|
||||
@@ -10,13 +10,21 @@ colortheme:
|
||||
|
||||
# Uvod
|
||||
- Šta je ekonomija?
|
||||
- istorija
|
||||
- trampa
|
||||
- kovanice i papirni novac
|
||||
- "slobodna" trgovina
|
||||
- raspodela resursa
|
||||
- efikasnost
|
||||
- efikasnost i evektivnost
|
||||
|
||||
|
||||
# Uvod
|
||||
- Šta je novac?
|
||||
- banke
|
||||
- ponuda i traznja
|
||||
- moć odlučivanja u raspodeli resursa
|
||||
- likvidnost
|
||||
- bruto domaci proizvod (BDP eng GDP)
|
||||
|
||||
# Štednja
|
||||
- Štednja
|
||||
@@ -47,6 +55,7 @@ colortheme:
|
||||
- Brokeri
|
||||
- domaći
|
||||
- strani
|
||||
- wall street
|
||||
|
||||
# Kripto
|
||||
- Novac
|
||||
@@ -62,10 +71,33 @@ colortheme:
|
||||
- iluzija sposobnosti
|
||||
- zakoni
|
||||
|
||||
# Uspesi sistema
|
||||
- Uspesi sistema
|
||||
- brz napredak u poljima interesovanja (profita)
|
||||
- masovna proizvodnja
|
||||
- poslovi i obucavanje naroda
|
||||
-
|
||||
|
||||
# Neuspesi i kritika sistema
|
||||
- Kritika
|
||||
- planirano zastarevanje
|
||||
- ciklicna potrosnja
|
||||
- ekoloska katastrofa
|
||||
- automatizacija
|
||||
- besmisleni poslovi
|
||||
- robovanje profitu
|
||||
- kompetitivnost i ratovi
|
||||
- sve na prodaju
|
||||
- kriza u ciklusima
|
||||
- najbogatijih 1%
|
||||
- maltuzianizm
|
||||
|
||||
|
||||
# Kako da se obogatim?
|
||||
- Kako zaraditi?
|
||||
- roditi se bogat
|
||||
- krasti
|
||||
- nasledstvo
|
||||
- rad i štednja
|
||||
- investicije
|
||||
- kradja
|
||||
- sreća
|
||||
|
||||
|
||||
1
slides/makefiles/examples/.gitignore
vendored
Normal file
1
slides/makefiles/examples/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*
|
||||
8
slides/makefiles/examples/check
Normal file
8
slides/makefiles/examples/check
Normal file
@@ -0,0 +1,8 @@
|
||||
CHECKER = command -v
|
||||
.PHONY: check
|
||||
check:
|
||||
$(CHECKER) fortune >/dev/null
|
||||
$(CHECKER) cowsay >/dev/null
|
||||
|
||||
file: | check
|
||||
fortune | cowsay > $@
|
||||
13
slides/makefiles/examples/fort_1
Normal file
13
slides/makefiles/examples/fort_1
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
forts/big_fort.txt: forts/short.txt forts/long.txt
|
||||
cat forts/short.txt forts/long.txt > forts/big_fort.txt
|
||||
|
||||
forts/:
|
||||
mkdir forts
|
||||
|
||||
forts/short.txt: forts/
|
||||
fortune -s > forts/short.txt
|
||||
|
||||
forts/long.txt: forts/
|
||||
fortune -l > forts/long.txt
|
||||
|
||||
21
slides/makefiles/examples/fort_2
Normal file
21
slides/makefiles/examples/fort_2
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
forts/big_fort.txt: forts/short.txt forts/long.txt
|
||||
cat $^ > $@
|
||||
|
||||
README.md:
|
||||
echo "For an example makefile for python" > $@
|
||||
echo "check out the nd6 dice-roller at" >> $@
|
||||
echo "ssh -p 2222 soft.dmz.rs -t nd6" >> $@
|
||||
|
||||
|
||||
forts/: README.md
|
||||
mkdir -p $@
|
||||
|
||||
forts/short.txt: forts/
|
||||
fortune -s > $@
|
||||
|
||||
forts/long.txt: forts/
|
||||
fortune -l > $@
|
||||
|
||||
clean:
|
||||
rm -rf forts
|
||||
18
slides/makefiles/examples/pats
Normal file
18
slides/makefiles/examples/pats
Normal file
@@ -0,0 +1,18 @@
|
||||
IMAGES = $(wildcard jpgs/*)
|
||||
COL = $(patsubst jpgs/%,collection/%,$(IMAGES))
|
||||
|
||||
.PHONY: help
|
||||
help:
|
||||
$(info try 'show' or 'output')
|
||||
.PHONY: show
|
||||
show:
|
||||
$(info IMAGES is $(IMAGES))
|
||||
$(info Col is $(COL))
|
||||
|
||||
.PHONY: output
|
||||
output: $(COL)
|
||||
|
||||
collection/%.jpg: jpgs/%.jpg
|
||||
mkdir -p $(@D)
|
||||
cp $< $@
|
||||
|
||||
15
slides/makefiles/examples/rules
Normal file
15
slides/makefiles/examples/rules
Normal file
@@ -0,0 +1,15 @@
|
||||
CP = ln -f
|
||||
|
||||
output: pngs/ldap.png
|
||||
|
||||
jpgs/ldap.jpg: ../../ldap/ldap.jpg
|
||||
mkdir -p $(dir $@)
|
||||
$(CP) $< $@
|
||||
|
||||
pngs/%.png: jpgs/%.jpg
|
||||
mkdir -p $(dir $@)
|
||||
$(info making $(@F) in $(@D))
|
||||
magick $< $@
|
||||
|
||||
clean:
|
||||
$(RM) -r pngs jpgs
|
||||
10
slides/makefiles/examples/vars
Normal file
10
slides/makefiles/examples/vars
Normal file
@@ -0,0 +1,10 @@
|
||||
include /etc/os-release
|
||||
DAY != date +%d
|
||||
MESSAGE != fortune -s
|
||||
|
||||
motd_$(DAY):
|
||||
$(info Hello $(USER))
|
||||
$(info Placing message:)
|
||||
echo "Welcome to $(NAME)" > $@
|
||||
echo $(MESSAGE) >> $@
|
||||
|
||||
13
slides/makefiles/makefiles.md
Normal file
13
slides/makefiles/makefiles.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title:
|
||||
- Making Makefiles
|
||||
author:
|
||||
- Malin
|
||||
|
||||
theme:
|
||||
- Warsaw
|
||||
colortheme:
|
||||
- orchid
|
||||
---
|
||||
|
||||
(presentation in presentation.md)
|
||||
314
slides/makefiles/presentation.md
Normal file
314
slides/makefiles/presentation.md
Normal file
@@ -0,0 +1,314 @@
|
||||
# Intro
|
||||
|
||||
The fundamental problem:
|
||||
|
||||
```bash
|
||||
git submodule update --init soundscape
|
||||
cargo build --release
|
||||
install -pm755 target/release/tap /usr/local/bin/
|
||||
```
|
||||
|
||||
*But you can't type this for each run.*
|
||||
|
||||
***
|
||||
|
||||
## First Solution
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
git submodule update --init soundscape
|
||||
cargo build --release
|
||||
install -pm755 target/release/tap /usr/local/bin/
|
||||
```
|
||||
|
||||
At this point, every test takes 10 minutes.
|
||||
|
||||
## Second Solution
|
||||
|
||||
```bash
|
||||
#!/bin/sh
|
||||
[ -f soundscape/.git ] || git submodule update --init soundscape
|
||||
[ -f target/release/tap ] || cargo build --release
|
||||
[ -f target/release/tap ] || \
|
||||
install -pm755 target/release/tap /usr/local/bin/
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Makefile Solutions
|
||||
|
||||
- input, process, output.
|
||||
- automatic idempotence
|
||||
|
||||
```bash
|
||||
INSTALL_DIR = /usr/local/bin
|
||||
|
||||
soundscape/.git:
|
||||
git submodule update --init soundscape
|
||||
|
||||
/usr/local/bin/tap: target/release/tap
|
||||
install -pm755 target/release/tap $(INSTALL_DIR)
|
||||
|
||||
target/release/tap: src soundscape/.git
|
||||
cargo build --release
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# The Three Sigils
|
||||
|
||||
Readable, but slow:
|
||||
|
||||
```make fort_1
|
||||
forts/big_fort.txt: forts/short.txt forts/long.txt
|
||||
cat forts/short.txt forts/long.txt > forts/big_fort.txt
|
||||
|
||||
forts/:
|
||||
mkdir forts
|
||||
|
||||
forts/short.txt: forts/
|
||||
fortune -s > forts/short.txt
|
||||
|
||||
forts/long.txt: forts/
|
||||
fortune -l > forts/long.txt
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
| Make this | From That | From These |
|
||||
|:---------:|:---------:|:----------:|
|
||||
| `$@` | `$<` | `$^` |
|
||||
|
||||
|
||||
```make fort_2
|
||||
forts/big_fort.txt: forts/short.txt forts/long.txt
|
||||
cat $^ > $@
|
||||
|
||||
forts/: README.md
|
||||
mkdir $@
|
||||
forts/short.txt: forts/
|
||||
fortune -s > $@
|
||||
forts/long.txt: forts/
|
||||
fortune -l > $@
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Gotcha: Directories
|
||||
|
||||
|
||||
```make fort_2
|
||||
forts/big_fort.txt: forts/short.txt forts/long.txt
|
||||
cat $^ > $@
|
||||
|
||||
forts/: README.md
|
||||
mkdir $@
|
||||
forts/short.txt: forts/
|
||||
fortune -s > $@
|
||||
forts/long.txt: forts/
|
||||
fortune -l > $@
|
||||
|
||||
README.md:
|
||||
echo "Find the fortunes in the fort dir" > $@
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Variables
|
||||
|
||||
```make vars
|
||||
include /etc/os-release
|
||||
DAY != date +%d
|
||||
MESSAGE != fortune -s
|
||||
|
||||
motd_$(DAY):
|
||||
$(info Placing message:)
|
||||
echo "Welcome to $(NAME)" > $@
|
||||
echo $(MESSAGE) >> $@
|
||||
```
|
||||
|
||||
### Gotcha: Hanging Quotes
|
||||
|
||||
> echo "Welcome to "Arch Linux""
|
||||
|
||||
***
|
||||
|
||||
## Add New Variables
|
||||
|
||||
```make
|
||||
make -f vars -e MESSAGE="Red alert, all hands on deck!"
|
||||
```
|
||||
|
||||
### Gotcha: Quote, or Risk Escape
|
||||
|
||||
```make
|
||||
make -f vars -e MESSAGE="<h1> HTML Headers </h1>"
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Gotcha: Variables from Shell
|
||||
|
||||
This works:
|
||||
|
||||
```make
|
||||
file:
|
||||
$(info Hello $(USER))
|
||||
```
|
||||
|
||||
...but not this:
|
||||
|
||||
```make
|
||||
file:
|
||||
user=bob
|
||||
echo $user
|
||||
```
|
||||
|
||||
Nor this:
|
||||
|
||||
```make
|
||||
numbers:
|
||||
for x in 1 2 3 4 5; do
|
||||
echo $x
|
||||
done > $@
|
||||
```
|
||||
|
||||
Nor this:
|
||||
|
||||
```make
|
||||
numbers:
|
||||
for x in 1 2 3 4 5; do echo $x ; done > $@
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
### Ugly Fixes are Ugly
|
||||
|
||||
This works, but don't.
|
||||
|
||||
```make
|
||||
file:
|
||||
for x in 1 2 ;\
|
||||
do echo $$x ;\
|
||||
done > $@
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
|
||||
# Phonies, and the Problems with Lies
|
||||
|
||||
## Clean
|
||||
|
||||
|
||||
```make
|
||||
.PHONY: clean
|
||||
clean:
|
||||
git clean -fdX
|
||||
```
|
||||
|
||||
## Gotcha: Recompiling without Changes
|
||||
|
||||
```make
|
||||
CHECKER = command -v
|
||||
.PHONY: check
|
||||
check:
|
||||
$(CHECKER) fortune >/dev/null
|
||||
$(CHECKER) cowsay >/dev/null
|
||||
|
||||
file: check # Needs a '|'
|
||||
fortune | cowsay > $@
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
|
||||
## Non-Compiling Checks
|
||||
|
||||
- `make` -n
|
||||
- *Gotcha*: shell output variables.
|
||||
|
||||
***
|
||||
|
||||
|
||||
# The Fourth Sigil: `%`
|
||||
|
||||
Create standardized rules with `%`.
|
||||
|
||||
|
||||
```make rules
|
||||
CP = ln -f
|
||||
|
||||
output: pngs/ldap.png
|
||||
|
||||
jpgs/ldap.jpg: ../../ldap/ldap.jpg
|
||||
mkdir -p $(dir $@)
|
||||
$(CP) $< $@
|
||||
|
||||
pngs/%.png: jpgs/%.jpg
|
||||
mkdir -p $(dir $@)
|
||||
$(info making $(@F) in $(@D))
|
||||
magick $< $@
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Bling: makefile2graph
|
||||
|
||||
```graph
|
||||
|
||||
┌────────────────┐ ┌────────────────────┐
|
||||
│ forts/long.txt │ ◀── │ forts/ │
|
||||
└────────────────┘ └────────────────────┘
|
||||
│ │
|
||||
│ │
|
||||
│ ▼
|
||||
│ ┌────────────────────┐
|
||||
│ │ forts/short.txt │
|
||||
│ └────────────────────┘
|
||||
│ │
|
||||
│ │
|
||||
│ ▼
|
||||
│ ┌────────────────────┐
|
||||
└──────────────────▶ │ forts/big_fort.txt │
|
||||
└────────────────────┘
|
||||
```
|
||||
|
||||
### Gotcha: The Binary is Called `make2graph`
|
||||
|
||||
- Works with GUI tools maybe, IDK, I don't use Windows.
|
||||
- Some systems can use `graph-easy`, but it's outdated.
|
||||
|
||||
***
|
||||
|
||||
# Patsubst and Wildcards
|
||||
|
||||
|
||||
```make pats
|
||||
IMAGES = $(wildcard jpgs/*)
|
||||
COL = $(patsubst jpgs/%,collection/%,$(IMAGES))
|
||||
|
||||
.PHONY: show
|
||||
show:
|
||||
$(info IMAGES is $(IMAGES))
|
||||
$(info Col is $(COL))
|
||||
|
||||
.PHONY: output
|
||||
output: $(COL)
|
||||
|
||||
collection/%.jpg: jpgs/%.jpg
|
||||
mkdir -p $(@D)
|
||||
cp $< $@
|
||||
|
||||
```
|
||||
|
||||
***
|
||||
|
||||
# Use Cases
|
||||
|
||||
- Backups
|
||||
- Making Websites
|
||||
* `git clone https://gitlab.com/bindrpg/blag`
|
||||
- `NOT installations`
|
||||
- ...but maybe installations?
|
||||
- Setting
|
||||
BIN
slides/stajedecentrala/qrcode.png
Normal file
BIN
slides/stajedecentrala/qrcode.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
@@ -33,7 +33,8 @@ Ekipa koju interesuje :
|
||||
|
||||
# Lokacije
|
||||
|
||||
- DC Krov hacklab
|
||||
- KC Grad radionce
|
||||
- Matematicki Faklutet (cekamo)
|
||||
- Drugi fakulteti, skole?
|
||||
- DC Krov
|
||||
- KC Magacin
|
||||
|
||||
# Kontakt
|
||||

|
||||
|
||||
Reference in New Issue
Block a user