Old projects
Simpleblog

I once had a blog on WordPress. And they canceled my free hosting, bourgeoisie! And it was so nice, green, it's a pity.

pawlak

But this time I wanted something different, on my server, on my terms (and on my bills). I modeled it after WordPress but without a relational database - I only had one PHP script, SSH console and my posts from the old blog.

As the project developed, there were experiments with the Single Page Application skin.

Below is my "skurkawudka" skin for November (the website you are currently viewing is based on this theme):

preview

I also created an administration panel that was not permanently tied to the main application; it could be turned off or removed:

preview

The more projects I did, the more knowledge I gained about designing web applications. And here were the design mistakes made:

  1. WordPress is a cool application but a terrible framework - it works well, has a theme and plugin system but WordPress code is like old versions of PHP, don't imitate that style
  2. no public directory: there is an index.php file in it which initializes the entire application and the application itself is hidden a directory lower - the visitor will not enter there
  3. poor coding style
  4. PHP code mixed with HTML - DON'T DO THAT! Use MVC
  5. PHP close tag: you have to be careful with this - there is a reason why PSR does not allow the closing tag
  6. flat file database: poorly designed, the more posts the slower - potential bottleneck
  7. setup procedure - there shouldn't be one
  8. config via global array
  9. security: PHP is a language that allows you to do stupid things - the administration panel lacks attention to this
  10. welded to specific HTML classes (inflexible)

The last mistake was that I had too few articles for the CMS to make sense - that's why Bash SSG received the updates and not Simpleblog.

Despite the design mistakes I made, I learned a few things and the best thing: I created my own website template (frontend is not my strongest point).

XP2VDI

Easily convert an existing Windows installation to a virtual machine image

Three scripts:

  1. creates a disk image
  2. installs the IDE drivers, in MS Windows 2000/2003/XP installation in a disk image using the chntpw reged program from Linux
  3. automates the whole process
Server admin page

Modular web admin panel

One of many projects that was created as part of Debian router. The application allows you to change system settings, view logs and machine status, as well as control the local network (BAN FOR THE DISRESPECTIVE) since my server also acts as a router.

The idea comes from 2017, when I converted my old PC into a NAS server. With this application I could mount disks and also check the amount of free space (since the project cost me 0 ojro). You can see the NAS admin page repository here.

That's when I also invented acpid-autosuspend.sh and acpid-choice.sh, which are currently in the acpid-mods package (we need to save electricity - be green, Pepe the frog knows that, just ask him).

I made an application for my router in the same way, you can see it here. The more tools I created, the bigger the mess it became. I decided to move my programs to packages.

And here was the problem: the app was a monolith. So I redesigned the app so that every single thing was done by a single module. You can find modules for the server admin page here.

preview

The application is designed for the PHP built-in HTTP server - you do not need a separate daemon like Apache or Nginx.

I decided that it doesn't make sense to maintain two repositories for one code. The project has been merged into the Debian router repository. You can find it under the name webadmin, and the modules are in the webadmin-modules-misc package.

Wicd PHP GUI

Control Wicd from browser

preview

Initially as a standalone application that could be imported as a server admin page module, it was incorporated into the Debian router project (webadmin-modules-misc package).

The application has been deprecated - on my server I use wpa_supplicant directly without Wicd.

amMod

A program that modulates a sine wave to AM (like a radio)

The program accepts three parameters: carrier wave frequency (int czestotliwosc_nosnej), number of cycles (int ilosc_przebiegow) and signal frequency (int czestotliwosc_sygnalu).

Dumps the calculation results to the output.txt file - replace all "." in it with "," (without quotation marks), import it to a spreadsheet and create a chart.

We wrote similarly in computer science classes at school, only less legibly. Now I know that it was a hotbed of bad practices.

If you want more school algorithms but readable and in English, see school_algorithms.php library.

Remember! Write legibly and in English!

TCPServer HTTP controller

Serve HTTP content via tcpserver

Another experiment with shellscript: a simple web application.

The application is divided into two parts: a controller and a router. The controller initializes the application and the router directs the request URI paths.

The application does not have a public directory - all paths are defined in resources/router.rc.

fancontrol-weather

Turns the fancontrol daemon on and off depending on the prevailing temperature.

Initially as a stand-alone program, the script was incorporated into the Debian router project.

DynDNS

I have an internet connection with a public but dynamic IPv4 address and I didn't want to register a domain, so I wrote two scripts:

  1. a daemon written in shellscript connects to the PHP script on shared hosting
  2. the PHP script receives this information and writes the IP address to a txt file

After providing the password in the GET parameter, the PHP script will reveal the last IP record along with the date. The txt file can be used by other scripts such as HTTP proxy.

Initially as a stand-alone program, the script was incorporated into the Debian router project.

HTTP PHP proxy

Simple HTTP gateway - addition to DynDNS

My blog was on my server at home, and I wanted to put it on the internet for my friends.

Nothing fancy - PHP and cURL.

Audio stream proxy

HTTP PHP proxy for audio stream

HTTP filesharing

Simple file sharing via HTTP

  1. Select the path and other settings
  2. Press OK
  3. Open your browser and download the file
Init ram disk Mod

I once wrote my own system initialization program (initrd). The scripts contain information on how to initialize a Linux and Android-x86 distribution before invoking /sbin/init.

This knowledge was used when creating BackupOS (part of the Debian router project).

Root FS in loopback

An example of modifying the init script to allow mounting the root fs from a file.

The script is probably from Raspbian for PCs and allows you to run it from an iso image.

Git in atomic

git-in-atomic deployment template

The init.sh script creates a dev repository on the server - you push the code to it.

You can deploy the finished version of the application using deploy.sh - this script moves the entire contents of the dev directory to releases/$version.

The magic is that the current directory is a link to releases/$version - just replace the link and restart the HTTP server to deploy the new version of the application.

  1. Place these files in destination directory
  2. Run init.sh
  3. Clone repo to the dev machine
    1. Put files to the repo
    2. Create public directory in repo
    3. git push
  4. Run deploy.sh $new_version_number
  5. Set document root to current/public directory
  6. Restart HTTP server

You can also revert to an older version by running ./deploy.sh rollback $previous_version_number

Chords calculator

Approaching the structure of chords from a mathematical perspective.

preview

Triads, tetrads, combined chord, and two modes of the pentatonic scale.

Debian HTPC

Config files and scripts from my old HTPC project (based on Debian Jessie i386)

I uploaded it for archival purposes.

PHP AppImage

Experiment with a PHP application in a ZIP archive.

It was created when my only server was a free shared hosting with poorly functioning FTP.

Designed so that the FTP server receives one file instead of many.

It has a release system - you don't have to remove the old version of the application. This allows you to quickly roll back to an older version.

To correct a file, you do not need to update the ZIP archive - just upload the file itself, and the application will read it instead of the file from the ZIP.

LessLinux sweets

LessLinux was a Linux distribution designed to boot from CDs, thumb drives and PXE. It was the basis for many editions of Notfall-Systems from various magazines.

screenshot-new

It was developed by Mattias Schlenker and what's most interesting: it wasn't Debian or Red Hat - it was built from the ground up as Linux From Scratch. The first releases (2009-2012) used Xfce4 and GTK+ 2.

screenshot1

The system had several tools written in Ruby to facilitate the use of tools run only from the terminal. This code is interesting and tells a lot about the MS Windows internals.

screenshot2

There is one more but very interesting feature of this distribution: it does not use any SquashFS overlay such as OverlayFS, aufs or UnionFS - directories such as etc and var are stored in initrd (switch_root is not called), and directories in usr and lib are separate SquashFS containers. Mr. Schlenker said in an interview:

Desktop systems that are packed into a large container with an overlay file system have their pitfalls: permitted write access to the entire file system is not without its security-related issues.

I disagree with this: the Android system partition is also read-only, and despite this, Magisk can bypass this with bind mount. This is the same protection as file execution permissions - you can bypass it in several ways, e.g. instead of ./script.sh just type bash ./script.sh (it's similar with programs: /lib/ld-linux.so.2 /tmp/binary)

Despite its flaws, this solution is interesting - it's simple. Period.

screenshot3

A CD with forensic tools (probably Engelmann SecuPerts Forensic System) was also created, but there is a trap related to Linux itself: blocking disk write operations is not as easy as it may seem. PALADIN Linux had this option, but hardware blockers are also in use.

I first encountered this system in the Computer Bild magazine in 2010. I didn't know Linux yet, so it was a curiosity for me.

preview

As far as I know, the distribution is no longer being developed because the publishers have stopped producing rescue CDs.

I thought it was worth keeping, especially since the server where the tarballs are stored is sometimes unavailable.

In this repository you will find not only LessLinux scripts - there are also programs and scripts such as HIERMA and infsect from Kugee, init ram disk from TinyCore Linux, programs from the cdlinux.pl distribution (they were removed from the task.gda.pl server), c't MergeIDE and others.

For more information you can check out the lesslinux development blog and the system builder repository.

I uploaded it for archival purposes. But if you are the author and you do not want this repository to be publicly available, please write to me.

stallman
Submodule rebasing

Tutorial on how to update gitlinks after submodule rebase

miniBB

The project was supposed to be a single-file bulletin board application. However, it was never implemented - there is only a draft, but I am not interested in developing this project.

The project is not available to the public, there is nothing interesting in it.