summaryrefslogtreecommitdiff
path: root/080_blog
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2019-03-07 23:26:17 +0100
committerMiguel <m.i@gmx.at>2019-03-07 23:26:17 +0100
commit52f86ea0075c66e18e4796ad88f45541da8b4de5 (patch)
treea7dcdb140e49ca13ed2315970e3b86e0c6fb9ef3 /080_blog
parenta9e55a351753af1cfdeb75bdf50ecfd80de129c0 (diff)
some cleanup and such
Diffstat (limited to '080_blog')
-rw-r--r--080_blog/00015_Admin/00005_Miscellanous/index.md866
-rw-r--r--080_blog/00015_Admin/00005_Notes-on-Hosting/index.md53
-rw-r--r--080_blog/00015_Admin/00008_Docker/index.md14
-rw-r--r--080_blog/00015_Admin/00010_Various-Cheat-Sheets/00120_GDB/index.md29
-rw-r--r--080_blog/00015_Admin/00020_Benchmarking-and-Stress-testing/index.md68
-rw-r--r--080_blog/00015_Admin/00030_Fixing-HDD/index.md48
-rw-r--r--080_blog/00015_Admin/00040_Oneliners/index.md41
-rw-r--r--080_blog/00015_Admin/00090_Miguels-KVM-Adventures/index.md12
-rw-r--r--080_blog/00018_Building/00030_The-Hell-of-Autotools/index.md (renamed from 080_blog/00030_The-Hell-of-Autotools/index.md)0
-rw-r--r--080_blog/00018_Building/00040_Various-notes-on-Building/index.md93
-rw-r--r--080_blog/00018_Building/index.md3
-rw-r--r--080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/1.png (renamed from 080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/1.png)bin90433 -> 90433 bytes
-rw-r--r--080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/2.png (renamed from 080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/2.png)bin741047 -> 741047 bytes
-rw-r--r--080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/3.png (renamed from 080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/3.png)bin743011 -> 743011 bytes
-rw-r--r--080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/4.png (renamed from 080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/4.png)bin728056 -> 728056 bytes
-rw-r--r--080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/index.md (renamed from 080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/index.md)0
-rw-r--r--080_blog/00020_Visual-Art/index.md (renamed from 080_blog/00020_3D-Art/index.md)0
-rw-r--r--080_blog/00020_WWW-Projects-and-Apps/index.md91
-rw-r--r--080_blog/00035_Programming/00010_IPC/.index.md.swpbin0 -> 12288 bytes
-rw-r--r--080_blog/00035_Programming/00010_IPC/index.md24
-rw-r--r--080_blog/00035_Programming/00015_Competitive-Coding/index.md17
-rw-r--r--080_blog/00035_Programming/00020_Computer-Science-Literature/index.md48
-rw-r--r--080_blog/00035_Programming/index.md3
-rw-r--r--080_blog/00038_Theory/00010_Totient-Function/index.md16
-rw-r--r--080_blog/00038_Theory/index.md0
-rw-r--r--080_blog/00040_Haskell-Projects/00065_Base64-Encoder/index.md51
-rw-r--r--080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.glade312
-rw-r--r--080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.hs74
-rw-r--r--080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.pngbin22734 -> 0 bytes
-rw-r--r--080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/SimpleSvg.hs179
-rw-r--r--080_blog/00040_Haskell-Projects/00200_Estatico-Page-Maker/index.md35
-rw-r--r--080_blog/00040_Haskell-Projects/index.md4
-rw-r--r--080_blog/00040_Haskell/00010_Links-and-Notes-and-Literature/index.md36
-rw-r--r--080_blog/00040_Haskell/00040_Graham-Scan/index.md (renamed from 080_blog/00040_Haskell-Projects/00040_Graham-Scan/index.md)0
-rw-r--r--080_blog/00040_Haskell/00065_Base64-Encoder/base64.cast322
-rw-r--r--080_blog/00040_Haskell/00065_Base64-Encoder/index.md19
-rw-r--r--080_blog/00040_Haskell/00120_Lambda-Calculus/index.md (renamed from 080_blog/00040_Haskell-Projects/00120_Lambda-Calculus/index.md)0
-rw-r--r--080_blog/00040_Haskell/00130_Calculator-on-Parsec-and-GTK/index.md (renamed from 080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/index.md)0
-rw-r--r--080_blog/00040_Haskell/00140_Minimalistic-SVG-Generator/index.md (renamed from 080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/index.md)0
-rw-r--r--080_blog/00040_Haskell/00140_Minimalistic-SVG-Generator/svg.png (renamed from 080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/svg.png)bin13130 -> 13130 bytes
-rw-r--r--080_blog/00040_Haskell/00150_Applicative-vs-Monadic-Parsing/index.md1
-rw-r--r--080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md55
-rw-r--r--080_blog/00040_Haskell/index.md8
-rw-r--r--080_blog/00110_Fool-Operating-System/index.md9
44 files changed, 963 insertions, 1568 deletions
diff --git a/080_blog/00015_Admin/00005_Miscellanous/index.md b/080_blog/00015_Admin/00005_Miscellanous/index.md
deleted file mode 100644
index d247e7e..0000000
--- a/080_blog/00015_Admin/00005_Miscellanous/index.md
+++ /dev/null
@@ -1,866 +0,0 @@
-Miscellanous Notes
-==================
-
-A collection of short notes on things I wish to remember. Many topics are heavily outdated.
-
-Backing up and Restoring Docker Volumes
----------------------------------------
-
- July 3, 2017
-
-One of my first questions, when starting my docker experience was
-how to backup and restore docker volumes.
-
-### On the source host
-
-First of all identify your volumes:
-
- $ docker ps
- $ docker inspect my_container_name | grep -C 1 -i Source
-
-Now you can backup the directory to a tar on your host machine:
-
- $ docker run –rm –volumes-from my_container_name -v $(pwd):/backup ubuntu tar cvf /backup/backup_db.tar /var/lib/mysql
-
-### On the target host
-
-In order to securely copy and restore the volume on the target host one can run:
-
- $ scp source_host:~/backup_db.tar .
- $ docker run –rm –volumes-frommy_container_name -v $(pwd):/backup ubuntu bash -c “cd /var/lib/mysql && tar xvf /backup/backup_db.tar –strip 1″
-
-A Growing Collection of Linux Command Line One-Liners
-------------------------------------------------------
-
-Please believe me... this collection was really supposed to grow over time...
-
-inside a direcotry show disk usage of all hidden files and directories and sort by size:
-
- $ du $(ls .* -d | tail -n +3) -hs |sort -h
-
-inside a direcotry show disk usage of all files and directories (also hidden) and sort by size.
-Exclude ./DATA file.
-
- $ du . -a -d 1 -h –exclude=’./DATA’ | sort -h
-
-Tar all files in current directory, excluding ./DATA and ./.cache
-
- $ tar –exclude=’./.cache’ –exclude=’./DATA’ -cvf home_miguel_20180216.tar .
-
-Find files in ./ARCHIVE NOT belonging to a specific user: miguel
-
- $ find ARCHIVE/ \! -user miguel
-
-set folder/ permissions to Read/Browse only for owner recursively
-
- $ sudo chmod -R u=r,g=,o= folder/
- $ chmod -R u=rX,g=,o= folder/
-
-find all mails from Boban when in the maildir full of mailboxes and print only short headers without bodies:
-
- $ grepmail -H -B -Y ‘(^TO:|^From:)’ Boban *
-
-not really a one-lier but will print 256 colors in a bash:
-
- for i in {0..255} ; do
- printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
- if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
- printf "\n";
- fi
- done
-
-Some Tools of Choice
---------------------
-
-### Systems
-
-* joomla
-* redaxo
-* typo3
-* wordpress
-* mediawiki
-
-* oscommerce
-* opencart
-
-* owncloud
-* alfresco
-* mantis
-
-* piwik / matomo
-* loganalyzer
-* goaccess
-* nagios / icinga
-
-### Servers
-
-* apache
-* nginx
-
-* mariadb / mysql
-* postfix
-* postgis
-
-* geoserver
-
-<!--
-## Tools / Servers
- openlayers
- git / gitweb / stagit / gitolite
- xmpp
- mumble
- docker / registry
- kvm
- kubernetes
- postfix/dovecot / rouncube/postfixadmin
- symfony
- bootstrap
- webGL
- websockets
- ajax
- node/angular
- jmeter
- ceph
--->
-
-Compilation Notes
------------------
-
-### build your own webkit
-
- March 14, 2018
-
-Let’s compile a release with debug info and install to /usr/local
-
-~~~~~~ {.bash}
-wget https://webkitgtk.org/releases/webkitgtk-2.20.0.tar.xz
-tar -xvf webkitgtk-2.20.0.tar.xz
-cd webkitgtk-2.20.0
-# install all the libs that will be reported missing in the next step.
-# I could not find the woff2 stuff in debian so skipped it...
-cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_WOFF2=NO -GNinja
-# this takes about 30minutes on my i7-4790K .. zzzzz..zzz
-ninja
-sudo ninja install
-~~~~~~~~~~~
-
- pkg-config
-
- pkg-config uses our new build now:
-
- [1] https://trac.webkit.org/wiki/BuildingGtk
- [2] https://webkitgtk.org/
-
-### Build and Install GCC
-
- April 27, 2015
-
-#### Preparations
-Read the prequisites at
-[https://gcc.gnu.org/install/prerequisites.html](https://gcc.gnu.org/install/prerequisites.html)
-and get (most recent versions at time of this writing) the following:
-
-* gcc (5.2.0)
-* binutils (2.25.1)
-
-#### Configure and Build
-
-* unpack binutils-x.y.z
-* create a new directory binutils-x.y.z-build and inside it run the following commands:
-
-~~~~~~ {.bash}
- $ ../binutils-x.y.z/configure --disable-nls --with-sysroot --enable-targets=all
- $ make -j4
- $ make install
-~~~~~~~~~~~~
-
-* unpack gcc-x.y.z and run the contrib/download_prerequisites script inside.
-* create a new directory: gcc-x.y.z-build and inside it run:
-
-~~~~~~ {.bash}
- $ ../gcc-x.y.z/configure --disable-nls --enable-languages=c,c++ --enable-threads
- $ make -j4
- $ make install
-~~~~~~~~~~~~
-
-#### Reference
- [1] binutils and gcc README files.
- [2] https://gcc.gnu.org/install/
- [3] http://wiki.osdev.org/Building_GCC
- [4] http://stackoverflow.com/questions/1726042/recipe-for-compiling-binutils-gcc-together
-
-monad transformers in action
-----------------------------
- January 1,2018
-
- *Main Control.Monad.Writer Control.Monad.State> runState (runWriterT (get >>= \a -> tell ["foo"] >> put (a*a) >> tell ["bar"] >> tell [show a])) 5
-
-emscripten
-----------
- October 1,2017
-
- sdl2 port
- https://github.com/juj/emsdk
- android-ndk-r15c
-
- * accomplish build sys with: sdl2+input+audio+opengl+SDL_net+SDL_thread @ linux, win, osx, ios, android, win-phone, steam, rasp
-
-LUKS container over sshfs
--------------------------
- July 5, 2017
-
-* enable user\_allow\_other in /etc/fuse.conf
-* sshfs -o allow\_root user@server:/BACKUPS/ ~/mnt/
-* dd if=/dev/urandom of=~/mnt/megaloman bs=1M count=512
-* sudo cryptsetup -y luksFormat ~/mnt/megaloman
-* sudo cryptsetup luksOpen ~/mnt/megaloman vol1
-* sudo mkfs.ext4 /dev/mapper/vol1
-* sudo mount /dev/mapper/vol1 /mnt
-* df -h | grep vol1
-* sudo umount /mnt
-* sudo cryptsetup luksClose vol1
-* fusermount -u ~/mnt
-
-NOTE: backup your data example use : rsync -a –info=progress2 source dist
-
-some areas of interest
-----------------------
- December 20, 2014
-
-Some General Topics I am reasearching right now (or plan to do it). Or used to reasearch...
-
-* Neuronal Networks
-* Deep Learning
-* Random Forrests (and other techniques based on Decision Trees)
-* Simmulated Annealing
-* (Linear) Integer Programming
-
-
-Inter Process Communication
----------------------------
- March 14, 2018
-
-We can attach nicely to same memory segment from 2 different processes:
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.c .numberLines}
-// ipc via shared mem
-// attach to shared memory;
-key_t my_ftok = ftok("~/surf-webext-dom-shared-mem",'a');
-
-int mem_seg=shmget(my_ftok,1024*1024,IPC_CREAT|0660);
-if(mem_seg==-1)
-{
-g_print("shmget failed: %s\n",strerror(errno));
-}
-
-shared_buf=shmat(mem_seg,NULL,0);
-if(shared_buf==(void*)-1)
-{
-g_print("shmat failed: %s\n",strerror(errno));
-}
-g_print("attached to shared memory.\n");
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-SSL Certificate CSR
--------------------
-
- February 20, 2015
-
- for apache ssl mod
-
- first check your old csr if you like:
- $ openssl req -text -noout -verify -in CSR.csr
-
- 1. generate key
- $ openssl genrsa -des3 -out www.yourdomain-example.com.key 2048
-
- 2. create CSR
- $ openssl req -new -key www.yourdomain-example.com.key -out www.yourdomain-example.com.csr
-
- refs:
- [1] https://search.thawte.com/support/ssl-digital-certificates/index?page=content&id=AR1108&actp=LIST
-
-Competitive Coding
-------------------
- March 17, 2015
-
-A small selection of websites, which I visit from time to time, addressing competitive coding.
-
-* topcoder.com
-* codeforces.com
-* codility.com
-* codersclan.ne
-* projecteuler.net
-* www.codingame.com (need to check this)
-* www.codechef.com (need to check this)
-* http://psyho.gg/overview-of-programming-contests/ (and read here)
-* https://www.hackerrank.com/
-* http://code.google.com/codejam
-* https://www.kaggle.com/ – predicitve modelling
-* odesk.com / elance
-
-Comp Science Literature
------------------------
- March 17, 2015
-This is a list of some books, focusing on topics around computer science, which I recently read or am currently reading or want to read :P
-
-* Meyers, Effective C++ (Addison-Wesley) C++98 only?
-* Meyers, More Effective C++ (Addison-Wesley) C++98 only?
-* Meyers, Effective STL. C++98 only?
-* Sutter, Exceptional C++
-* Sutter, More Exceptional C++
-* Karlson, Beyond the C++ Standard Library: An Introduction to Boost 1st Edition
-* Maybe Something on Multiprocessing (?)
-* Donald Knuth. The Art Of Computer Programming
-* Algorithms 3rd Edition (by Cormen, Leiserson, Rivest, Stein)
-* Jonathan Bartlett. Programming from the Ground Up
-* C++ in a Nutshell (O’REILLEY, by Lischner)
-* C++ Primer (5th Edition) by Lippman, Lajoie, Moo
-* The C++ Programming Language 4th Edition
-* Anthony Williams, C++ Concurrency in Action: Practical Multihreading
-* Dive into Python (2 and 3) by Mark Pilgrim
-* Learn You a Haskell for Great Good by Marian Lipovaca
-* Real World Haskell
-* Version Control with Git (O’REILLEY, by Loeliger & McCullough) (next: 9(10) ?)
-* The Linux Command Line, by William Shotts (http://linuxcommand.org/tlcl.php)
-* Debian, The Administrators Handbook (by Hertzog and Mas)
-* Absolute FreeBSD by Michael W. Lucas
-* Modern Operating Systems, Third Edition (by Andrew S. Tannebaum)
-* Linux Device Drivers (O’REILLEY, by Corbert, Rubini, Kroah-Hartman)
-* Linux Kernel in a Nutshell (O’REILLEY, Greg Kroah-Hartman)
-
-* Concrete Math (2nd)
-* UPENN cis194
-
-* STOC '83 Proceedings of the fifteenth annual ACM symposium on Theory of computing / Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams
-
-* http://haskellbook.com/
-* Wadler paper "Monads for Functional Programming"
-* simon marlow - book (parallel)
-* data 6 - course (Github)
-* sedgewick & waynes algorithms
-* books from appendix, from programming from ground up?
-
-VNC
----
- April 2, 2015
-
-### Server:
- $ apt-get install tightvncserver
- $ xtightvncserver -geometry 1900×1100
- $ netstat -tap | grep vnc # remember port (e.g.5901)
-
-### Client:
- $ ssh -L 5901:localhost:5901 you@remote # tunnel
- $ xtightvncviewer localhost::5901 # in new terminal
-
-### Kill Server:
- $ vncserver -kill :1 # (or :2 etc..)
-
-Owncloud Notes
---------------
-
-### Mounting Ownclouds DavFS
-
- April 15, 2015
-
- $ apt-get install davfs2
-
- * since owncloud seems to have problems with locks, edit /etc/davfs2/davfs2.conf and set use_locks to 0 in order to allow creating files (as well as probably writing)
-
- $ mount -t davfs https://secure.sf.com/owncloud/remote.php/webdav /mnt/
-
-### rescan/rebuild ownlocud files database
-
- June 22, 2016
-
- inside ownlcoud directory run:
- sudo -u www-owncloud php console.php files:scan –all
-
-
-LXC
----
- April 28, 2015
-
- maybe worth a try:
-
- apt-get install lxc; lxc create ctname -t download — -d debian -r jessie
- -a amd64; lxc-start -d -n ctname, lxc-attach ctname
-
- similar tools: chroot/ debootsrap
-
-Add vim Lang
-------------
- May 14, 2015
-
- $ sudo apt-get install myspell-pl
- $ cd /ush/share/hunspell
- $ vim
- :mkspell pl pl_PL
-
-What every programmer should know about
----------------------------------------
- November 7, 2015
-
- Undefined behaviour: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
- Memory: http://lwn.net/Articles/250967/
- Floating point arithmetic: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
-
-IDE Comparison
---------------
-
- December 7, 2015
-
-While I love working with vim (ctags, taglist, etc..) and the command line, it might be worth to have a look at the following IDE’s for Java and/or C++:
-
-* IntelliJ IDEA
-* Eclipse
-* Eclipse CDT
-* Codeblocks
-* Netbeans
-* Codelite
-* KDevelop
-
-Setup Postfix
--------------
-
-We want to handle different domains on a single postfix server and have virtual users along real unix users. For the virtual users we use uid/gid 5000.
-
-Relevant config files are:
-
- /etc/postfix/master.cf
- /etc/postfix/main.cf
- /etc/postfix/smtpd_sender_login_maps (tells which emails belong to which login)
- /etc/postfix/vmailbox (sepcifies our VIRTUAL mailboxes and the names of the spoolfiles)
- /etc/postfix/virtual (aliases for our local unix users)
- /etc/dovecot/users (specifies the logins, passwords, home directories,..)
- /etc/dovecot/conf.d/10-mail (set inbox and mailbox dirs)
-
-Be careful about the permissions of the different folders, so uid/gid 5000, postfix and dovecot can access as relevant.
-
-A very nice tutorial on setting up postfixadmin can be found here:
-
- https://lelutin.ca/posts/installing_postfix_-_clamav_-_spamassassin_-_dovecot_-_postfixadmin_on_debian_squeeze/
-
-Windows Specific Notes
-----------------------
-
-### disable hiberfile.sys
-
- September 7, 2017
-
- run cmd.exe as administrator:
- powercfg.exe -h off
-
-### GTA4 on NVIDIA-GTX 980
-
- April 17, 2016
-
- Add following flags : -nomemrestrict -norestriction
- Otherwise video memory is not identified correctly.
-
-### Civilization 4 BTS Autosaves
-
- September 23, 2016
-
- In the file: C:\Users\miguel\Documents\My Games\Beyond the Sword\CivilizationIV
-
- Adjust:
-
- ; The maximum number of autosaves kept in the directory before being deleted.
- MaxAutoSaves = 100
-
- ; Specify the number of turns between autoSaves. 0 means no autosave.
- AutoSaveInterval = 1
-
-Fool’s Wiki Knowledge
-=====================
-
- February 24, 2016
-
-Migrated from our former Mediawiki:
-
-Welcome to the Foolo-Pedia! Foolo-Pedia is a growing collection of interesting, important, ridiculous or useless information gathered and refined by the SoftwareFools team for all Friends of Fools. We decided to mainly keep this Wiki in english to be compatible with all our costumers and friends. Some destinct pages maybe in polish, german or klingon.
-
-Articles which might be of universal interest, divided by area and topic.
-
-## Minilinux
-
- software fools minimal linux
-
- 1. usb stick
- 2. create one big partition (2gb)
- 3. mkefs.ext4 /dev/sdx1
- 4. mount /dev/sdx1 /mnt
- 5. compile kernel
- 6. cp bzImage /mnt
- 7. boot
-
- 8.
- grub> search /bzImage
- grub> linux /bzImage root=??
-
- PROBLEMS WITH kernel config!
-
-## Kernel Building
-
- cd linux-source-[xxx]
- make mrproper
- cp someconfig .config -i
- make oldconfig
- make menuconfig
- make localmodconfig
- make localyesconfig
- make
- (OPT) make modules
- su
- make install
- (OPT) make modules_install
- (OPT) update-intiramfs -c -k [kernel-postfix]
-
- (REMOVE UNWANTED FILES FROM BOOT!)
- update-grub
- grub-install /dev/sda
- reboot
-
-## GDB
-
- http://www.cprogramming.com/debuggers.html
-
- use gcc or clang with : -ggdb -O0
-
- h - help
-
- r - run
- c - continue
- n - next
- s - step
-
- b - break <line>
- p - print <var>
-
- wa - watch <var>
-
- bt
- frame <number>
- list
- info locals
-
- set <var> = <value>
- set substitute-path FROM TO
-
- call <func>
-
-## clang
-
- http://llvm.org/releases/3.7.0/docs/CMake.html
- http://clang.llvm.org/get_started.html
- put MAKEFLAGS="-j8" or similar in front of your CMake invocations.
-
- extracted llvm to ~/temp/clang/llvm-3.7.0.src/
- extracted clang to ~/temp/clang/llvm-3.7.0.src/tools/clang/
- extracted compiler-rt to ~/temp/clang/llvm-3.7.0.src/projects/compiler-rt
- extracted libcxx to ~/temp/clang/llvm-3.7.0.src/projects/libcxx
-
- $ cd ~/temp/clang/llvm-3.7.0-build
- $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/miguel/opt/llvm-3.7.0 ../llvm-3.7.0.src
- $ cmake --build .
- $ cmake --build . --target install
-
-## XMPP
-
-### Idea
-
-Today I figured out, once again, that there are many open-source and free (as in freedom) alternatives to all those chat clients and their proprietary protocols, which we dislike and want to avoid. Taking it seriously I decided to set up a XMPP Server on our Softwarefools Server (http://www.softwarefools.com) to finally enable secure and comfortable communication between me, myself and my fellow peers.
-
-### Starting Point
-
-* We have a Debian Virtual Private Server (VPS) Running wheezy (stable)
-* I just found that tutorial: http://wiki.linuxwall.info/doku.php/en:ressources:articles:ejabberd
-
-### I. get package
-
- # apt-get install ejabberd
-
-### II. adapt config
-
-In /etc/ejabberd/ejabberd.cfg adapt the hosts line as that: (if you wonder this is Erlang)
-
- %% Hostname
- {hosts, ["softwarefools.com"]}.
-
-### III. setup certificate
-
- # mkdir /etc/ejabberd/certs
-
-For now we skip the rest of that step and proceed with the self-signed certificate provided by Debian. (/etc/ejabberd/ejabberd.pem)
-
-### IV. restart server
-
- # /etc/init.d/ejabberd restart
-
-### V. create user
-
- # ejabberdctl register miguel softwarefools.com 'pass123'
- # ejabberdctl register niki softwarefools.com 'pass321'
-
-### VI. open ports
-
- # iptables -I INPUT -p tcp --dport 5222 -j ACCEPT
- # iptables -I INPUT -p tcp --dport 5269 -j ACCEPT
-
-TODO: in fact we need more here!
-
-### VII. connect with client
-
-* Get Pidgin http://www.pidgin.im/
-* Connect & Enjoy 
-
-### Further Work
-* certificate
-* dns configuration – should provide xmpp info (?
-
-
-## Benchmark
-
-### Tools for Stress Testing your RIG
-
- May 12, 2017
-
- Some nice tools to stress-test your computer:
-
- CPU: Prime95
- GPU: FurMark
- RAM: MemTest86+
- HDD/SSD: S.M.A.R.T
-
- Ref: http://www.pcworld.com/article/2028882/keep-it-stable-stupid-how-to-stress-test-your-pc-hardware.html
-
-### Networking
-
- 1. Connected my [laptop] and [desktop] via 5meter cat5e cable -> 1000mbit full duplex link
- 2. created ~1.5G ramdisks with tmpfs on each.
- 3. created a 1 giga file with data from /dev/urandom on [desktop]
- 4. copied file with scp from [desktop] to [laptop]
- 5. copied file with scp from [laptop] to [desktop]
- 6. repeated 4 & 5 10 times : average speed ~70+MB/s from desk & 80+MB/s to desk, link stays up all the time. ping around 0.2-0.3ms
- 7. repeated 1-6 with my other 3meter ethernet cable.
- 8. tried both direction simultanously which gave a total data throughput even over 100MB/s
-
-### Hard Disk
-
-To get some information about the disk run:
-
-Request identification info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older -i option.
-
- $ hdparm -I /dev/sda
-
-Timings
-
- $ hdparm -tT /dev/sda
-
-Clear Cache
-
- $ echo 3 > /proc/sys/vm/drop_caches
-
-I am using this block-size and count which results in ~2GB:
-
- $ dd [...] bs=1048576 count=2048
-
-READ:
-
- $ dd if=test of=/dev/null
- $ dd if=/dev/sdX of=/dev/null
-
-WRTIE:
-
- $ dd if=/dev/zero of=test
- $ dd if=/dev/zero of=/dev/sdX
-
-smartmontools:
-
- seatage:
- Raw_Read_Error_Rate
- Seek_Error_Rate
-
- example:
- % python
- >>> 200009354607 & 0xFFFFFFFF
- 2440858991 <---- total number
- >>> (200009354607 & 0xFFFF00000000) >> 32
- 46 <--- number of errors
-
-## Fixing HDD after Free Falling
-
-So you also dropped your hard-disk and some of your secotrs got damaged,
-probably by the head hitting the platter? The following short text outlines,
-how I approached fixing my disk after it hit the floor. Of course I would
-not rely on this disk for mission critical data anymore, but it
-might serve as a scratch/temporarily/redundant space.
-
-Backup all your data in advance because the disk will almost certainly
-require reformatting and repartitoning after follwing this procedure!
-
-Some Tools/Programms I used:
-
-* smartctl
-* hdparm
-* grep
-
-### smartctl
-
-Try from fastest to slowest to find faulty sector: replace LBAi\_START,LBA\_END with meaningful values.
-
- smartctl -t [long|conveyence|short|select,LBA_START-LBA_END] -C /dev/sda
-
-The following did not work for me. Resulted in ‘interrupted by host’ for some reason.
-Probably the disks goes to sleep or something. Issueing some read operations every minute might fix this(?)
-
- -C to run test in foreground mode!
-
-### hdparm
-
-You can bi-search via –read-sector if complete ranges are affected (As in my case) and then fix them in one step:
-
- for i in {36312851..36312886}; do hdparm --write-sector $i /dev/sda; done
-
-### Example
-
-Exemplary session fixing one sector:
-
-**WARNING: this will destroy your data !**
-
- 1) # smartctl -a /dev/sda | egrep 'Pend|Real|Offline_Unc'
-
- 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 4
- 197 Current_Pending_Sector 0x0012 098 098 000 Old_age Always - 47
- 198 Offline_Uncorrectable 0x0010 098 098 000 Old_age Offline - 47
-
- 2) # smartctl -t short /dev/sda
-
- 3) # smartctl -l selftest /dev/sda
-
- [...] 1 Short offline Completed: read failure 90% 10632 152076520
-
- 4) # hdparm --read-sector 152076520 /dev/sda # verification
-
- [...] reading sector 152076520: FAILED: Input/output error
-
- 5) # hdparm --write-sector 152076520 /dev/sda
-
- 6) # smartctl -a /dev/sda | egrep 'Pend|Real|Offline_Unc'
-
- 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 4
- 197 Current_Pending_Sector 0x0012 098 098 000 Old_age Always - 46
- 198 Offline_Uncorrectable 0x0010 098 098 000 Old_age Offline - 46
-
-## Raid and LVM
-
-
- Also refer to: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/foreward.html
-
- Here I will write down some of my considarations about setting up a RAID
- and LVM.
-
- We want to get a performance boost and minimize the ssd wear-out.
- Also we will not put there any mission-critical files, because the content
- of the ssd will not be mirrored. beside regular backups of course.
- We also need to take the limited diskspace into account.
- while our hdd’s are 2*2TB we only have a single 250MB sdd.
-
- So we will be looking at files that are:
-
- * not updated very often
- * read often
- * not critical if they get lost.
- * not too huge
-
- So I consider for my usecase
- * /bin
- * /sbin
- * /boot
- * /lib{,32,64}
-
- * /usr (without /usr/local)
-
- That directories will reside on our raid1 since they contain important files:
- * /home/miguel
- * /root
- * /opt
- * /usr/local
-
- Finally we will mount the following things in ram for superfast and temporary space:
-
- * /tmp
- * /var/log (unless you care about logs)
-
- What about that directories?
- consider speed vs. security vs. drive wear-out
-
- * /etc
- * /var
-
- Never mount swap on your ssd!
-
- == extending logical volume and fs ==
- * https://wiki.archlinux.org/index.php/LVM
-
- # lvextend -L +20G VolGroup00/lvolhome
-
- resize fs (ext2, ext3 or ext4)
- for ext4 this can be done even without unmounting the device
-
- # resize2fs /dev//
-
-## Some RAID Problems on my old Desktop
-
- https://www.thomas-krenn.com/en/wiki/Mdadm_checkarray
- https://plone.lucidsolutions.co.nz/linux/io/ssd-on-nvidia-sata-port-generates-error-eh-in-swncq-mode-and-failed-command-read-fpdma-queued/view
- https://www.howtoforge.com/replacing_hard_disks_in_a_raid1_array
-
- Kernel options: sata_nv.swncq=0
-
- [ 8625.896029] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
- [ 8625.896035] ata5.00: failed command: WRITE DMA EXT
- [ 8625.896040] ata5.00: cmd 35/00:08:50:06:b0/00:00:13:00:00/e0 tag 0 dma 4096 out
- res 40/00:00:00:4f:c2/00:00:00:00:00/40 Emask 0x4 (timeout)
- [ 8625.896043] ata5.00: status: { DRDY }
- [ 8625.896048] ata5: hard resetting link
- [ 8625.896050] ata5: nv: skipping hardreset on occupied port
- [ 8626.364038] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
- [ 8631.372026] ata5.00: qc timeout (cmd 0x27)
- [ 8631.372031] ata5.00: failed to read native max address (err_mask=0x4)
- [ 8631.372033] ata5.00: HPA support seems broken, skipping HPA handling
- [ 8631.372035] ata5.00: revalidation failed (errno=-5)
- [ 8631.372042] ata5: hard resetting link
- [ 8631.372044] ata5: nv: skipping hardreset on occupied port
- [ 8631.840045] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
- [ 8631.864140] ata5.00: configured for UDMA/133
- [ 8631.864146] ata5.00: device reported invalid CHS sector 0
- [ 8631.864154] ata5: EH complete
- [ 8662.888029] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
- [ 8662.888036] ata5.00: failed command: WRITE DMA EXT
- [ 8662.888041] ata5.00: cmd 35/00:08:50:06:b0/00:00:13:00:00/e0 tag 0 dma 4096 out
- res 40/00:00:00:4f:c2/00:00:00:00:00/40 Emask 0x4 (timeout)
- [ 8662.888043] ata5.00: status: { DRDY }
- [ 8662.888049] ata5: hard resetting link
- [ 8662.888051] ata5: nv: skipping hardreset on occupied port
- [ 8663.356038] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
- [ 8663.396135] ata5.00: configured for UDMA/133
- [ 8663.396141] ata5.00: device reported invalid CHS sector 0
- [ 8663.396151] ata5: EH complete
- [ 8693.864031] ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
- [ 8693.864038] ata5.00: failed command: WRITE DMA EXT
- [ 8693.864043] ata5.00: cmd 35/00:08:50:06:b0/00:00:13:00:00/e0 tag 0 dma 4096 out
- res 40/00:00:00:4f:c2/00:00:00:00:00/40 Emask 0x4 (timeout)
- [ 8693.864045] ata5.00: status: { DRDY }
- [ 8693.864051] ata5: hard resetting link
- [ 8693.864052] ata5: nv: skipping hardreset on occupied port
- [ 8694.332036] ata5: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
- [ 8694.356134] ata5.00: configured for UDMA/133
- [ 8694.356141] ata5.00: device reported invalid CHS sector 0
- [ 8694.356150] ata5: EH complete
- [ 8724.840030] ata5: limiting SATA link speed to 1.5 Gbps
-
-
-
diff --git a/080_blog/00015_Admin/00005_Notes-on-Hosting/index.md b/080_blog/00015_Admin/00005_Notes-on-Hosting/index.md
new file mode 100644
index 0000000..1345bf4
--- /dev/null
+++ b/080_blog/00015_Admin/00005_Notes-on-Hosting/index.md
@@ -0,0 +1,53 @@
+# Miscellanous Notes on Server Hosting specifics
+
+## LUKS container over sshfs
+
+* enable user\_allow\_other in /etc/fuse.conf
+* sshfs -o allow\_root user@server:/BACKUPS/ ~/mnt/
+* dd if=/dev/urandom of=~/mnt/megaloman bs=1M count=512
+* sudo cryptsetup -y luksFormat ~/mnt/megaloman
+* sudo cryptsetup luksOpen ~/mnt/megaloman vol1
+* sudo mkfs.ext4 /dev/mapper/vol1
+* sudo mount /dev/mapper/vol1 /mnt
+* df -h | grep vol1
+* sudo umount /mnt
+* sudo cryptsetup luksClose vol1
+* fusermount -u ~/mnt
+
+NOTE: backup your data example use : rsync -a –info=progress2 source dist
+
+## Ownlcoud
+
+### Mounting Ownclouds DavFS
+
+ $ apt-get install davfs2
+
+ * since owncloud seems to have problems with locks, edit /etc/davfs2/davfs2.conf and set use_locks to 0 in order to allow creating files (as well as probably writing)
+
+ $ mount -t davfs https://secure.sf.com/owncloud/remote.php/webdav /mnt/
+
+### rescan/rebuild ownlocud files database
+
+ inside ownlcoud directory run:
+ sudo -u www-owncloud php console.php files:scan –all
+
+## Postfix
+
+We want to handle different domains on a single postfix server and have virtual users along real unix users.
+For the virtual users we use uid/gid 5000.
+
+Relevant config files are:
+
+ /etc/postfix/master.cf
+ /etc/postfix/main.cf
+ /etc/postfix/smtpd_sender_login_maps (tells which emails belong to which login)
+ /etc/postfix/vmailbox (sepcifies our VIRTUAL mailboxes and the names of the spoolfiles)
+ /etc/postfix/virtual (aliases for our local unix users)
+ /etc/dovecot/users (specifies the logins, passwords, home directories,..)
+ /etc/dovecot/conf.d/10-mail (set inbox and mailbox dirs)
+
+Be careful about the permissions of the different folders, so uid/gid 5000, postfix and dovecot can access as relevant.
+
+A very nice tutorial on setting up postfixadmin can be found here:
+
+ https://lelutin.ca/posts/installing_postfix_-_clamav_-_spamassassin_-_dovecot_-_postfixadmin_on_debian_squeeze/
diff --git a/080_blog/00015_Admin/00008_Docker/index.md b/080_blog/00015_Admin/00008_Docker/index.md
new file mode 100644
index 0000000..b7bc5c0
--- /dev/null
+++ b/080_blog/00015_Admin/00008_Docker/index.md
@@ -0,0 +1,14 @@
+# Docker Volume Backup
+
+Identify volume:
+
+ $ docker inspect my_container_name | grep -C 1 -i Source
+
+Backup the directory to a tar file:
+
+ $ docker run –rm –volumes-from my_container_name -v $(pwd):/backup ubuntu tar cvf /backup/backup_db.tar /var/lib/mysql
+
+Restore the volume:
+
+ $ docker run –rm –volumes-from my_container_name -v $(pwd):/backup ubuntu bash -c "cd /var/lib/mysql && tar xvf /backup/backup_db.tar –strip 1"
+
diff --git a/080_blog/00015_Admin/00010_Various-Cheat-Sheets/00120_GDB/index.md b/080_blog/00015_Admin/00010_Various-Cheat-Sheets/00120_GDB/index.md
new file mode 100644
index 0000000..5aebdf3
--- /dev/null
+++ b/080_blog/00015_Admin/00010_Various-Cheat-Sheets/00120_GDB/index.md
@@ -0,0 +1,29 @@
+# GDB
+
+ http://www.cprogramming.com/debuggers.html
+
+ use gcc or clang with : -ggdb -O0
+
+ h - help
+
+ r - run
+ c - continue
+ n - next
+ s - step
+
+ b - break <line>
+ p - print <var>
+
+ wa - watch <var>
+
+ bt
+ frame <number>
+ list
+ info locals
+
+ set <var> = <value>
+ set substitute-path FROM TO
+
+ call <func>
+
+
diff --git a/080_blog/00015_Admin/00020_Benchmarking-and-Stress-testing/index.md b/080_blog/00015_Admin/00020_Benchmarking-and-Stress-testing/index.md
new file mode 100644
index 0000000..facfc17
--- /dev/null
+++ b/080_blog/00015_Admin/00020_Benchmarking-and-Stress-testing/index.md
@@ -0,0 +1,68 @@
+# Benchmarking
+
+ May 12, 2017
+
+## Tools for Stress Testing your RIG
+
+ Some nice tools to stress-test your computer:
+
+ CPU: Prime95
+ GPU: FurMark
+ RAM: MemTest86+
+ HDD/SSD: S.M.A.R.T
+
+ Ref: http://www.pcworld.com/article/2028882/keep-it-stable-stupid-how-to-stress-test-your-pc-hardware.html
+
+## Networking
+
+ 1. Connected my [laptop] and [desktop] via 5meter cat5e cable -> 1000mbit full duplex link
+ 2. created ~1.5G ramdisks with tmpfs on each.
+ 3. created a 1 giga file with data from /dev/urandom on [desktop]
+ 4. copied file with scp from [desktop] to [laptop]
+ 5. copied file with scp from [laptop] to [desktop]
+ 6. repeated 4 & 5 10 times : average speed ~70+MB/s from desk & 80+MB/s to desk, link stays up all the time. ping around 0.2-0.3ms
+ 7. repeated 1-6 with my other 3meter ethernet cable.
+ 8. tried both direction simultanously which gave a total data throughput even over 100MB/s
+
+## Hard Disk
+
+To get some information about the disk run:
+
+Request identification info directly from the drive, which is displayed in a new expanded format with considerably more detail than with the older -i option.
+
+ $ hdparm -I /dev/sda
+
+Timings
+
+ $ hdparm -tT /dev/sda
+
+Clear Cache
+
+ $ echo 3 > /proc/sys/vm/drop_caches
+
+I am using this block-size and count which results in ~2GB:
+
+ $ dd [...] bs=1048576 count=2048
+
+READ:
+
+ $ dd if=test of=/dev/null
+ $ dd if=/dev/sdX of=/dev/null
+
+WRTIE:
+
+ $ dd if=/dev/zero of=test
+ $ dd if=/dev/zero of=/dev/sdX
+
+smartmontools:
+
+ seatage:
+ Raw_Read_Error_Rate
+ Seek_Error_Rate
+
+ example:
+ % python
+ >>> 200009354607 & 0xFFFFFFFF
+ 2440858991 <---- total number
+ >>> (200009354607 & 0xFFFF00000000) >> 32
+ 46 <--- number of errors
diff --git a/080_blog/00015_Admin/00030_Fixing-HDD/index.md b/080_blog/00015_Admin/00030_Fixing-HDD/index.md
new file mode 100644
index 0000000..0bae730
--- /dev/null
+++ b/080_blog/00015_Admin/00030_Fixing-HDD/index.md
@@ -0,0 +1,48 @@
+# Fixing HDD after Free Falling
+
+So you also dropped your hard-disk and some of your secotrs got damaged,
+probably by the head hitting the platter?
+
+Backup all your data.
+
+## smartctl
+
+Try from fastest to slowest to find faulty sector: replace LBAi\_START,LBA\_END with meaningful values.
+
+ smartctl -t [long|conveyence|short|select,LBA_START-LBA_END] -C /dev/sda
+
+## hdparm
+
+Bi-search via –read-sector if complete ranges are affected (as in my case) and then fix them in one step:
+
+ for i in {36312851..36312886}; do hdparm --write-sector $i /dev/sda; done
+
+## Example
+
+Exemplary session fixing one sector:
+
+**WARNING: this will destroy your data !**
+
+ 1) # smartctl -a /dev/sda | egrep 'Pend|Real|Offline_Unc'
+
+ 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 4
+ 197 Current_Pending_Sector 0x0012 098 098 000 Old_age Always - 47
+ 198 Offline_Uncorrectable 0x0010 098 098 000 Old_age Offline - 47
+
+ 2) # smartctl -t short /dev/sda
+
+ 3) # smartctl -l selftest /dev/sda
+
+ [...] 1 Short offline Completed: read failure 90% 10632 152076520
+
+ 4) # hdparm --read-sector 152076520 /dev/sda # verification
+
+ [...] reading sector 152076520: FAILED: Input/output error
+
+ 5) # hdparm --write-sector 152076520 /dev/sda
+
+ 6) # smartctl -a /dev/sda | egrep 'Pend|Real|Offline_Unc'
+
+ 5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always - 4
+ 197 Current_Pending_Sector 0x0012 098 098 000 Old_age Always - 46
+ 198 Offline_Uncorrectable 0x0010 098 098 000 Old_age Offline - 46
diff --git a/080_blog/00015_Admin/00040_Oneliners/index.md b/080_blog/00015_Admin/00040_Oneliners/index.md
new file mode 100644
index 0000000..c16a515
--- /dev/null
+++ b/080_blog/00015_Admin/00040_Oneliners/index.md
@@ -0,0 +1,41 @@
+# Oneliners
+
+A Growing Collection of Linux Command Line One-Liners
+
+Please believe me... this collection was really supposed to grow over time...
+
+inside a direcotry show disk usage of all hidden files and directories and sort by size:
+
+ $ du $(ls .* -d | tail -n +3) -hs |sort -h
+
+inside a direcotry show disk usage of all files and directories (also hidden) and sort by size.
+Exclude 'garbage' file.
+
+ $ du . -a -d 1 -h --exclude=garbage | sort -h
+
+Tar all files in current directory, excluding ./DATA and ./.cache
+
+ $ tar --exclude=.cache -cvf home_miguel_20180216.tar .
+
+Find files in ./ARCHIVE NOT belonging to a specific user: miguel
+
+ $ find ARCHIVE/ \! -user miguel
+
+set folder/ permissions to Read/Browse only for owner recursively
+
+ $ sudo chmod -R u=r,g=,o= folder/
+ $ chmod -R u=rX,g=,o= folder/
+
+find all mails from Boban when in the maildir full of mailboxes and print only short headers without bodies:
+
+ $ grepmail -H -B -Y ‘(^TO:|^From:)’ Boban *
+
+not really a one-lier but will print 256 colors in a bash:
+
+ for i in {0..255} ; do
+ printf "\x1b[48;5;%sm%3d\e[0m " "$i" "$i"
+ if (( i == 15 )) || (( i > 15 )) && (( (i-15) % 6 == 0 )); then
+ printf "\n";
+ fi
+ done
+
diff --git a/080_blog/00015_Admin/00090_Miguels-KVM-Adventures/index.md b/080_blog/00015_Admin/00090_Miguels-KVM-Adventures/index.md
index 7f4e105..722d20f 100644
--- a/080_blog/00015_Admin/00090_Miguels-KVM-Adventures/index.md
+++ b/080_blog/00015_Admin/00090_Miguels-KVM-Adventures/index.md
@@ -194,7 +194,7 @@ A common use case is to run docker inside the virtual guests, which makes it an
}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Optionally you can tell rsyslog to log deamon.* entries into a separate file and adjust logrotation as outlined here [5].
+Optionally you can tell rsyslog to log deamon.\* entries into a separate file and adjust logrotation as outlined here [5].
## Miscellaneous
@@ -202,6 +202,14 @@ Optionally you can tell rsyslog to log deamon.* entries into a separate file and
virt-host-validate # validate host virtualization setup
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Use this RedHat virtio drivers when you install win10 [6].
+
+* https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/
+
+Forward ipv4 to an ipv6 only:
+
+socat TCP4-LISTEN:51247,fork,su=nobody TCP6:[2a01:4f8:192:5112::6]:51247
+
## References
[1] https://libvirt.org/formatdomain.html
@@ -209,4 +217,4 @@ Optionally you can tell rsyslog to log deamon.* entries into a separate file and
[3] http://repo.firewall-services.com/misc/virt/virt-backup.pl
[4] https://www.linux-kvm.org/page/Tuning_KVM
[5] https://www.wolfe.id.au/2015/05/03/syslog-logging-driver-for-docker/
-
+ [6] https://www.funtoo.org/Windows_10_Virtualization_with_KVM
diff --git a/080_blog/00030_The-Hell-of-Autotools/index.md b/080_blog/00018_Building/00030_The-Hell-of-Autotools/index.md
index 746bd82..746bd82 100644
--- a/080_blog/00030_The-Hell-of-Autotools/index.md
+++ b/080_blog/00018_Building/00030_The-Hell-of-Autotools/index.md
diff --git a/080_blog/00018_Building/00040_Various-notes-on-Building/index.md b/080_blog/00018_Building/00040_Various-notes-on-Building/index.md
new file mode 100644
index 0000000..0639063
--- /dev/null
+++ b/080_blog/00018_Building/00040_Various-notes-on-Building/index.md
@@ -0,0 +1,93 @@
+# Various Notes on Building
+
+## Webkit
+
+Let’s compile a release with debug info and install to /usr/local
+
+~~~~~~ {.bash}
+wget https://webkitgtk.org/releases/webkitgtk-2.20.0.tar.xz
+tar -xvf webkitgtk-2.20.0.tar.xz
+cd webkitgtk-2.20.0
+# install all the libs that will be reported missing in the next step.
+# I could not find the woff2 stuff in debian so skipped it...
+cmake -DPORT=GTK -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_WOFF2=NO -GNinja
+# this takes about 30minutes on my i7-4790K .. zzzzz..zzz
+ninja
+sudo ninja install
+~~~~~~~~~~~
+
+ pkg-config
+
+ pkg-config uses our new build now:
+
+ [1] https://trac.webkit.org/wiki/BuildingGtk
+ [2] https://webkitgtk.org/
+
+## GCC
+
+This is how I build gcc (5.2.0) and binutils (2.25.1). Check [5] first.
+
+* unpack binutils-x.y.z
+* create a new directory binutils-x.y.z-build and inside it run the following commands:
+
+~~~~~~ {.bash}
+ $ ../binutils-x.y.z/configure --disable-nls --with-sysroot --enable-targets=all
+ $ make -j4
+ $ make install
+~~~~~~~~~~~~
+
+* unpack gcc-x.y.z and run the contrib/download_prerequisites script inside.
+* create a new directory: gcc-x.y.z-build and inside it run:
+
+~~~~~~ {.bash}
+ $ ../gcc-x.y.z/configure --disable-nls --enable-languages=c,c++ --enable-threads
+ $ make -j4
+ $ make install
+~~~~~~~~~~~~
+
+ REF:
+
+ [1] binutils and gcc README files.
+ [2] https://gcc.gnu.org/install/
+ [3] http://wiki.osdev.org/Building_GCC
+ [4] http://stackoverflow.com/questions/1726042/recipe-for-compiling-binutils-gcc-together
+ [5] https://gcc.gnu.org/install/prerequisites.html
+
+## Linux
+
+ cd linux-source-[xxx]
+ make mrproper
+ cp someconfig .config -i
+ make oldconfig
+ make menuconfig
+ make localmodconfig
+ make localyesconfig
+ make
+ (OPT) make modules
+ su
+ make install
+ (OPT) make modules_install
+ (OPT) update-intiramfs -c -k [kernel-postfix]
+
+ (REMOVE UNWANTED FILES FROM BOOT!)
+ update-grub
+ grub-install /dev/sda
+ reboot
+
+
+## Clang
+
+ http://llvm.org/releases/3.7.0/docs/CMake.html
+ http://clang.llvm.org/get_started.html
+ put MAKEFLAGS="-j8" or similar in front of your CMake invocations.
+
+ extracted llvm to ~/temp/clang/llvm-3.7.0.src/
+ extracted clang to ~/temp/clang/llvm-3.7.0.src/tools/clang/
+ extracted compiler-rt to ~/temp/clang/llvm-3.7.0.src/projects/compiler-rt
+ extracted libcxx to ~/temp/clang/llvm-3.7.0.src/projects/libcxx
+
+ $ cd ~/temp/clang/llvm-3.7.0-build
+ $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/home/miguel/opt/llvm-3.7.0 ../llvm-3.7.0.src
+ $ cmake --build .
+ $ cmake --build . --target install
+
diff --git a/080_blog/00018_Building/index.md b/080_blog/00018_Building/index.md
new file mode 100644
index 0000000..1ee18e7
--- /dev/null
+++ b/080_blog/00018_Building/index.md
@@ -0,0 +1,3 @@
+# Building
+
+Some Random Notes about Building Software.
diff --git a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/1.png b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/1.png
index 4a28a5b..4a28a5b 100644
--- a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/1.png
+++ b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/1.png
Binary files differ
diff --git a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/2.png b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/2.png
index 980bef5..980bef5 100644
--- a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/2.png
+++ b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/2.png
Binary files differ
diff --git a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/3.png b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/3.png
index 6deb011..6deb011 100644
--- a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/3.png
+++ b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/3.png
Binary files differ
diff --git a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/4.png b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/4.png
index 90c2d8a..90c2d8a 100644
--- a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/4.png
+++ b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/4.png
Binary files differ
diff --git a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/index.md b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/index.md
index fab8cab..fab8cab 100644
--- a/080_blog/00020_3D-Art/00035_A-quick-Trumpet-in-Blender/index.md
+++ b/080_blog/00020_Visual-Art/00035_A-quick-Trumpet-in-Blender/index.md
diff --git a/080_blog/00020_3D-Art/index.md b/080_blog/00020_Visual-Art/index.md
index b840fc7..b840fc7 100644
--- a/080_blog/00020_3D-Art/index.md
+++ b/080_blog/00020_Visual-Art/index.md
diff --git a/080_blog/00020_WWW-Projects-and-Apps/index.md b/080_blog/00020_WWW-Projects-and-Apps/index.md
index fff14bc..75069b5 100644
--- a/080_blog/00020_WWW-Projects-and-Apps/index.md
+++ b/080_blog/00020_WWW-Projects-and-Apps/index.md
@@ -4,11 +4,12 @@ WWW and Apps
A random selection of Web-sites, Web-shops, Web-portals and Mobile Apps.
Most of this constitute contracted work.
+
<!--
TODOS/IDEAS:
-backlinks/contact
+backlinks from our pages/contact
team: julka + matjas + niki (+koko projects?)
vienna-warsaw-berlin
form/tel/contact
@@ -27,11 +28,11 @@ todo-app screenshot
<div class="row">
{BEGIN:CARD}
-casamila.png
+scale_casamila.png
Casamila - Architects
casamila.pl
2018
--badge-secondary online soon
+-badge-success online
-badge-primary new
-badge-info wordpress
@@ -40,7 +41,7 @@ Extensive Template customization according to client requirements.
{END:CARD}
{BEGIN:CARD}
-bunzlauershop.png
+scale_bunzlauershop.png
Web Shop - Bunzlauer
bunzlauer.shop
2018
@@ -53,7 +54,7 @@ shipping of beautiful handcrafted polish pottery.
{END:CARD}
{BEGIN:CARD}
-aquarelle.jpg
+scale_aquarelle.jpg
G. Mueller Watercolors
gerhard-mueller-aquarelle.de
2018
@@ -65,7 +66,7 @@ Website of Gerhard Müller hosting his watarcolour paintings. Relaunched 2018. F
{END:CARD}
{BEGIN:CARD}
-mmtour.png
+scale_mmtour.png
Mille Miglia - Blog
mmtour.krzysztofidziorek.pl
2017
@@ -78,7 +79,7 @@ roads of the historic Mille Miglia race in Fall 2017.
{END:CARD}
{BEGIN:CARD}
-atenefunds.png
+scale_atenefunds.png
AteneKOM Funds
GooglePlay / AppStore
2018
@@ -93,7 +94,7 @@ Entries are continually updated and expanded and can be filtered by topics.
{END:CARD}
{BEGIN:CARD}
-mazury.png
+scale_mazury.png
Ratuj Mazury
ratuj-mazury.pl
2016
@@ -106,7 +107,7 @@ Masurian area. Template was designed from scratch.
{BEGIN:CARD}
-wekkaprojekt.png
+scale_wekkaprojekt.png
Wekka Projekt - Architects
wekka-projekt.pl
2016
@@ -119,7 +120,7 @@ Template was designed from scratch.
{BEGIN:CARD}
-norti.png
+scale_norti.png
Norton Motorcycles Fan Club
nortonmotorcycles.co.uk
2018
@@ -132,7 +133,7 @@ Relaunched 2018 on Wordpress. Fomer TYPO3.
{BEGIN:CARD}
-bunzlauer.png
+scale_bunzlauer.png
Bunzlauer Keramik
bunzlauerkeramik.at
2018
@@ -145,7 +146,7 @@ Relaunched 2018 on Wordpress. Fomer TYPO3.
{END:CARD}
{BEGIN:CARD}
-cornea.png
+scale_cornea.png
Cornea Franz
GooglePlay / AppStore
2013
@@ -159,7 +160,7 @@ Mobile App with a simple Backend porviding legal News.
{BEGIN:CARD}
-link-all.png
+scale_link-all.png
Link-All Software
link-all.eu
2013
@@ -172,7 +173,7 @@ Customized OsCommerce.
{BEGIN:CARD}
-bildershopping.png
+scale_bildershopping.png
Bilder Shop - Art Prints
bildershopping.at
2010
@@ -184,7 +185,7 @@ Custom OsCommerce Webshop selling various Art Prints
{BEGIN:CARD}
-nadler.png
+scale_nadler.png
Nadler - Wine Shop
nadler-hanny.at
2007
@@ -196,7 +197,7 @@ In 2007 coded the super-light custom PHP Shop for the Website of this Austrian W
{BEGIN:CARD}
-panner.jpg
+scale_panner.jpg
Panner - Stamp Shop
panner.net
2006
@@ -208,7 +209,7 @@ backend for user management and analysis.
{END:CARD}
{BEGIN:CARD}
-panner-admin.png
+scale_panner-admin.png
Stamp Shop Backend
panner.net/admin
2006
@@ -219,7 +220,7 @@ Custom extensiv backend for the panner.net stamps webshop with complex user mana
{END:CARD}
{BEGIN:CARD}
-maiden.jpg
+scale_maiden.jpg
Maiden Entertainment
maidenentertainment.com
2005
@@ -230,7 +231,7 @@ Website of an independent Music and Video Producer.
{END:CARD}
{BEGIN:CARD}
-flipper2.jpg
+scale_flipper2.jpg
Flipper Grafik
flipper-grafik.at
2004
@@ -241,7 +242,7 @@ Advertising Agency in Vienna, Austria.
{END:CARD}
{BEGIN:CARD}
-cqs.jpg
+scale_cqs.jpg
Complex Quantum Systems
coqus.at
2006
@@ -253,7 +254,7 @@ Website of the Doctoral Program on Complex Quantum Systems of the University Vie
{BEGIN:CARD}
-ikm.jpg
+scale_ikm.jpg
Institut fuer Kulturmanagement
mdw.ac.at/ikm/
2003
@@ -266,7 +267,7 @@ Advanced book-browsing tools for the Insitutes library.
{BEGIN:CARD}
-preschl.jpg
+scale_preschl.jpg
Claudia Preschl
personal.mdw.ac.at/preschl/
2004
@@ -277,7 +278,7 @@ Website of Prof. Claudia Preschl of the University of Music and Performing Arts,
{BEGIN:CARD}
-textlabor.jpg
+scale_textlabor.jpg
Textlabor
textlabor.at
2006
@@ -289,7 +290,7 @@ Website of Jolande Peck-Himmel, PR Consultant specializing in Print and Online M
{BEGIN:CARD}
-lev.jpg
+scale_lev.jpg
LEV Wien
levwien.at
2006
@@ -301,7 +302,7 @@ Website of the Parents Council of Music Shools of Vienna.
{BEGIN:CARD}
-meersalzgrotte.png
+scale_meersalzgrotte.png
Saliseum
meersalzgrotte.at
2008
@@ -313,7 +314,7 @@ Very light custom PHP Website of the Sea-Salt-Cave Saliseum in Vienna.
{BEGIN:CARD}
-telenetprofi.png
+scale_telenetprofi.png
Telenet Profi
telenetprofi.at
2011
@@ -324,7 +325,7 @@ Website of a Cell Phone Store in Vienna.
{BEGIN:CARD}
-breitbandausschreibungen1.png
+scale_breitbandausschreibungen1.png
Broadband Tenders Germany
breitbandausschreibungen.de
2014
@@ -337,7 +338,7 @@ Platform for Coorindation of German Broadband Tender Programmes.
{END:CARD}
{BEGIN:CARD}
-maiden2.png
+scale_maiden2.png
Maiden Reloaded
maidenenterteinmanet.com
2010
@@ -348,7 +349,7 @@ Reloaded version of the Website of the indy Video and Music producer Maiden Ente
{END:CARD}
{BEGIN:CARD}
-brlr1.png
+scale_brlr1.png
BRLR Monitoring
breitbandbuero.de/monitoring/
2011
@@ -361,7 +362,7 @@ Monitoring of Broadband projects according to the "Bundesrahmenregeleung Leerror
{BEGIN:CARD}
-atenekom.jpg
+scale_atenekom.jpg
AteneKOM Website
atenekom.eu
2012
@@ -373,7 +374,7 @@ Former Website of the atene KOM Agency.
{BEGIN:CARD}
-todoapp.png
+scale_todoapp.png
Online Task Management
Intranet
2013
@@ -384,7 +385,7 @@ Browser-based tool for Assignment and Monitoring of Tasks within the Company.
{BEGIN:CARD}
-sensor.png
+scale_sensor.png
Sensor for GIS
Intranet
2013
@@ -397,7 +398,7 @@ Tool for spatial Analysis of Broadband related Customer Data.
{BEGIN:CARD}
-ringy.png
+scale_ringy.png
ZT Ringsmuth
zt-ringsmuth.at
2015
@@ -408,7 +409,7 @@ Website of Civil Engineer Ernst Ringsmuth.
{END:CARD}
{BEGIN:CARD}
-platin.png
+scale_platin.png
Platin - Billard & Darts
platin-billard.at
2009
@@ -419,7 +420,7 @@ Platin Bar. Works included taking Photographs for this Website as well.
{END:CARD}
{BEGIN:CARD}
-balbuza.png
+scale_balbuza.png
Broetchenstube
broetchenstube-baden.at
2007
@@ -430,7 +431,7 @@ Website of a Catering Company located in Baden, Austria.
{END:CARD}
{BEGIN:CARD}
-aufbau.jpg
+scale_aufbau.jpg
Cultural Administration Studies
mdw.ac.at/ikm/kulturmanagement/
2007
@@ -441,7 +442,7 @@ Lightweight Website of postgradual studies at the University of Music and Perfor
{END:CARD}
{BEGIN:CARD}
-kunst-stuecke.png
+scale_kunst-stuecke.png
Kunst-Stuecke Art Gallery
kunst-stuecke.at
2007
@@ -453,7 +454,7 @@ Light CMS driven Website for an art gallery in Vienna.
{BEGIN:CARD}
-cuadro.png
+scale_cuadro.png
Cuadro Architects
cuadro.com.pl
2006
@@ -464,7 +465,7 @@ Architecture Website for Cuadro
{END:CARD}
{BEGIN:CARD}
-foto-pschill.png
+scale_foto-pschill.png
Gallery for Fotografie Pschill
fotografie-pschill.at
2006
@@ -475,7 +476,7 @@ Create a PHP Gallery for this Photographers website.
{END:CARD}
{BEGIN:CARD}
-werbereich.png
+scale_werbereich.png
Werbereich Creative Agency
werbereich.at
2006
@@ -486,7 +487,7 @@ Technical implementation of the Website of this Creative Agency
{END:CARD}
{BEGIN:CARD}
-immoconnect.png
+scale_immoconnect.png
Immoconnect Real Estate
immoconnect.net
2006
@@ -496,7 +497,7 @@ Light single-page Website for an Austrian Real Estate Agency.
{END:CARD}
{BEGIN:CARD}
-austria-org-pl.png
+scale_austria-org-pl.png
Austrian Cultural Forum
austria.org.pl
2007
@@ -507,7 +508,7 @@ Impleneted the news archive for the Austrian Cultural Forum located in Warsaw.
{END:CARD}
{BEGIN:CARD}
-condition-red.png
+scale_condition-red.png
Condition Red - Band
condition-red.com
2005
@@ -518,7 +519,7 @@ Flash driven Website of the Rock and Metal Band: Condition RED.
{END:CARD}
{BEGIN:CARD}
-austrian-wine.png
+scale_austrian-wine.png
Austrian Wine
austrian-wine.at
2005
@@ -528,7 +529,7 @@ Website for an exporter of Austrian Wines.
{END:CARD}
{BEGIN:CARD}
-copterwerk.png
+scale_copterwerk.png
Copterwerk - Drone Services
copterwerk.com
2011
diff --git a/080_blog/00035_Programming/00010_IPC/.index.md.swp b/080_blog/00035_Programming/00010_IPC/.index.md.swp
new file mode 100644
index 0000000..87e0eaa
--- /dev/null
+++ b/080_blog/00035_Programming/00010_IPC/.index.md.swp
Binary files differ
diff --git a/080_blog/00035_Programming/00010_IPC/index.md b/080_blog/00035_Programming/00010_IPC/index.md
new file mode 100644
index 0000000..e42e38f
--- /dev/null
+++ b/080_blog/00035_Programming/00010_IPC/index.md
@@ -0,0 +1,24 @@
+# Inter Process Communication
+ March 14, 2018
+
+We can attach nicely to same memory segment from 2 different processes:
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.c .numberLines}
+// ipc via shared mem
+// attach to shared memory;
+key_t my_ftok = ftok("~/surf-webext-dom-shared-mem",'a');
+
+int mem_seg=shmget(my_ftok,1024*1024,IPC_CREAT|0660);
+if(mem_seg==-1)
+{
+g_print("shmget failed: %s\n",strerror(errno));
+}
+
+shared_buf=shmat(mem_seg,NULL,0);
+if(shared_buf==(void*)-1)
+{
+g_print("shmat failed: %s\n",strerror(errno));
+}
+g_print("attached to shared memory.\n");
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
diff --git a/080_blog/00035_Programming/00015_Competitive-Coding/index.md b/080_blog/00035_Programming/00015_Competitive-Coding/index.md
new file mode 100644
index 0000000..df847e7
--- /dev/null
+++ b/080_blog/00035_Programming/00015_Competitive-Coding/index.md
@@ -0,0 +1,17 @@
+# Competitive Coding
+
+A small selection of websites, which I visit from time to time, addressing competitive coding.
+
+* topcoder.com
+* codeforces.com
+* codility.com
+* codersclan.ne
+* projecteuler.net
+* www.codingame.com (need to check this)
+* www.codechef.com (need to check this)
+* http://psyho.gg/overview-of-programming-contests/ (and read here)
+* https://www.hackerrank.com/
+* http://code.google.com/codejam
+* https://www.kaggle.com/ – predicitve modelling
+* odesk.com / elance
+
diff --git a/080_blog/00035_Programming/00020_Computer-Science-Literature/index.md b/080_blog/00035_Programming/00020_Computer-Science-Literature/index.md
new file mode 100644
index 0000000..114294e
--- /dev/null
+++ b/080_blog/00035_Programming/00020_Computer-Science-Literature/index.md
@@ -0,0 +1,48 @@
+
+# Comp Science Literature
+This is a list of some books, focusing on topics around computer science, which I recently read or am currently reading or want to read :P
+
+* Anthony Williams, C++ Concurrency in Action: Practical Multihreading
+* The Boost C++ Libraries, Boris Schäling (Online book)
+* Meyers, Effective C++ (Addison-Wesley) C++98 only?
+* Meyers, More Effective C++ (Addison-Wesley) C++98 only?
+* Meyers, Effective STL. C++98 only?
+* Sutter, Exceptional C++
+* Sutter, More Exceptional C++
+* Karlson, Beyond the C++ Standard Library: An Introduction to Boost 1st Edition
+* Maybe Something on Multiprocessing (?)
+* Donald Knuth. The Art Of Computer Programming
+* Algorithms 3rd Edition (by Cormen, Leiserson, Rivest, Stein)
+* Jonathan Bartlett. Programming from the Ground Up
+* C++ in a Nutshell (O’REILLEY, by Lischner)
+* C++ Primer (5th Edition) by Lippman, Lajoie, Moo
+* The C++ Programming Language 4th Edition
+* Dive into Python (2 and 3) by Mark Pilgrim
+* Version Control with Git (O’REILLEY, by Loeliger & McCullough) (next: 9(10) ?)
+* The Linux Command Line, by William Shotts (http://linuxcommand.org/tlcl.php)
+* Debian, The Administrators Handbook (by Hertzog and Mas)
+* Absolute FreeBSD by Michael W. Lucas
+* Modern Operating Systems, Third Edition (by Andrew S. Tannebaum)
+* Linux Device Drivers (O’REILLEY, by Corbert, Rubini, Kroah-Hartman)
+* Linux Kernel in a Nutshell (O’REILLEY, Greg Kroah-Hartman)
+* Concrete Math (2nd)
+* STOC '83 Proceedings of the fifteenth annual ACM symposium on Theory of computing / Primitives for the manipulation of general subdivisions and the computation of Voronoi diagrams
+* sedgewick & waynes algorithms
+* books from appendix, from programming from ground up?
+
+## What every programmer should know about
+
+* Undefined behaviour: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html
+* Memory: http://lwn.net/Articles/250967/
+* Floating point arithmetic: https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html
+
+## some areas of interest
+
+Some General Topics I am reasearching right now (or plan to do it). Or used to reasearch...
+
+* Neuronal Networks
+* Deep Learning
+* Random Forrests (and other techniques based on Decision Trees)
+* Simmulated Annealing
+* (Linear) Integer Programming
+
diff --git a/080_blog/00035_Programming/index.md b/080_blog/00035_Programming/index.md
new file mode 100644
index 0000000..3424ab3
--- /dev/null
+++ b/080_blog/00035_Programming/index.md
@@ -0,0 +1,3 @@
+# Programming
+Some programming related stuff.
+
diff --git a/080_blog/00038_Theory/00010_Totient-Function/index.md b/080_blog/00038_Theory/00010_Totient-Function/index.md
new file mode 100644
index 0000000..eea75f4
--- /dev/null
+++ b/080_blog/00038_Theory/00010_Totient-Function/index.md
@@ -0,0 +1,16 @@
+# Euler's totient function
+
+And now something completely different. Straight from the World of Number Theory.
+Frankly, I just wanted to show off the powers of my new Estatico functionality
+and give tribute to my all time hero **Leonhard Euler**.
+
+## Definition
+
+For a given value _n_ this function returns the number of positive integers,
+relatively prime to _n_ up to _n_.
+
+## Computing
+
+You can compute it for instance via _Euler's product formula_, multiplying
+over the distinct prime numbers dividing _p_:
+$$\varphi(n) =n \prod_{p\mid n} \left(1-\frac{1}{p}\right)$$
diff --git a/080_blog/00038_Theory/index.md b/080_blog/00038_Theory/index.md
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/080_blog/00038_Theory/index.md
diff --git a/080_blog/00040_Haskell-Projects/00065_Base64-Encoder/index.md b/080_blog/00040_Haskell-Projects/00065_Base64-Encoder/index.md
deleted file mode 100644
index 830ed8d..0000000
--- a/080_blog/00040_Haskell-Projects/00065_Base64-Encoder/index.md
+++ /dev/null
@@ -1,51 +0,0 @@
-Miguel's Naive Base64 Encoder
-==============================
- February 19, 2018
-
-Coded on a winter afterfnoon on 19th Feb 2018 A.D. to fully understand
-base64 encoding and play with haskell, which is always an indisputable
-pleasure.
-
-The following lines were written in full awareness that 'libraries' for
-this very purpose, which perform way better, are in existence.
-
-Coded in big anger due to nick's stories about saving his binary format,
-encrypted passwords in an ascii config file, featuring
-strange letters and characters.
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell .numberLines}
--- File: base64.hs --
-
-import Data.Char
-import Text.Printf
-import qualified Data.List as L
-import qualified Data.List.Split as T
-
-toBase64 x = maskBase64 x . toBase64core . asciiToBin . binFill $ x
-toBase64core = map base64toDigit . map binToDec . T.chunksOf 6
-
-base64toDigit x = (['A'..'Z']++['a'..'z']++['0'..'9']++['+','/']) !! x
-binToDec = sum . map (2^) . L.findIndices (=='1') . reverse
-asciiToBin = concat . map (\y -> printf "%08b" y) . map ord
-binFill x = x ++ (take (fill64length x) $ cycle "\000")
-
-maskBase64 o x = take (length x - l ) x ++ (take l $ cycle "=")
- where l = (fill64length o)
-
-fill64length x | m==0 = 0
- | otherwise = 3-m
- where m=mod (length x) 3
-
-main = do
- line <- getLine
- putStrLn $ toBase64 line
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Example usage, with decoding via `base64 -d`
-
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.bash}
-miguel@megaloman:~$ echo -n "secret haskell" | runghc base64.hs
-c2VjcmV0IGhhc2tlbGw=
-miguel@megaloman:~$ echo -n "c2VjcmV0IGhhc2tlbGw=" | base64 -d # decode to check
-secret haskell
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.glade b/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.glade
deleted file mode 100644
index db09761..0000000
--- a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.glade
+++ /dev/null
@@ -1,312 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.0 -->
-<interface>
- <requires lib="gtk+" version="3.20"/>
- <object class="GtkWindow" id="mainWindow">
- <property name="can_focus">False</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="homogeneous">True</property>
- <child>
- <object class="GtkBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkScrolledWindow" id=" ">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkTextView" id="hist">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkTextView" id="output">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="cursor_visible">False</property>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkGrid">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="row_homogeneous">True</property>
- <property name="column_homogeneous">True</property>
- <child>
- <object class="GtkButton" id="1">
- <property name="label" translatable="yes">1</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="2">
- <property name="label" translatable="yes">2</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="3">
- <property name="label" translatable="yes">3</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="4">
- <property name="label" translatable="yes">4</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="5">
- <property name="label" translatable="yes">5</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="6">
- <property name="label" translatable="yes">6</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="7">
- <property name="label" translatable="yes">7</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="8">
- <property name="label" translatable="yes">8</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="9">
- <property name="label" translatable="yes">9</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="0">
- <property name="label" translatable="yes">0</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id=".">
- <property name="label" translatable="yes">.</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="=">
- <property name="label" translatable="yes">=</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="(">
- <property name="label" translatable="yes">(</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="+">
- <property name="label" translatable="yes">+</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="-">
- <property name="label" translatable="yes">-</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="*">
- <property name="label" translatable="yes">*</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="/">
- <property name="label" translatable="yes">/</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">4</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="CLR">
- <property name="label" translatable="yes">CLR</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="DEL">
- <property name="label" translatable="yes">DEL</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id=")">
- <property name="label" translatable="yes">)</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- </object>
- <packing>
- <property name="left_attach">3</property>
- <property name="top_attach">3</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.hs b/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.hs
deleted file mode 100644
index ec47e05..0000000
--- a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.hs
+++ /dev/null
@@ -1,74 +0,0 @@
--- Simple Stupid Calculator demonstrating basic gtk/glade and parsec parser usage --
--- Hacked togeter by Miguel on May 3, 2018
-
-{-# LANGUAGE PackageImports #-}
-import "gtk3" Graphics.UI.Gtk
-import Control.Monad.IO.Class
-import Data.ByteString.Char8 (pack,unpack)
-import Numeric
-import Text.Parsec
-import Text.Parsec.Expr
-import Text.Parsec.Language
-import Text.Parsec.Number (fractional2)
-import Text.Parsec.Token
-
--- parse calculation --
-calc s = case parse expr "" s of Right x -> showFFloat Nothing x ""
- _ -> "?"
-
-table = [ [binary "*" (*) AssocLeft, binary "/" (/) AssocLeft ]
- , [binary "+" (+) AssocLeft, binary "-" (-) AssocLeft ] ]
-
-lexer = makeTokenParser haskellDef
-expr = buildExpressionParser table term <?> "expression"
-term = parens lexer expr <|> fractional2 False <?> "simple expression"
-
-binary name fun assoc = Infix (do{ reservedOp lexer name; return fun }) assoc
-
--- gui for the calculator --
-main = do initGUI
- builder <- builderNew
- builderAddFromFile builder "calc.glade"
- window <- builderGetObject builder castToWindow "mainWindow"
- output <- builderGetObject builder castToTextView "output"
- outputBuff <- textViewGetBuffer output
- hist <- builderGetObject builder castToTextView "hist"
- histBuff <- textViewGetBuffer hist
- end<-textBufferGetEndIter histBuff
- histMark <- textBufferCreateMark histBuff Nothing end True
-
- let conn = connBtn builder outputBuff
- connA = connBtnAct builder outputBuff
-
- -- connecting buttons --
- sequence_ $ conn <$> map show [0..9] ++ ["+","-","/","*","(",")","."]
-
- connA "CLR" $ textBufferSetByteString outputBuff (pack "")
- connA "DEL" $ manipTextBuff outputBuff (\x -> case x of [] -> []; xs -> init xs)
- connA "=" $ do txt<-getTextBuff outputBuff
- manipTextBuff outputBuff calc
- res<-getTextBuff outputBuff
- manipTextBuff histBuff (\x -> x++txt++" = "++res++"\n")
- end<-textBufferGetEndIter histBuff
- textBufferMoveMark histBuff histMark end
- textViewScrollToMark hist histMark 0 $ Just (0,1)
- return ()
-
- -- handler to run on window destruction
- window `on` deleteEvent $ do liftIO mainQuit
- return False
- widgetShowAll window
- mainGUI
-
-getTextBuff outputBuff = do start<-textBufferGetStartIter outputBuff
- end<-textBufferGetEndIter outputBuff
- unpack <$> textBufferGetByteString outputBuff start end True
-
-manipTextBuff outputBuff action = do txt<-getTextBuff outputBuff
- textBufferSetByteString outputBuff (pack $ action $ txt)
-
-connBtn builder buff label = connBtnAct builder buff label $
- textBufferInsertByteStringAtCursor buff (pack label)
-
-connBtnAct builder buff label act = do btn <- builderGetObject builder castToButton label
- btn `on` buttonActivated $ act
diff --git a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.png b/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.png
deleted file mode 100644
index 7cb35c3..0000000
--- a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/calc.png
+++ /dev/null
Binary files differ
diff --git a/080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/SimpleSvg.hs b/080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/SimpleSvg.hs
deleted file mode 100644
index 7b44557..0000000
--- a/080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/SimpleSvg.hs
+++ /dev/null
@@ -1,179 +0,0 @@
---
--- Miguel's Simple SVG Generator
---
--- Author: Michal Idziorek <m.i@gmx.at>
--- Last Update: May 11th, 2018
---
-
-{-# LANGUAGE ExistentialQuantification #-}
-
-module SimpleSvg (
-
- svgExample1 -- predefined example canvas
- -- you can generate the output string via:
- -- putStr $ svgGenerate svgExample1
-
- ,svgGenerate -- canvas to svg
-
- ,svgEmpty -- empty canvas
- ,svgAdd -- add to canvas (single)
- ,svgAddList -- add to canvas (list)
-
- ,svgCircle -- circle
- ,svgLine -- line
- ,svgTriangle -- trianvle
-
- ,svgFilledCircle -- filled circle
- ,svgFilledLine -- filled line
- ,svgFilledTriangle -- filled trianvle
-
- ,svgColor -- colors and shades of gray
- ,svgRed
- ,svgGreen
- ,svgBlue
- ,svgWhite
- ,svgBlack
- ,svgShGray
-
-
- ,svgRedLine -- red line
- ,svgBluePoint -- small blue circle
- ,svgGreenTriangle -- green triangle
-
-
- ) where
-
--- CONFIG --
-
-svgStrokeWidth = 2
-
--- EXAMPLE CANVAS --
-
--- Demonstrating how to add a few objects to a light gray 300x200 canvas
-
-svgExample1 = svgAddList (svgEmpty (svgShGray 200) 300 200) $
- [ svgRedLine (0,0) (200,200)
- ,svgRedLine (300,0) (100,200)
- ,svgBluePoint (33,133)
- ,svgBluePoint (33,22)
- ,svgBluePoint (66,25)
- ,svgFilledTriangle svgBlack svgWhite (20,20) (100,100) (10,90)
- ,svgFilledCircle svgWhite svgGreen (150,120) 30
- ]++
- map (svgBluePoint . (,) 250) [50,60..150]
-
-
--- SHAPES --
-
--- A few predefined shapes easing a quickstart as well as serving as an
--- example, for how to define them in your own code.
-
-svgRedLine = svgLine svgRed
-svgBluePoint pos = svgCircle svgBlue pos 2
-svgGreenTriangle = svgTriangle svgGreen
-
-
--- Shape construction
-
-svgLine c (x1,y1) (x2,y2) =
- svgShape c (SvgLine (svgCoord x1 y1) (svgCoord x2 y2))
-
-svgCircle c (x,y) r =
- svgShape c (SvgCircle (svgCoord x y) r)
-
-svgTriangle c (x1,y1) (x2,y2) (x3,y3)=
- svgShape c (SvgTriangle (svgCoord x1 y1) (svgCoord x2 y2) (svgCoord x3 y3))
-
-svgFilledLine c1 c2 (x1,y1) (x2,y2) =
- svgFilledShape c1 c2 (SvgLine (svgCoord x1 y1) (svgCoord x2 y2))
-
-svgFilledCircle c1 c2 (x,y) r =
- svgFilledShape c1 c2 (SvgCircle (svgCoord x y) r)
-
-svgFilledTriangle c1 c2 (x1,y1) (x2,y2) (x3,y3)=
- svgFilledShape c1 c2 (SvgTriangle (svgCoord x1 y1) (svgCoord x2 y2) (svgCoord x3 y3))
-
-svgShape c1 = SvgPrim c1 (svgNoFill)
-svgFilledShape c1 c2 = SvgPrim c1 (svgFill c2)
-
--- CANVAS --
-
-data SvgCanvas = SvgCanvas SvgColor Int Int [SvgPrim]
-
-svgEmpty c w h = SvgCanvas c w h []
-svgAdd (SvgCanvas c w h xs) x = SvgCanvas c w h (x:xs)
-svgAddList (SvgCanvas c w h xs) ys = SvgCanvas c w h (reverse ys++xs)
-
-svgGenerate (SvgCanvas col width height prims) =
- xml_enc "svg" [("height",show height),("width", show width),
- ("style","background-color:"++svgGenColor col)]
- body
- where body = foldl f "" prims
- f a x = primToSvg x++a
-
--- COLORS --
-
--- color type along with a few predefined colors to work with
-
-newtype SvgColor = SvgColor (Int,Int,Int)
-svgColor r g b = SvgColor (r,g,b)
-svgRed = svgColor 255 0 0
-svgBlue = svgColor 0 0 255
-svgGreen = svgColor 0 255 0
-svgShGray v = svgColor v v v
-svgBlack = svgShGray 0
-svgWhite = svgShGray 255
-
-svgGenColor (SvgColor (r,g,b)) = "rgb("++show r++","++show g++","++show b++")"
-
--- the fill color is wrapped inside a Maybe type, since it is optional
-
-newtype SvgFill = SvgFill (Maybe SvgColor)
-svgFill col = SvgFill (Just col)
-svgNoFill = SvgFill Nothing
-
--- SHAPES --
-
--- A class for shapes that we want to transform into SVG
--- We define instances for circle, line and triangle
--- The 2D coordinates are wrapped inside a newtype SvgCoord
-
-newtype SvgCoord = SvgCoord (Double,Double)
-svgCoord x y = SvgCoord (x,y)
-
-data SvgPrim = forall a.SvgPrimClass a => SvgPrim SvgColor SvgFill a
-
-class SvgPrimClass a where
- getSvg :: a->(String,[(String,String)])
-
-data SvgCircle = SvgCircle SvgCoord Double
-instance SvgPrimClass SvgCircle where
- getSvg (SvgCircle (SvgCoord (x,y)) r) =
- ("circle", [("cx",show x),("cy",show y),("r",show r)])
-
-data SvgLine = SvgLine SvgCoord SvgCoord
-instance SvgPrimClass SvgLine where
- getSvg (SvgLine (SvgCoord (x1,y1)) (SvgCoord (x2,y2))) =
- ("line", [("x1",show x1),("y1",show y1),
- ("x2",show x2),("y2",show y2)])
-
-data SvgTriangle = SvgTriangle SvgCoord SvgCoord SvgCoord
-instance SvgPrimClass SvgTriangle where
- getSvg (SvgTriangle (SvgCoord (x1,y1)) (SvgCoord (x2,y2)) (SvgCoord (x3,y3))) =
- ("polygon", [("points",pts)])
- where pts=show x1++","++show y1++" "++
- show x2++","++show y2++" "++
- show x3++","++show y3
-
--- transform single primitve to SVG
-primToSvg (SvgPrim col (SvgFill fill) prim) = xml_enc tag (attrs++attrs2) ""
- where (tag, attrs)=getSvg prim
- attrs2=[ ("fill",maybe "none" svgGenColor fill)
- ,("stroke",svgGenColor col)
- ,("stroke-width",show svgStrokeWidth)]
-
--- XML ENCODER --
-
-xml_enc tag attrs body = "<"++tag++" "++xml_attrs++">"++body++"</"++tag++">"
- where xml_attrs = unlines $ map xml_attr attrs
- xml_attr (a,v) = a++"=\""++v++"\" "
diff --git a/080_blog/00040_Haskell-Projects/00200_Estatico-Page-Maker/index.md b/080_blog/00040_Haskell-Projects/00200_Estatico-Page-Maker/index.md
deleted file mode 100644
index 04bb46a..0000000
--- a/080_blog/00040_Haskell-Projects/00200_Estatico-Page-Maker/index.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# Estático - A Static Website Genertor coded in Haskell
-
- April 12, 2018
-
-About two weeks ago, for personal reasons, I decided to switch my website
-from a well known PHP driven CMS solution, to a light and static set
-of html pages.
-
-I used this fact to write my own simple static website generator.
-And, Yes... I know there are already hundereds of such genertors
-out there, but I wanted to practice Haskell and my masturbatory solution
-fits in about 200 lines of code, including comments and type signatures.
-
-I use pandoc for all the heavy work, as syntax highlighting and parsing
-of the markdown files, anyway.
-
-## Features
-
-* No Database
-* Static Content
-* Sitemap derived from Directory Tree
-* Simple Markdown Files
-
-## Try It
-You can find the most recent version here and build it with _stack_.
-
-* [https://gitweb.softwarefools.com/?p=miguel/staticuswww.git](https://gitweb.softwarefools.com/?p=miguel/staticuswww.git)
-
-__Do not forget to adapt the Makefile to your requirements__
-
-## Examples
-The only example I know of, is this very page: _idziorek.net_
-You can find it's sources here:
-
-* [https://gitweb.softwarefools.com/?p=miguel/idziorek\_net.git](https://gitweb.softwarefools.com/?p=miguel/idziorek_net.git)
diff --git a/080_blog/00040_Haskell-Projects/index.md b/080_blog/00040_Haskell-Projects/index.md
deleted file mode 100644
index 5a0766d..0000000
--- a/080_blog/00040_Haskell-Projects/index.md
+++ /dev/null
@@ -1,4 +0,0 @@
-Haskell
-=======
-
-Some of my small and tiny Haskell creations and notes.
diff --git a/080_blog/00040_Haskell/00010_Links-and-Notes-and-Literature/index.md b/080_blog/00040_Haskell/00010_Links-and-Notes-and-Literature/index.md
new file mode 100644
index 0000000..6e82b3b
--- /dev/null
+++ b/080_blog/00040_Haskell/00010_Links-and-Notes-and-Literature/index.md
@@ -0,0 +1,36 @@
+# Haskell
+
+## Books, Links and Papers
+
+* **Learn You a Haskell** for Great Good by Marian Lipovaca
+* **Real World Haskell** by Bryan O'Sullivan, Don Stewart, and John Goerzen
+* **Parallel and Concurrent Programming in Haskell** by Simon Marlow
+
+* **Haskell Wiki** https://wiki.haskell.org
+* **UPENN CIS 194** https://www.seas.upenn.edu/~cis194/spring13/
+* **What I Wish I Knew When Learning Haskell** by Stephen Diehl
+* **Data61 Course** https://github.com/data61/fp-course
+
+* **Monads for functional programming (paper)** by Philip Wadler
+* **Functional Pearl (paper)**
+* **Why Functional Programming Matters (paper)**
+
+* **Mailing Lists** https://www.haskell.org/mailing-lists/
+* **IRC** #haskell at chat.freenode.at
+* **Monadic Warsaw**
+
+
+## Xmonad
+
+My little contribution to xmonad-contrib:
+
+* Added pretty printer for empty visible workspaces (wrapped in Maybe)
+ https://github.com/xmonad/xmonad-contrib/pull/241
+
+## GHC Flags (TODO: put here all the other flags I have documentend in this Makefile somweher :P )
+ -gq ?
+
+## monad transformers in action
+
+ Main Control.Monad.Writer Control.Monad.State> runState (runWriterT (get >>= \a -> tell ["foo"] >> put (a*a) >> tell ["bar"] >> tell [show a])) 5
+
diff --git a/080_blog/00040_Haskell-Projects/00040_Graham-Scan/index.md b/080_blog/00040_Haskell/00040_Graham-Scan/index.md
index 195dbe1..195dbe1 100644
--- a/080_blog/00040_Haskell-Projects/00040_Graham-Scan/index.md
+++ b/080_blog/00040_Haskell/00040_Graham-Scan/index.md
diff --git a/080_blog/00040_Haskell/00065_Base64-Encoder/base64.cast b/080_blog/00040_Haskell/00065_Base64-Encoder/base64.cast
new file mode 100644
index 0000000..63fece1
--- /dev/null
+++ b/080_blog/00040_Haskell/00065_Base64-Encoder/base64.cast
@@ -0,0 +1,322 @@
+{
+ "duration": 14.820928,
+ "title": null,
+ "env": {
+ "SHELL": "/bin/bash",
+ "TERM": "screen-256color"
+ },
+ "width": 106,
+ "stdout": [
+ [
+ 0.019966,
+ "miguel@megaloman:~$ "
+ ],
+ [
+ 1.524665,
+ "t"
+ ],
+ [
+ 0.08111,
+ "h"
+ ],
+ [
+ 0.095838,
+ "i"
+ ],
+ [
+ 0.118019,
+ "s"
+ ],
+ [
+ 0.086883,
+ " "
+ ],
+ [
+ 0.089573,
+ "i"
+ ],
+ [
+ 0.134283,
+ "s"
+ ],
+ [
+ 0.096031,
+ " "
+ ],
+ [
+ 0.114016,
+ "a"
+ ],
+ [
+ 0.166151,
+ " "
+ ],
+ [
+ 0.319094,
+ "l"
+ ],
+ [
+ 0.195916,
+ "o"
+ ],
+ [
+ 0.142042,
+ "c"
+ ],
+ [
+ 0.139961,
+ "a"
+ ],
+ [
+ 0.07801,
+ "l"
+ ],
+ [
+ 0.081012,
+ " "
+ ],
+ [
+ 0.094941,
+ "a"
+ ],
+ [
+ 0.120898,
+ "s"
+ ],
+ [
+ 0.107959,
+ "c"
+ ],
+ [
+ 0.115993,
+ "i"
+ ],
+ [
+ 0.137871,
+ "i"
+ ],
+ [
+ 0.205335,
+ "n"
+ ],
+ [
+ 0.108673,
+ "e"
+ ],
+ [
+ 0.127436,
+ "m"
+ ],
+ [
+ 0.123916,
+ "a"
+ ],
+ [
+ 0.244565,
+ "\r\n"
+ ],
+ [
+ 0.000482,
+ "bash: this: command not found\r\n"
+ ],
+ [
+ 0.000346,
+ "miguel@megaloman:~$ "
+ ],
+ [
+ 1.012884,
+ "this is a local asciinema"
+ ],
+ [
+ 0.230737,
+ "\r\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C"
+ ],
+ [
+ 0.140235,
+ "\u001b[1@e"
+ ],
+ [
+ 0.097927,
+ "\u001b[1@c"
+ ],
+ [
+ 0.188824,
+ "\u001b[1@j"
+ ],
+ [
+ 0.000974,
+ "\u001b[1@o"
+ ],
+ [
+ 0.421424,
+ "\b\u001b[1P"
+ ],
+ [
+ 0.117902,
+ "\b\u001b[1P"
+ ],
+ [
+ 0.208192,
+ "\u001b[1@h"
+ ],
+ [
+ 0.115112,
+ "\u001b[1@ "
+ ],
+ [
+ 0.012814,
+ "\u001b[1@o"
+ ],
+ [
+ 0.295287,
+ "\r\n"
+ ],
+ [
+ 0.000755,
+ "bash: ech: command not found\r\n"
+ ],
+ [
+ 0.000509,
+ "miguel@megaloman:~$ "
+ ],
+ [
+ 0.480858,
+ "ech othis is a local asciinema"
+ ],
+ [
+ 0.192018,
+ "\r\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C\u001b[C"
+ ],
+ [
+ 0.237975,
+ "\u001b[C"
+ ],
+ [
+ 0.118994,
+ "\u001b[C"
+ ],
+ [
+ 0.146091,
+ "\u001b[1P"
+ ],
+ [
+ 0.348015,
+ "\u001b[1P"
+ ],
+ [
+ 0.562446,
+ "\u001b[1@h"
+ ],
+ [
+ 0.437804,
+ "\u001b[C"
+ ],
+ [
+ 0.219332,
+ "\u001b[1@ "
+ ],
+ [
+ 0.220637,
+ "\r\n"
+ ],
+ [
+ 0.000486,
+ "this is a local asciinema\r\n"
+ ],
+ [
+ 0.000206,
+ "miguel@megaloman:~$ "
+ ],
+ [
+ 1.218406,
+ "m"
+ ],
+ [
+ 0.079499,
+ "c"
+ ],
+ [
+ 0.170894,
+ "\r\n"
+ ],
+ [
+ 0.00735,
+ "\u001b[?1049h\u001b[?1h\u001b="
+ ],
+ [
+ 0.000586,
+ "\u001b[1;9r\u001b[4l\u001b(B\u001b)0\u001b[9;1H\u001b[m\u000f\u001b[37m\u001b[40m\u001b[m\u000f\u001b[39;49m\r \r\u001b[?1l\u001b>\u001b[?1049l\u001b[?1049h\u001b[?1h\u001b="
+ ],
+ [
+ 0.021657,
+ "\u001b[?1001s\u001b[?1002h\u001b[?1006h\u001b[?2004h"
+ ],
+ [
+ 0.000429,
+ "\u001b[1;9r\u001b[4l\u001b(B\u001b)0\u001b[?1h\u001b=\u001b[m\u000f\u001b[39m\u001b[49m\u001b[1;9r\u001b[H\u001b[J\u001b[2;105H\u001b[1K \u001b[37m\u001b[40m|\u001b[2;106H"
+ ],
+ [
+ 0.000193,
+ "\b\u001b[39m\u001b[49m\u001b[1K \u001b[37m\u001b[40m╗\u001b[2;106H"
+ ],
+ [
+ 0.000114,
+ "\b\u001b[39m\u001b[49m\u001b[1K \u001b[37m\u001b[40m/\u001b[2;106H"
+ ],
+ [
+ 0.000129,
+ "\b\u001b[39m\u001b[49m\u001b[1K \u001b[37m\u001b[40m╗\u001b[2;106H"
+ ],
+ [
+ 0.000156,
+ "\u001b]0;mc [miguel@megaloman]:~\u0007\u001b>"
+ ],
+ [
+ 0.000337,
+ "\u001b[7;1H\u001b[39m\u001b[49mHint: Want your plain shell? Press C-o, and get back to MC with C-o again.\u001b[7;106H"
+ ],
+ [
+ 0.000251,
+ "\u001b]0;mc [miguel@megaloman]:~\u0007\u001b>"
+ ],
+ [
+ 0.000102,
+ "\u001b[1;1H\u001b[30m\u001b[47m Left File Command Options Right \u001b[2;1H\u001b[37m\u001b[40m╔«═\u001b[97m\u001b[105m ~ \u001b[37m\u001b[40m═════════════════════════════════════════⋅[^]»╗╔«═ ~ ═════════════════════════════════════════⋅[^]»\r\n║\u001b[97m↑n Name \u001b[37m│\u001b[97m Size \u001b[37m│\u001b[97mModify time \u001b[37m║║\u001b[97m↑n Name \u001b[37m│\u001b[97m Size \u001b[37m│\u001b[97mModify time \u001b[37m║\u001b[4;1H╟───────────────────────────────────────────────────╢╟───────────────────────────────────────────────────╢\u001b[5;1H║UP--DIR ║║"
+ ],
+ [
+ 1e-05,
+ "UP--DIR ║\u001b[6;1H╚═════════════════════════════════ 158G/234G (67%) ═╝╚═════════════════════════════════ 158G/234G (67%) ═╝\u001b[8;1H\u001b[39m\u001b[49mmiguel@megaloman:~$\u001b[84C\u001b[31m[^]\u001b[9;1H 1\u001b[97mHelp \u001b[31m 2\u001b[97mMenu \u001b[31m 3\u001b[97mView \u001b[31m 4\u001b[97mEdit \u001b[31m 5\u001b[97mCopy \u001b[31m 6\u001b[97mRenMov \u001b[31m 7\u001b[97mMkdir \u001b[31m 8\u001b[97mDelete \u001b[31m 9\u001b[97mPullDn \u001b[31m10\u001b[97mQuit \u001b[9;105H \b\u001b[4h \u001b[4l\u001b[8;21H"
+ ],
+ [
+ 1.221371,
+ "\u001b[1;1H\u001b[39m \u001b[2;1H \u001b[3;1H \u001b[4;1H \u001b[5;1H \u001b[6;1H \u001b[7;1H \u001b[8;1H \u001b[9;1H \u001b[1;106H\u001b[?2"
+ ],
+ [
+ 4.5e-05,
+ "004l\u001b[?1006l\u001b[?1002l\u001b[?1001r"
+ ],
+ [
+ 0.000416,
+ "\u001b[?1l\u001b>\u001b[9;1H\u001b[m\u000f\u001b[39;49m\r \r\u001b[?1l\u001b>\u001b[?1049l\u001b[39;49m"
+ ],
+ [
+ 0.000319,
+ "\r\n"
+ ],
+ [
+ 0.001118,
+ "miguel@megaloman:~$ "
+ ],
+ [
+ 0.791031,
+ "e"
+ ],
+ [
+ 0.62602,
+ "\b\u001b[K"
+ ]
+ ],
+ "height": 9,
+ "command": null,
+ "version": 1
+} \ No newline at end of file
diff --git a/080_blog/00040_Haskell/00065_Base64-Encoder/index.md b/080_blog/00040_Haskell/00065_Base64-Encoder/index.md
new file mode 100644
index 0000000..0ede6cf
--- /dev/null
+++ b/080_blog/00040_Haskell/00065_Base64-Encoder/index.md
@@ -0,0 +1,19 @@
+Miguel's Base64 Encoder
+=======================
+ February 19, 2018
+
+Coded on a winter afternoon to fully understand **base64 encoding** and play with
+**Haskell**, which is always an indisputable pleasure.
+
+Coded in _big anger_, due to Nick's fairy tales about saving his encrypted binary
+data in plain ASCII configuration files, featuring strange letters and
+non-printable characters. :P
+
+<asciinema-player cols="106" rows="9" preload="true" theme="solarized-dark" autoplay="true" src="base64.cast"></asciinema-player>
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.haskell .numberLines}
+{BEGIN:EMBED}
+https://gitweb.softwarefools.com/?p=miguel/haskell.git;a=blob_plain;f=base64/base64.hs
+{END:EMBED}
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The above code was auto-fetched from: <https://gitweb.softwarefools.com/?p=miguel/haskell.git;a=blob_plain;f=base64/base64.hs>
diff --git a/080_blog/00040_Haskell-Projects/00120_Lambda-Calculus/index.md b/080_blog/00040_Haskell/00120_Lambda-Calculus/index.md
index 25c6b83..25c6b83 100644
--- a/080_blog/00040_Haskell-Projects/00120_Lambda-Calculus/index.md
+++ b/080_blog/00040_Haskell/00120_Lambda-Calculus/index.md
diff --git a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/index.md b/080_blog/00040_Haskell/00130_Calculator-on-Parsec-and-GTK/index.md
index 381b017..381b017 100644
--- a/080_blog/00040_Haskell-Projects/00130_Calculator-on-Parsec-and-GTK/index.md
+++ b/080_blog/00040_Haskell/00130_Calculator-on-Parsec-and-GTK/index.md
diff --git a/080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/index.md b/080_blog/00040_Haskell/00140_Minimalistic-SVG-Generator/index.md
index 8211ba2..8211ba2 100644
--- a/080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/index.md
+++ b/080_blog/00040_Haskell/00140_Minimalistic-SVG-Generator/index.md
diff --git a/080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/svg.png b/080_blog/00040_Haskell/00140_Minimalistic-SVG-Generator/svg.png
index d679fad..d679fad 100644
--- a/080_blog/00040_Haskell-Projects/00140_Minimalistic-SVG-Generator/svg.png
+++ b/080_blog/00040_Haskell/00140_Minimalistic-SVG-Generator/svg.png
Binary files differ
diff --git a/080_blog/00040_Haskell/00150_Applicative-vs-Monadic-Parsing/index.md b/080_blog/00040_Haskell/00150_Applicative-vs-Monadic-Parsing/index.md
new file mode 100644
index 0000000..f9b3a4e
--- /dev/null
+++ b/080_blog/00040_Haskell/00150_Applicative-vs-Monadic-Parsing/index.md
@@ -0,0 +1 @@
+Coming sooner... or later.
diff --git a/080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md
new file mode 100644
index 0000000..63f9816
--- /dev/null
+++ b/080_blog/00040_Haskell/00200_Estatico-Page-Maker/index.md
@@ -0,0 +1,55 @@
+# estático - static website generator
+
+ April 12, 2018
+
+Two weeks ago I decided to switch my website from a well known PHP
+driven CMS solution, to a light and static set of HTML pages.
+
+And so I wrote a simple static website generator in
+**Haskell**. Of course I know that there are already hundreds out there,
+but I wanted my own masturbatory solution.
+
+I use **pandoc** et al. for most of the work anyway.
+
+## Features
+
+* **No** Database
+* Input with Simple **Markdown** Files
+* Generates **Static HTML** Content
+* Embedding data **fetched** via **http/https**
+* Embedding self-hosted **asciinema** casts
+* Embedding Latex formulas via **MathJx**
+* Image Scaling with **ImageMagick**
+* Syntax **Highlighting**
+
+## Try It
+You can find the most recent version following the links below.
+Build it with _stack_ or use the docker images.
+
+* <https://gitweb.softwarefools.com/?p=miguel/estatico.git>
+* <https://github.com/miguelclean/estatico>
+* <https://hub.docker.com/r/migueldirty/estatico/builds>
+
+## Example Usage
+__NOTE: make sure DIR\_OUT exists and is a free directory__
+
+You can use the example websites inside the examples/ directory for a start.
+
+Inside the input directory (e.g. ./examples/example01/) run something along this lines:
+
+ DIR_IN=`pwd`
+ DIR_OUT=/mnt/yourwebsiteroot
+ HTML_ROOT=https://www.example.com
+ SUDO=sudo
+ IMAGE=migueldirty/estatico
+ ${SUDO} docker run --rm -v${DIR_IN}:/in:ro -v${DIR_OUT}:/out:rw ${IMAGE} /in /out ${HTML_ROOT}
+
+Or if you want to test it locally use some local DIR\_OUT and HTML\_ROOT instead:
+
+ DIR_OUT=/home/miguel/testpage
+ HTML_ROOT=/home/miguel/testpage
+
+The only real life example I know of, is this very page: _idziorek.net_
+You can find it's sources here:
+
+* <https://gitweb.softwarefools.com/?p=miguel/idziorek_net.git>
diff --git a/080_blog/00040_Haskell/index.md b/080_blog/00040_Haskell/index.md
new file mode 100644
index 0000000..2c02a65
--- /dev/null
+++ b/080_blog/00040_Haskell/index.md
@@ -0,0 +1,8 @@
+Haskell
+=======
+
+Originally coming from structured and object-oriented programming, I fell
+in love with Haskell a couple of years ago. I appreciate it's purity
+and laziness and the powerful, static type system.
+
+You can find here my notes and tiny toy projects related to Haskell.
diff --git a/080_blog/00110_Fool-Operating-System/index.md b/080_blog/00110_Fool-Operating-System/index.md
new file mode 100644
index 0000000..23e18d4
--- /dev/null
+++ b/080_blog/00110_Fool-Operating-System/index.md
@@ -0,0 +1,9 @@
+Fool OS
+=======
+
+My little buggy toy operating system is a never ending work in progres...
+
+* [reference](https://www.idziorek.net/~miguel/fool-os-ref/)
+* [git](https://gitweb.softwarefools.com/?p=miguel/fool-os.git)
+
+The ref is outdates as far as I saw last time..