Kilka lat temu, żeby zdobyć trochę doświadczenia poza Java i Ruby, zabrałem się za naukę Qt4.8 i C++. W ramach tego ćwiczenia zacząłem pracować nad aplikacją, która nie istniała wtedy na Linuxa i pewnie do dziś jest tego typu unikalnym programem na pingwina i diabełka.
Aplikacja była pisana na wymogi prowadzenia firmy taty, gdzie z względu kosztów licencyjnych zrezygnowaliśmy ze środowiska Windowsa. W firmie od 6 lat używane są tylko systemy Linuxowe (KUbuntu i openSUSE).
QFakturat był pisany początkowo w Qt4.8 na Linux, jednak z czasem części kodu zostały przepisane na Qt5 oraz dodana została kompatybilność dla systemów *BSD. Nigdy nie próbowałem portować aplikacji na Windowsa ani OS Xa, więc nie jestem w stanie powiedzieć, czy działa.
Obecna funkcjonalność programu:
wystawianie faktur w PDF (i tylko PDF)
obsługa kilku sprzedawców
automatyczne konwertowanie kwot brutto<->netto<->podatek przy zmianie jednej z wartości
spersonalizowane faktury – pozwalają na ustawienie własnego tekstu w stopce faktury i na lewym boku
3 skórki programu
walidacja i opcjonalne formatowanie NIPu
wysoka elastyczność programu (sam możesz ustawić rodzaje faktu, listę stawek VAT, metody zapłaty, czas na zapłatę czy obsługiwane waluty)
zarządzanie produktami i filtrowanie sprzedanych/dostępnych produktów/usług.
I made a timelapse video using Raspberry Pi from my sea-front flat in Aberystwyth where I studied for 4 years.
Bash script was called every 30 seconds to take a picture for 4 days. To prevent running out of space on a SD card there was another cron job setup to move all existing images to my laptop using scp. After some selection (removed some first and some last images) I got 17.4GB of pictures which were composed into this timelapse without any scaling.
…that’s why we published our product on OSI-compatible license! We <3 open-source!
Well, does Microsoft/Google/Apple/Netflix/XXX really love open-source?
No, they don’t. In fact they do more to extinguish open source by fighting them with patent wars, you don’t hear about, developing DRM, you hear about when it’s too late and dropping support for some key-products on open source platforms. Skype on Linux, anyone? Google Drive client on Linux? DRM enabled by default in browsers, anyone?
Didn’t tell me much. I started Googling… No results. Ok, one result… taking me to Gitlab-CI of my project. So I had this before. I didn’t solve it, don’t know why. Probably because it was when I was experimenting with different ROMs on my another device. So I “fixed” it by reinstalling ROM, and it came back.
Not many things where helpful online so I had to find solution myself and here I present it to you, and to future me, when I have this again.
For a reason FreeBSD doesn’t support Qt5 build tools out of box. There are a few problems that have to be solved before you can run qmake && make to build a project. Firstly, my default setup didn’t have QMAKESPEC specified, add this line to your .bashrc/.zshrc:
I recently acquired “new” netbook, it’s so old that most people would call it ancient. Its CPU is only 32 bit architecture, it’s not capable of playing 2k videos in 30fps, its computing power is lesser than my ARM tablet, but it still works, so why not use it for something.
I got it from a friend who was using Fedora. It was slow, even with openbox. dnf update was taking from a few to several minutes, I had to install something faster. At first, Debian with LXDE. First installation attempt failed with some problem with GRUB, it wasn’t a good sign, I didn’t investigate the problem to get it working asap. I restarted bootloader installation with LILO which succeeded. Debian was still slow. Package installation was taking long, deb processing was taking long and I was sitting there and waiting for it to finish. Launching Firefox was taking even 30 seconds, videos on youtube were lagging even on 30fps. I really expected more from this 10 years old hardware. I decided to use it for my experiments and try something new. I decided to look at BSDs. OpenBSD would work here, it’s fast, secure and it like ideology behind it, but I don’t think it would work on semi-destkop netbook for me. I read about DragonFlyBSD and was impressed what creators did with kernel and distribution, wanted to give it a try, but they don’t support i386. There are two BSD distributions dedicated for desktop computers, DesktopBSD and PC-BSD, I didn’t know with which one to go, so I took FreeBSD, they provide i386 memstick installer, so it was easy since beginning, or at least it was specific which image should be used.
GitLab.com is a competitor of Github. It’s a service provider for git-based source code repositories that offers much more than it’s bigger brother. In this post I will try to convince you to try it out for your next project.
GitLab is not only a simple git hosting; its features impact the whole development process, the way of contributing to a project, executing and running tests, protecting source code from changes, more and more.
This year (2016) and last year, a few new laws were introduced by Cameron’s government, so I decided to get myself VPN. First, I tried a lifetime TigerVPN for 30$, nice deal. Unfortunately, TigerVPN doesn’t fully support Linux OpenVPN implementation. Connection is dropped when reaching ~900kb/s upload+download; network-manager tells that server time outed and it never reconnects due to… an authentication problem.
So I started looking for other affordable solutions. Two biggest competitors are PIA and TorGuard. I started reading discussions on reddit about those two, and it seems, there are very little differences. I was given a rolling promotion code for TorGuard, a 50% discount code that can be used after my 2 years long service comes to an end. It’s good.
My major project in Java (Android) involved image manipulation where I used JHLabs. I found there was no easy way to add JHLabs support for Android without extracting sources and manually adding them to the project. So there it is now: https://gitlab.com/agilob/JHLabs_android
It’s compatible with gradle build system, so you can easily add it to your gradle project.
TigerVPN is one of the most respected companies that care about your privacy. According to this table, they are one of the best VPN providers, based on TorrentFreak survey from 2014. What’s most important, they claim not to keep logs, don’t yhgmm… respect DMCA, don’t block P2P and don’t try to identify users.
You can work with SQL queries in Qt and SQL in many different ways, here I will show you how I came up with a working method. To keep things simple, I am not going to use any UI to print or edit queries. It will be just source code and stdout, as a database engine I will use SQLite3.
After you created your project, edit project.pro and locate line:
QT += core
Modify this line by adding `sql`:
QT += core sql
Since now, when you compile your project, QtSql module will be linked to the project: