diff --git a/.gitignore b/.gitignore index 65d7db3..eca09bf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ *.pdf *.epub -Makefile *.xcf diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7109409 --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +help: ## Print the help message + $(info Make a single pdf by hitting the tab key a lot) + @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \ + sort | \ + column -s ':' -t + +# 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`) + +.PHONY: clean +clean: ## Delete all pdfs + $(RM) $(pdfs) diff --git a/README.md b/README.md index c7311f0..3eff0ad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,20 @@ # Radionice -First run ./configure to generate a Makefile using folders in this directory +Usage: `make` + +## Dependecies: + +### For Debian: + +```bash +sudo apt update +sudo apt install pandoc +sudo apt install tikzit +``` + +### For Arch: + +```bash +pacman -Sy pandoc texlive-binextra texlive-pictures texlive-latexrecommended texlive-fontsrecommended +``` -Then you can run make to generate pdf beamer slides diff --git a/configure b/configure deleted file mode 100755 index b1e1664..0000000 --- a/configure +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/bash -FOLDERS=$(cd slides/ ; echo *) - -rm -f Makefile -echo -n 'all:' >> Makefile -for i in $FOLDERS ; do echo -n " $i.pdf" >> Makefile ; done -echo "" >> Makefile - -for i in $FOLDERS ; do echo -e "$i.pdf:\n\tpandoc -t beamer -V theme:Warsaw -i slides/$i/$i.md -o slides/$i/$i.pdf\n" >> Makefile ; done - -echo -ne "clean:\n\trm -f" >> Makefile -for i in $FOLDERS; do echo -n " slides/$i/$i.pdf" >> Makefile ; done -echo "" >> Makefile diff --git a/slides/3Dprint/3DPrint.md b/slides/3Dprint/3DPrint.md new file mode 100644 index 0000000..9886406 --- /dev/null +++ b/slides/3Dprint/3DPrint.md @@ -0,0 +1,166 @@ + + +# 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 + diff --git a/slides/3Dprint/pics/01-resin.png b/slides/3Dprint/pics/01-resin.png new file mode 100644 index 0000000..306e8f6 Binary files /dev/null and b/slides/3Dprint/pics/01-resin.png differ diff --git a/slides/3Dprint/pics/02-1-main-parts.png b/slides/3Dprint/pics/02-1-main-parts.png new file mode 100644 index 0000000..4a6c6f5 Binary files /dev/null and b/slides/3Dprint/pics/02-1-main-parts.png differ diff --git a/slides/3Dprint/pics/02-2-parts.webp b/slides/3Dprint/pics/02-2-parts.webp new file mode 100644 index 0000000..18610b2 Binary files /dev/null and b/slides/3Dprint/pics/02-2-parts.webp differ diff --git a/slides/3Dprint/pics/02-3-extruder.webp b/slides/3Dprint/pics/02-3-extruder.webp new file mode 100644 index 0000000..f4c7a2b Binary files /dev/null and b/slides/3Dprint/pics/02-3-extruder.webp differ diff --git a/slides/3Dprint/pics/02-3-parts-of-a-3d-printer-hot-end.jpg b/slides/3Dprint/pics/02-3-parts-of-a-3d-printer-hot-end.jpg new file mode 100644 index 0000000..bf3c891 Binary files /dev/null and b/slides/3Dprint/pics/02-3-parts-of-a-3d-printer-hot-end.jpg differ diff --git a/slides/3Dprint/pics/02-4-main-parts.jpg b/slides/3Dprint/pics/02-4-main-parts.jpg new file mode 100644 index 0000000..c81c738 Binary files /dev/null and b/slides/3Dprint/pics/02-4-main-parts.jpg differ diff --git a/slides/3Dprint/pics/02-5-silicone_sock.jpg b/slides/3Dprint/pics/02-5-silicone_sock.jpg new file mode 100644 index 0000000..333bf2e Binary files /dev/null and b/slides/3Dprint/pics/02-5-silicone_sock.jpg differ diff --git a/slides/3Dprint/pics/03-01-multycolor.jpg b/slides/3Dprint/pics/03-01-multycolor.jpg new file mode 100644 index 0000000..a9e85a3 Binary files /dev/null and b/slides/3Dprint/pics/03-01-multycolor.jpg differ diff --git a/slides/3Dprint/pics/03-02-sprincles.jpg b/slides/3Dprint/pics/03-02-sprincles.jpg new file mode 100644 index 0000000..e75b868 Binary files /dev/null and b/slides/3Dprint/pics/03-02-sprincles.jpg differ diff --git a/slides/3Dprint/pics/03-04-wood-like.jpg b/slides/3Dprint/pics/03-04-wood-like.jpg new file mode 100644 index 0000000..52b9724 Binary files /dev/null and b/slides/3Dprint/pics/03-04-wood-like.jpg differ diff --git a/slides/3Dprint/pics/03-3-glitter.png b/slides/3Dprint/pics/03-3-glitter.png new file mode 100644 index 0000000..5654d6f Binary files /dev/null and b/slides/3Dprint/pics/03-3-glitter.png differ diff --git a/slides/3Dprint/pics/04-01-bed-leveling.png b/slides/3Dprint/pics/04-01-bed-leveling.png new file mode 100644 index 0000000..bbdf440 Binary files /dev/null and b/slides/3Dprint/pics/04-01-bed-leveling.png differ diff --git a/slides/3Dprint/pics/04-02-bed-leveling.jpg b/slides/3Dprint/pics/04-02-bed-leveling.jpg new file mode 100644 index 0000000..12e18f4 Binary files /dev/null and b/slides/3Dprint/pics/04-02-bed-leveling.jpg differ diff --git a/slides/3Dprint/pics/04-03-bed-leveling.jpg b/slides/3Dprint/pics/04-03-bed-leveling.jpg new file mode 100644 index 0000000..4f379da Binary files /dev/null and b/slides/3Dprint/pics/04-03-bed-leveling.jpg differ diff --git a/slides/3Dprint/pics/04-03-extruder-tension.jpg b/slides/3Dprint/pics/04-03-extruder-tension.jpg new file mode 100644 index 0000000..ca975c7 Binary files /dev/null and b/slides/3Dprint/pics/04-03-extruder-tension.jpg differ diff --git a/slides/3Dprint/pics/04-04-extruder-tension.jpg b/slides/3Dprint/pics/04-04-extruder-tension.jpg new file mode 100644 index 0000000..fd271ec Binary files /dev/null and b/slides/3Dprint/pics/04-04-extruder-tension.jpg differ diff --git a/slides/3Dprint/pics/05-drill-sanding.jpg b/slides/3Dprint/pics/05-drill-sanding.jpg new file mode 100644 index 0000000..4404d00 Binary files /dev/null and b/slides/3Dprint/pics/05-drill-sanding.jpg differ diff --git a/slides/3Dprint/pics/05-fillament-cleaner.webp b/slides/3Dprint/pics/05-fillament-cleaner.webp new file mode 100644 index 0000000..edda893 Binary files /dev/null and b/slides/3Dprint/pics/05-fillament-cleaner.webp differ diff --git a/slides/3Dprint/pics/05-nozzle-brush-.webp b/slides/3Dprint/pics/05-nozzle-brush-.webp new file mode 100644 index 0000000..fa51d00 Binary files /dev/null and b/slides/3Dprint/pics/05-nozzle-brush-.webp differ diff --git a/slides/3Dprint/pics/05-nozzle-brush-holder.webp b/slides/3Dprint/pics/05-nozzle-brush-holder.webp new file mode 100644 index 0000000..4799e2e Binary files /dev/null and b/slides/3Dprint/pics/05-nozzle-brush-holder.webp differ diff --git a/slides/3Dprint/pics/05-silicone_bed.webp b/slides/3Dprint/pics/05-silicone_bed.webp new file mode 100644 index 0000000..d21db6c Binary files /dev/null and b/slides/3Dprint/pics/05-silicone_bed.webp differ diff --git a/slides/3Dprint/pics/06-octopi.webp b/slides/3Dprint/pics/06-octopi.webp new file mode 100644 index 0000000..3d65543 Binary files /dev/null and b/slides/3Dprint/pics/06-octopi.webp differ diff --git a/slides/3Dprint/pics/06-octoprint.webp b/slides/3Dprint/pics/06-octoprint.webp new file mode 100644 index 0000000..209e875 Binary files /dev/null and b/slides/3Dprint/pics/06-octoprint.webp differ diff --git a/slides/3Dprint/pics/07-riced-ender-before-after.jpg b/slides/3Dprint/pics/07-riced-ender-before-after.jpg new file mode 100644 index 0000000..c2d24e4 Binary files /dev/null and b/slides/3Dprint/pics/07-riced-ender-before-after.jpg differ diff --git a/slides/3Dprint/pics/07-riced-ender-upgrades.jpg b/slides/3Dprint/pics/07-riced-ender-upgrades.jpg new file mode 100644 index 0000000..64c3b62 Binary files /dev/null and b/slides/3Dprint/pics/07-riced-ender-upgrades.jpg differ diff --git a/slides/3Dprint/pics/07-riced-ender.jpg b/slides/3Dprint/pics/07-riced-ender.jpg new file mode 100644 index 0000000..7ca1540 Binary files /dev/null and b/slides/3Dprint/pics/07-riced-ender.jpg differ diff --git a/slides/3Dprint/pics/07-riced-ender.png b/slides/3Dprint/pics/07-riced-ender.png new file mode 100644 index 0000000..79cb4c7 Binary files /dev/null and b/slides/3Dprint/pics/07-riced-ender.png differ diff --git a/slides/DeGoogle/Slides.html b/slides/DeGoogle/Slides.html new file mode 100644 index 0000000..0afb749 --- /dev/null +++ b/slides/DeGoogle/Slides.html @@ -0,0 +1,320 @@ +
+

image

+

Why bother?

+ +

App stores

+

+

+

+

Blacklisting same apps

+

Apps and alternatives

+

+

+

+

+ Reddit -> + Geddit (no API + directly) Wikipedia -> + Wiki Unblocked +

+

+ DNS66 - + DNS-Based Host Blocking (ad block) + UntrackMe + - cleaning urls and redirecting like LibRedirect Extension +

+

+ -> + Full FOSS app list +

+

Operating systems (Custom ROMs)

+ +

Linux phone OS

+ +

+ -> Linux phones list +

+

Prioritize for

+ +

!!! ATENTION !!! Device can be bricked!

+ +

Custom recovery software

+ +

Recovery boot shortcut != fastboot shortcut

+ + + + + + + + + + + + + + + + + + + + + + + +
NameModelSoCCodename
Samsung Galaxy S4GT-I9505Snapdragonjfltexx
Samsung Galaxy S7SM-G935FExynoshero2lte
+

My exp

+

+ Samsung -> Odin- + jOdin, + heimdall -> s4, s7 + & s8 Xiomi -> SIM + xiomi acc, win app -> 7d approval (insta + wipe) -> Redmi Note 7 & 8T LG -> + Not supported anymore, + Exiting the smartphone business + -> G6 +

+

LinageOS, crDroidOS, divestOS, dotOS, /e/OS, pixelExpirance

+

Flash from microSD

+ +

Reddit subs

+ +

Phones

+ +

Guides

+ +

Check OS and device

+ +

Other

+ +
diff --git a/slides/DeGoogle/de-Google-1-1.png b/slides/DeGoogle/de-Google-1-1.png new file mode 100644 index 0000000..d7840a3 Binary files /dev/null and b/slides/DeGoogle/de-Google-1-1.png differ diff --git a/slides/DeGoogle/unlockBootloader.md b/slides/DeGoogle/unlockBootloader.md new file mode 100644 index 0000000..e888117 --- /dev/null +++ b/slides/DeGoogle/unlockBootloader.md @@ -0,0 +1,205 @@ + +-> # DeGoogle your phone + +--- + +## Why bother? + +- Privacy, spyware, ad-blocking,... +- Bloatware, performance, memory,... +- Higher android version +- Permacomputing, reusing old devices +- Free and open source +- AOSP Android Open Source Project +- F-Droid +- microG + +-> *Dont expect anonimity* + +--- + +## Obtaining apps + +- Aurora store +- F-droid +- IzzyOnDroid repo +- Neo store +- Obtainium +- PWA + +`Blacklisting apps` on different stores, +avoiding adds/payments, etc. + +--- + +## Apps and alternatives + +Playstore -> *Aurora Store* +Chrome -> *Fennec* +Google search -> *SearXNG LibreX, DDG* +Maps -> *Organic maps, OsmAnd* +Youtube -> *NewPipe, FreeTube* +Drive -> *Syncthing, Nextcloud* +Office -> *LibreOffice & OpenOffice* +Mail -> *Thunderbird* +Music/Video player -> *VLC* + +DNS66, RethingDNS - DNS-Based Host Blocking +UntrackMe - url clean, redirecs (LibRedirect) + +--- + +-> ## Operating system (_Custom ROMs_) + +_ROM (Read-Only Memory):_ + +Originally, the term ROM referred +to a type of computer memory where +**data could only be read, not written or modified.** +In the context of mobile devices, +"ROM" has come to refer to the firmware or operating system +software that is installed on the device. +This includes the core Android operating system along with +any additional software and customizations +made by the device manufacturer. + +--- + +## Distros + +- *LineageOS* +- *LineageOS with microG* +- *DivestOS* -> soft fork on LinageOS +- *crDroid* -> customized fork on LinageOS +- many more + +- */e/os/* -> partialy FOSS +- *GrapheneOS* -> only for pixel phones +- *Calyxos* -> pixels & fairphone +- *PixelExp* -> OS like google pixel + +--- + +## Linux phone OS + +- PostmarketOS +- Droidian +- Mobian +- Ubuntu touch +- Kali Nethunter + +--- + +## Prioritize for + +- Unlockable +- Device is supported (TWRP and CustomROM) +- Supports microG +- Last updated +- Highest android version +- Bootloader relocking + +--- + +## Prepare + +- Check if unlockable +- Backup your data +- Full battery and work while charging +- Use data cable +- Enable *Allow OEM unlocking* under *Developer options* +- Tripple check everything +- Unlock bootloader + +-> `!!!ATENTION - Device can be bricked!!!` + +--- + +## Unlocking bootloader + + +- install adb tools + +*Recovery mode* +*Fastboot mode* + +Different combo keys or commands + + +| Name | Model | SoC | **Codename** | +| --------- | --------- | ---------- | --------- | +| Galaxy S4 | GT-I9505 | Snapdragon | **jfltexx** | +| Galaxy S7 | SM-G935F | Exynos | **hero2lte** | + +--- + +## Some commands + +```sh +adb devices +fastboot devices + +adb reboot bootloader +adb reboot recovery + +adb push rom.img /sdcard/ +adb sideload rom.img + +adb shell + +fastboot boot recovery.img +fastboot flash recovery recovery.img +fastboot reboot bootloader +fastboot reboot recovery + +heimdall flash --RECOVERY twrp.img --no-reboot + +``` + +--- + +## Flashing recovery software + +- TWRP +- Orange fox + +Flash from microSD +ADB push +ADB sideload + +--- + +## Installing Custom ROM + +- Subforum for the device on XDA forums +- microSD Flash or ADB Sidelaod + +--- + +## Variations + +*Samsung* -> many options, heimdall (FOSS, linux) +*Xiomi* -> SIM + acc, win -> 7d approval (insta wipe) +*LG* -> Not supported anymore +*Huawei* -> locked + +Some are unlocked by default (Fairphone, Pixel) + +--- + +## Reddit subs + +- /r/degoogle +- /r/fossdroid +- /r/LineageOS +- /r/tuxphones + +--- + +## Links + +- [Screen copy (scrcpy)](https://github.com/Genymobile/scrcpy) +- [Heimdall](https://github.com/Benjamin-Dobell/Heimdall) +- [TWRP](https://www.twrp.me/) + + diff --git a/slides/ansible/ansible.md b/slides/ansible/ansible.md new file mode 100644 index 0000000..6b8a870 --- /dev/null +++ b/slides/ansible/ansible.md @@ -0,0 +1,226 @@ +--- +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 ]` + + diff --git a/slides/ansible/examples/bind.yml b/slides/ansible/examples/bind.yml new file mode 100644 index 0000000..f0cec3c --- /dev/null +++ b/slides/ansible/examples/bind.yml @@ -0,0 +1,22 @@ +--- +- 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 diff --git a/slides/ansible/examples/mmcli.yml b/slides/ansible/examples/mmcli.yml new file mode 100644 index 0000000..56a4bca --- /dev/null +++ b/slides/ansible/examples/mmcli.yml @@ -0,0 +1,27 @@ +--- +- 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 diff --git a/slides/ansible/examples/tlmgr.yml b/slides/ansible/examples/tlmgr.yml new file mode 100644 index 0000000..61dfce1 --- /dev/null +++ b/slides/ansible/examples/tlmgr.yml @@ -0,0 +1,10 @@ +--- +- name: Install tlmgr + hosts: june + become: true + + tasks: + - name: Install texlive + ansible.builtin.script: mintex.sh + args: + creates: /usr/local/bin/tlmgr diff --git a/slides/ansible/examples/transmission.yml b/slides/ansible/examples/transmission.yml new file mode 100644 index 0000000..3750abb --- /dev/null +++ b/slides/ansible/examples/transmission.yml @@ -0,0 +1,18 @@ +--- +- 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 diff --git a/slides/ansible/examples/tspreed.yml b/slides/ansible/examples/tspreed.yml new file mode 100644 index 0000000..8c0eb21 --- /dev/null +++ b/slides/ansible/examples/tspreed.yml @@ -0,0 +1,24 @@ +--- +- 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 diff --git a/slides/extended_minds/extended_mind.md b/slides/extended_minds/extended_mind.md deleted file mode 100644 index 326e6a6..0000000 --- a/slides/extended_minds/extended_mind.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -title: -- The Extended Mind and Licensing -author: -- Malin - -theme: -- Warsaw -colortheme: -- orchid ---- - -# History - -- Started with Clark and Chalmers -- [Chalmers at Ted](https://yt.artemislena.eu/watch?v=ksasPjrYFTg) - -## Cyborg Manifesto - -Or maybe Donna Haraway? - -# Original Extended Minds - -- Notebooks -- Counting on fingers -- Fil-o-fax - -# Electronic Extended Minds - -- Phones -- Computers -- Google? -- Note-apps? - -# Intuition Pumps - -- Proprioception and teeth -- The feeling of loss over theft -- Second brains - -# Requirements - -- 'to-hand' -- Repetition -- Locus - -> Do you know where they live? - -# Counter Requirements - -> Skin and bone - -Does *Ghost in the Shell* count? - -# The Point and the Future - -![robocop](robocop_valuse.png) - -# End Notes - -> Can you code in the sand? - diff --git a/slides/extended_minds/extended_minds.md b/slides/extended_minds/extended_minds.md index 326e6a6..554e1c8 100644 --- a/slides/extended_minds/extended_minds.md +++ b/slides/extended_minds/extended_minds.md @@ -54,7 +54,7 @@ Does *Ghost in the Shell* count? # The Point and the Future -![robocop](robocop_valuse.png) +![robocop](slides/extended_minds/robocop_values.png) # End Notes diff --git a/slides/extended_minds/robocop_valuse.png b/slides/extended_minds/robocop_values.png similarity index 100% rename from slides/extended_minds/robocop_valuse.png rename to slides/extended_minds/robocop_values.png diff --git a/slides/go/commands.md b/slides/go/commands.md new file mode 100644 index 0000000..c5e5044 --- /dev/null +++ b/slides/go/commands.md @@ -0,0 +1,40 @@ +## 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) diff --git a/slides/go/go.mod b/slides/go/go.mod new file mode 100644 index 0000000..a812472 --- /dev/null +++ b/slides/go/go.mod @@ -0,0 +1,5 @@ +module hello + +go 1.24.3 + +require github.com/radovskyb/watcher v1.0.7 // indirect diff --git a/slides/go/hello b/slides/go/hello new file mode 100755 index 0000000..af2e57c Binary files /dev/null and b/slides/go/hello differ diff --git a/slides/go/main.go b/slides/go/main.go new file mode 100644 index 0000000..5c03b85 --- /dev/null +++ b/slides/go/main.go @@ -0,0 +1,62 @@ +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")) +} + diff --git a/slides/go/main1.go b/slides/go/main1.go new file mode 100644 index 0000000..a7024d6 --- /dev/null +++ b/slides/go/main1.go @@ -0,0 +1,45 @@ +//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 +} diff --git a/slides/go/server.go b/slides/go/server.go new file mode 100644 index 0000000..bb21b7d --- /dev/null +++ b/slides/go/server.go @@ -0,0 +1,20 @@ +//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")) +} + diff --git a/slides/go/webgo/dmz b/slides/go/webgo/dmz new file mode 100755 index 0000000..0b0a68a Binary files /dev/null and b/slides/go/webgo/dmz differ diff --git a/slides/go/webgo/go.mod b/slides/go/webgo/go.mod new file mode 100644 index 0000000..ac9eb6b --- /dev/null +++ b/slides/go/webgo/go.mod @@ -0,0 +1,3 @@ +module dmz + +go 1.25.1 diff --git a/slides/go/webgo/main.go b/slides/go/webgo/main.go new file mode 100644 index 0000000..3b0bff6 --- /dev/null +++ b/slides/go/webgo/main.go @@ -0,0 +1,100 @@ +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 := "Hello world" + // 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) +} diff --git a/slides/go/webgo/message.go b/slides/go/webgo/message.go new file mode 100644 index 0000000..4bc5968 --- /dev/null +++ b/slides/go/webgo/message.go @@ -0,0 +1,25 @@ +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", + }, +} diff --git a/slides/go/webgo/template.go b/slides/go/webgo/template.go new file mode 100644 index 0000000..0f41c65 --- /dev/null +++ b/slides/go/webgo/template.go @@ -0,0 +1,20 @@ +package main + +var baseTemplate =` + + + Home +