My Accounting program

I’ve made a program for tracking my finances. It is not a big deal, but it does the job for me.

It is web based, works on top of LAMP stack (Linux, Apache, MySQL and Php).

You can try it – the code is available at: GitHub

The install:

1). Drop the source code in a folder at Apache’s document root:


git clone https://github.com/jet-/tinyacc

2). Create a database in MySQL (for example acc_usd), and change the conf.php file accordingly.

3). Tables creation – run:


mysql -p acc_usd < mysql_tables.sql

Done! Pont your browser to: https://server/tinyacc/rep1.php?curr=usd

Do an initial data entry to initialise the data – for example loading your bank accounts/cards and cash, I am doing it by: cash — Amount — Other. Or Checking account — Amount — Other

You can start adding your daily transactions as they happen. For example cash withdrawal at an ATM: cash — Amount — Checking account. Paying a bill: Electrical bills — Amount — Checking account. Depositing money in Savings account: Savings account — Amount — Cash[ . . . ]   read more

Счетоводната ми програмка

Направих си една програмка за следене на финансите ми. Не е нещо особено, но на мен ми върши добра работа.

Уеб базирана, работи върху LAMP stack – Linux, Apache, MySQL и Php.

Ако някой иска да я ползва – кодът се намира: GitHub

Инсталацията е:

1). Изсипва се кода в Апаче документ руут-а:


git clone https://github.com/jet-/tinyacc

2). Прави се база данни в MySQL (например acc_bgn), и се описват параметрите в conf.php

3). Създават се таблиците:


mysql -p acc_usd < mysql_tables.sql

Готово! Насочвате браузъра към мястото: https://server/tinyacc/rep1.php?curr=bgn

Въвеждате си началните данни – например захранване на банковите сметки/карти и кеш за да се равните с банката си – аз го правя: Кеш — Сума — Други[ . . . ]   read more

Ransomware and Munich

In the lights of recent worldwide ransom-ware attacks- Wikipedia to computers in Windows world, I am wondering what happens to the process of migrating back from Linux (LiMux) to MS Windows in Munich City Government. As you probably know they managed to switch 15,000 desktop PCs from Windows to Linux and running fine for more than 10 years. Some local politician decided to go back after an offer from Microsoft to switch to Windows 10. Coincidentally Microsoft’s head quarter moved to Munich around the same time.

According to Microsoft, Windows 10 is immune to this particular attack. Will see when more of the corporate word moves to 10 and these attack gets more nasty.

My new Chromebook

I bought an ASUS Chromebook Flip 10.1″ Touchscreen Laptop (Quad Core, 4GB, 16GB eMMC) – Aluminum Chassis. I know it is like a dumb terminal (browser), but as a Linux fan my intention is to install Linux on it. Boy that thing is thin – love it.

  • With 10-finger touchscreen, ASUS Chromebook C100 can be flipped over from 0 to 360 degree, using it as a Chromebook, or a tablet.
  • Quad-Core ARM 1.8GHz processor with 4GB RAM, Wireless 802.11 A/C
  • Built with aluminum chassis, 10.1″ HD IPS Display 1280 x 800. HD Webcam
  • Run android apps

When start it Chrome OS comes in no time. You have a browser and all Android apps in your disposal.

Next step was to switch to developers mode and 20 minutes later I am back in Chrome OS. Pressing Ctrl-Alt-T  opens a terminal. Punching shell word in it brings me to a Bash shell.

Downloaded Crouton (the tool which allows me to install Linux distributions along stock ChromeOS) https://github.com/dnschneid/crouton/raw/master/installer/crouton

Using this tool you will be able to install couple of flavours of Linux. It is basically a script which does heavy lifting.

with:

sudo sh ~/Downloads/crouton -r list

Can see the available choices.[ . . . ]   read more

3.5 inch Touch Screen Display For Raspberry Pi 3

Today Santa brought me a new 3.5″ display  for my Raspberry PI 3 and I am busy now installing it and making it to work. Mine came with a Protective Case + 3 x Heat sinks+ Touch Pen

Assembling was a piece of cake. I had already running Raspbian on my Rpi using it mostly headless (via ssh), connected wirelessly to my LAN. When I powered Rpi on, the display went all white – so far so good. Time to install some software in order display to be recognised. Found a nice site with a wiki  http://www.waveshare.com/wiki/5inch_HDMI_LCD[ . . . ]   read more

LinuxCon 2016

Tomorrow Linux will turn 25.

There is a LinuxCon event in Toronto and I decided to visit it and see Linus’ keynote. What a disappointment was as per schedule it suppose to be like 10 minutes long. On top of that they asked me to register and pay $100. I will pay… but some other time (never). I am not interested in corporate drones there and their containers (most of the topics of the conference). VMware, HP, IBM and surprise Microsoft and Citrix (WTF). MS even has a keynote. Some memberships are $1100 – good luck with that. I don’t make my living with Linux or containers. That explains why Linux desktop is going nowhere – there is no money in it (for FSF).

Looks like this is my first and last Linux conference. Too bad it is my OS of choice for a long time and I love it.

Measuring Temperature and Humidity with Raspberry Pi

After I played with OLED display with Raspberry PI, the next logical step is to display more useful information on it.

DHT22_AM2302

I bought a sensor DHT22_AM2302 which is a Digital Temperature Humidity Sensor with serial interface.

The device measures both temperature and humidity and you get the values in single poll.

Connected GND to Rpi’s GND,

Vcc to Rpi GPIO- pin 2 and finally

Data to GPIO pin 8 (GPIO 14)

rpi_T_H

Little bit of coding in Python and using nice libraries written by Tony DiCola for Adafruit Industries and here is the result.

Maybe I should buy one of BMP085 Digital Barometric Pressure Sensor and hook it up as well.

Windows 7 updates stuck (or suck)

I did fresh install of Windows 7 on both bare metal PC and in Virtual machine. Install went ok, but no updates. Checked for updates – 4hrs and still “checking…” I interrupted it.

Found a tool on the MS site which suppose to fix the problem: http://go.microsoft.com/?linkid=9767096

10 hrs later this tool is still “Checking for updates”

Mind you that this is complete fresh install, without any 3rd party software installed, even no antivirus program.

Not sure if MS is crippling W7 to push everybody to W10 or is plain ignorance and incompetence. If there is a problem with connectivity or some server is unavailable – how hard is to check that and say so. Could be some system file locked by another part of the OS – I am speechless.

I thought is me missing something, but Internet is full with the same complains and fights.

I think this issue is by design and it will bite MS even further with W10 (as a rolling OS – i.e. constantly updating with fixes and new features). In Windows one cannot open a file if is already opened. Which is very stupid and is not an issue with other OS-es like  – Linux.[ . . . ]   read more

OLED display to Raspberry Pi

Today I played with an OLED Display. I bought it from Amazon for $14 which is 0.96 Inch I2C and SPI Serial 128 x 64. It needs only 4 wires to connect to Raspberry Pi. This display is a monochrome (blue) – hence the price.

 i2cdetect -y 1

Showed the display detected on the I2C bus

Couple of lines of code from GitHUB – show IP address and the time. Graphics also can be drawn – lines, circles, rectangles, ellipses etc. even displaying .png files.

oledoled_1

#!/usr/bin/env python # # !!! Needs psutil (+ dependencies) installing: # $ sudo apt-get install python-dev # $ sudo pip install psutil # import os import sys if os.name != 'posix': sys.exit('platform not supported') import psutil from datetime import datetime from oled.device import ssd1306, sh1106 from oled.render import canvas from PIL import ImageDraw, ImageFont f = os.popen('/sbin/ifconfig wlan0 | grep "inet\ addr" | cut -d: -f2 | cut -d" " -f1') your_ip=f.read() from time import gmtime,localtime, strftime t = strftime("%Y-%m-%d %H:%M:%S", localtime()) def stats(oled): font = ImageFont.load_default() font3 = ImageFont.truetype('/root/oled/fonts/C&amp;amp;C Red Alert [INET].ttf', 18) font4 = ImageFont.truetype('/root/oled/fonts/C&amp;amp;C Red Alert [INET].ttf', 22) with canvas(oled) as draw: draw.text((0, 26), your_ip, font=font4, fill=255) draw.text((0, 48), t, font=font3, fill=255) def main(): oled = ssd1306(port=1, address=0x3C) stats(oled) if __name__ == "__main__": main() [ . . . ]   read more

Добавих твърдотелен диск към уеб сървъра

Купих си един твърдотелен диск (Solid State Disk SSD) ADATA 120GB за $45 и го добавих към сървъра с надеждата да се подобри производителността.

Кореновата файлова система я оставих на оригиналната SD карта,просто преместих /var директорията и swap файла върху новият диск. Да напомня, че MySQL, Apache, логовете и др. са във /var директорията.

Първо създадох партишън таблицата със cfdisk. След това форматирах партишън с EXT4 файлова система, монтирах я и добавих ред във fstab. Направих и swap-а на същия диск.

Следващото, което направих бе да превключа Linux към single user mode – сървърчето беше свързано с HDMI кабел към телевизора ми както и USB клавиатура  (това не може да стане през ssh). Тогава и преместих var директорията в новия партишън и създадох файлов връзка (symlink) към оригиналното положение къдет трябва да бъдеразположен var. Рестартирах и всичко заработи нормално.[ . . . ]   read more