Tag: En

#
System
Opis

How it works Link to heading It measures an in/outbound network traffic and logs in given intervals. If the amount of data sent from the server don’t exceeds a set limit, the server suspends itself. It’s a very useful script intended to use in home servers that are not meant to be turned on constantly. You can ‘wake’ your home server using wakeonlan tool by typing: wakeonlan [server's MAC address] And after the transmission (video streaming, file syncynig, torrent download) is ended it will suspend itself.

Edit 2018-07-14 Link to heading Following Reddit’s comments I made an Ansible role that follows this tutorial. It’s available on my github In the light of recent Github acquisition and my Gitlab account running slow, I decided to give it a go with a self-hosted web git service named Gitea. It is a more-intense developed fork of gogs. It’s Open Source, cross-platform and very lightweight. The real challenge is not installing it, but configuring it properly.

Finding the proper way of installing, upgrading and using python-pip seems to be a daunting task, at least at the beginning. The Python 2 / 3 schism complicates it even further as many packages are not backward-compatible. Moreover, installing or even upgrading packages globally (via sudo /root) may spawn unexpected errors. Below I present common practices about how to set up Python environment and mention about old, deprecated solutions that you may still hear about.

I used to host kostasz.pl on a shared hosting from my country. I would use FTP as a mean to deliver updates of this jekyll-generated blog. Every time I was satisfied with the result of my changes I would run jekyll build/serve and then navigate to /_site directory with filezilla and upload it to /domains/mysite/public_html overwriting old files. Oh look, I made a typo in that post - let’s do it again!

There are many tutorials in the Internet explaining how to enlarge a working root partition installed on LVM. Whether it’s ext4, xfs or other modern file system, online enlarging works most of the time. Shrinking, however, it’s another deal. XFS does not support it at all, even with unmounted file system. Reducing ext4 partition is possible, but it has to be unmounted first, which in the case of root partition is kind of problematic.

General concept Link to heading This is a simple PHP script that scans the content of a directory for files with certain extensions (for example .jpg, .png etc.) and automatically generates a image gallery allocated in Bootstrap responsive, scalable grid. Images can be smoothly previewed thanks to lightbox javascript. CSS stylesheet is generated from SASS .scss file and hence more readable. Features: PHP loop that automatically scans for every image in given folder - just put all files in one place, edit CSS / navigation links and it’s done!

Having used Jekyll as the blog engine I decided to store my entire web page in the git repository. Version control lets me fiddle with design and writing drafts, but what about big files? Nowadays a blog shall not lack media, not to mention a thumbnail. But pushing images to git repo is not a desired solution. Instead, try to store it elsewhere. Like in AWS S3 / Digital Ocean object storage space.