Archive for November, 2017

Saint Andrew the First called Apostle “Protocletus” by Jesus Christ celebrated on 30 June and 30 November in Bulgarian Orthodox Church

Thursday, November 30th, 2017

saint-Apostle-Andrew-one-of-the-12-apostles

38 Then Jesus turned, and saw them following, and saith unto them, What seek ye? They said unto him, Rabbi, (which is to say, being interpreted, Master,) where dwellest thou?

39 He saith unto them, Come and see. They came and saw where he dwelt, and abode with him that day: for it was about the tenth hour.

40 One of the two which heard John speak, and followed him, was Andrew, Simon Peter's brother.

41 He first findeth his own brother Simon, and saith unto him, We have found the Messias, which is, being interpreted, the Christ.

John 1:38-41 King James Version (KJV)

Church Troparion (Tone 4)

    Andrew, first-called of the Apostles
    and brother of the foremost disciple,
    entreat the Master of all
    to grant peace to the world
    and to our souls great mercy.

Church Kontakion (Tone 2)

    Let us praise Andrew, the herald of God,
    the namesake of courage,
    the first-called of the Savior's disciples
    and the brother of Peter.
    As he once called to his brother, he now cries out to us:
    "Come, for we have found the One whom the world desires!"

saint-Andrew-the-first-called-bulgarian-orthodox-icon

Saint Andrew the first called Bulgarian Icon

The saviour Jesus Christ choose saint Andrew (the brother of saint Peter) to be the first among apostles in the number of his 12 (desciples) apostoles. The name Andrew is translated from Greek to Brave / Manhood, there is no known Hebrew or Aramic name as that which means that most likely the name Andrew was perhaps given by him in later times when he preached among pagans.
It is believed. As the gospel tells us he immediately turned to Christ follower and desciple being honored to be the first desciple and among the first that received baptism after Jesus Christ, he was one of the desciples of saint John the baptist (as we and once he heard the "living water" words of the savior he immediately followed without reasoning.

saint_Andrey_Simon_6v_ravenna

The Lord Jesus Christ summons saint apostle Andrew for apostelship service (VI Century Ravenna Mosaic)

Saint Andrew's birth place according to our Orthodox Christian tradition is the village of Bethsaida on the Sea of Gallee (which has actually the size of a Lake), he was called with his brother saint Peter and promised by Jesus to be made a  "fishers of men" (Greek: ἁλιεῖς ἀνθρώπων, halieis anthrōpōn).
At the beginning of Jesus public life both apostles are said to have occupied the same house in Capernaum. He is believed to be the first bishop and founder of the holy see of Byzantium (later Constantinople today's Istanbul) in A.D. 38 and have ordained the first bishop of the city Stachys. He is known to have preached also among Thracians and travelled through the Black sea shelf (today Bulgarian lands) establishing Christian communities across the shelf lands.

He also preached in today's Greece in Peloponnese, Greece, and Epirus: he converted many to the Faith and ordained bishops and priests for them.

saint-apostle-Andrew-with-the-icon-of-holy-Theotokos
Saint Andrew Georgian Icon holding the Holy Theotokos Icon

On a boat he entered Georgia from Ajara, preached Christianity in Atsquri, built small church there and left miracle-working icon of Theotokos (the Holy Virgin Mary). Travelling back from Georgia, he visited today Russian lands, went through Kiev, he planted a cross on one of the high hills of Kiev, and he prophesied a city that would have many golden-domed churches, and a bright Christian future for the Rus' people.

Predskazanie_Kiev_sv_Andrey

Saint Andrew's prophecy of Kiev depicted in Radzivill Chronicle.

St. Andrew was martyred in Peloponnese, in the city of Patras. The Proconsul Aegeates' family believed in the miracles and preaching of St. Andrew, and the enraged Proconsul tortured and crucified St. Andrew. The new converts wanted to remove him from his cross, but the saint would not allow them. Instead, he comforted them from the cross and as he prayed an extraordinary light encompassed him for about a half hour. When it left, he gave up his soul. It was the year 62 AD.

St. Andrew's relics were taken to Constantinople, his head to Rome and a hand  perhaps transferred from Kiev to Moscow when the Russian capital changed.

agios_Andreas-martyrdom-holy-orthodox-icon

The X Crossed Martyrdom of saint Andrew

Early texts, such as the Acts of Andrew known to Gregory of Tours describe Andrew as bound, not nailed, to a Latin cross of the kind on which Jesus is said to have been crucified; yet a tradition developed that Andrew had been crucified on a cross of the form called crux decussata (X-shaped cross, or "saltire"), now commonly known as a "Saint Andrew's Cross" — supposedly at his own request, as he deemed himself unworthy to be crucified on the same type of cross as Jesus had been. The iconography of the martyrdom of Andrew – showing him bound to an X-shaped cross – does not appear to have been standardized until the later Middle Ages.

Saint Andrew is the patron saint of several countries and cities including: Barbados, Romania, Russia, Scotland, Ukraine, Amalfi in Italy, Esgueira in Portugal, Luqa in Malta, Parañaque in the Philippines and Patras in Greece. He was also the patron saint of Prussia and of the Order of the Golden Fleece. He is considered the founder and the first bishop of the Church of Byzantium and is consequently the patron saint of the Ecumenical Patriarchate of Constantinople.

It is interesting that in Romania there is a cave in Romania the so called Saint Andrew Cave where saint Andrew lived for a while on his journey from Black Sea Shelf to Kiev after he preached the Gospel to Daco-Roman people in province Dobrudja Region nowadays (Scythia Minor), this tradition was a local believe and was not widely aknowledged until the 20th century.

Entrance_to_saint_Andrew-cave-in-Dobrudja-Romania
Entrance to Saint Andrew Cave in Dobrudja

According to Hippolyte of Antioch, (died c. 250 C.E.) in his On Apostles, Origen in the third book of his Commentaries on the Genesis (254 C.E.), Eusebius of Caesarea in his Church History (340 C.E.), and other sources, such as Usaard's Martyrdom written between 845–865, and Jacobus de Voragine's Golden Legend (c. 1260), Saint Andrew preached in Scythia, a possible reference to Scythia Minor, whose territory was part of Bulgaria but was integrated into Romania in the late 19th century.

Let by the prayers of saint Andrew we Christians grow in the understanding and love and be able to withstand the temptations of the hard times we live in!

 

Optimize PNG images by compressing on GNU / Linux, FreeBSD server to Improve Website overall Performance

Monday, November 27th, 2017

how-to-optimize-your-png-pictures-to-reduce-size-and-save-speed-bandwidth-optipng-compression-tests-results

If you own a website with some few hundreds of .PNG images like 10 000 / 15 000 png images and the website shows to perform slow in Google PageSpeed Insights and is slow to open when Google Searched or Shared on Facebook / Twitter etc. then one recommended step to boost up the website opening speed is to compress (optimize) the .PNG pictures without loosing the images quality to both save space and account bandwidth you could use optipng even though this is not the only tool available to help you optimize and reduce the size of your images, some few other tools you might like to check out if you have more time are:

 a.)  pngcrush – optimizes PNG (Portable Network Graphics) files.
 b.)  pngnq – tool for optimizing PNG (Portable Network Graphics) images. It is a tool for quantizing PNG images in RGBA format.
 c.)  pngquant – PNG (Portable Network Graphics) image optimising utility. It is a command-line utility for converting 24/32-bit PNG images to paletted (8-bit) PNGs.
 

1. Install and Compress / optimize PNG / GIF / PNM / TIFF file format with optipng
 

OPTIPING tool recompresses the .PNG images to a smaller size without loosing any quality information, besides PNG file format it also supports (BMP, GIF, PNM and TIFF) image format.

If you don't have optipng installed on your server you can;

a.) install it on Redhat RPM based Linux distributions lets say CentOS Linux use:

 

[root@centos: ~]# yum install epel-release
[root@centos: ~]# yum install optipng

Note that, You will need to  first enable epel repo on centos 7

 

b.) If instead you're on a Debian GNU / Linux

debian:~# apt-get install optipng


c.) FreeBSD users can install it from FreeBSD ports with:

 

freebsd# cd /usr/ports/graphics/optipng
freebsd# make install clean

optipng syntax is quite self explanatory
optipng [options] what-ever-file.png


You can get a full list of possible command options with -? command, here is a list:

 

debian:~# optipng -?
Synopsis:
    optipng [options] files …
Files:
    Image files of type: PNG, BMP, GIF, PNM or TIFF
Basic options:
    -?, -h, -help    show this help
    -o <level>        optimization level (0-7)        [default: 2]
    -v            run in verbose mode / show copyright and version info
General options:
    -backup, -keep    keep a backup of the modified files
    -clobber        overwrite existing files
    -fix        enable error recovery
    -force        enforce writing of a new output file
    -preserve        preserve file attributes if possible
    -quiet, -silent    run in quiet mode
    -simulate        run in simulation mode
    -out <file>        write output file to <file>
    -dir <directory>    write output file(s) to <directory>
    -log <file>        log messages to <file>
    —            stop option switch parsing
Optimization options:
    -f <filters>    PNG delta filters (0-5)            [default: 0,5]
    -i <type>        PNG interlace type (0-1)
    -zc <levels>    zlib compression levels (1-9)        [default: 9]
    -zm <levels>    zlib memory levels (1-9)        [default: 8]
    -zs <strategies>    zlib compression strategies (0-3)    [default: 0-3]
    -zw <size>        zlib window size (256,512,1k,2k,4k,8k,16k,32k)
    -full        produce a full report on IDAT (might reduce speed)
    -nb            no bit depth reduction
    -nc            no color type reduction
    -np            no palette reduction
    -nx            no reductions
    -nz            no IDAT recoding
Editing options:
    -snip        cut one image out of multi-image or animation files
    -strip <objects>    strip metadata objects (e.g. "all")
Optimization levels:
    -o0        <=>    -o1 -nx -nz                (0 or 1 trials)
    -o1        <=>    -zc9 -zm8 -zs0 -f0            (1 trial)
            (or…)    -zc9 -zm8 -zs1 -f5            (1 trial)
    -o2        <=>    -zc9 -zm8 -zs0-3 -f0,5            (8 trials)
    -o3        <=>    -zc9 -zm8-9 -zs0-3 -f0,5        (16 trials)
    -o4        <=>    -zc9 -zm8 -zs0-3 -f0-5            (24 trials)
    -o5        <=>    -zc9 -zm8-9 -zs0-3 -f0-5        (48 trials)
    -o6        <=>    -zc1-9 -zm8 -zs0-3 -f0-5        (120 trials)
    -o7        <=>    -zc1-9 -zm8-9 -zs0-3 -f0-5        (240 trials)
    -o7 -zm1-9    <=>    -zc1-9 -zm1-9 -zs0-3 -f0-5        (1080 trials)
Notes:
    The combination for -o1 is chosen heuristically.
    Exhaustive combinations such as "-o7 -zm1-9" are not generally recommended.
Examples:
    optipng file.png                        (default speed)
    optipng -o5 file.png                    (slow)
    optipng -o7 file.png                    (very slow)

Just running it with, lets say -o7 arguments is enough for optipng to compress your image and reduce some 15 to 30% of picture size

optipng -o7 what-ever-image-you-have.png

optipng-example-on-reducing-image-screenshot-24.9-png-image-compression

2. Compress images without loosing quality recursively inside directory and subdirectories with optiping

a.) To optimize all pictures inside a single directory (without sub-directories) on remote server you can run, below command:
 

cd whatever-dir/
for i in *.png; do optipng -o6 -quiet -keep -preserve -dir optimized -log optipng-compress.log "$i"; done


As you can see a log is being written on what the command has done and the originals of the optimized images is going to be preserved, the optimize level is 6 is the PNG encoding level.

 

cd /var/www/your-site/images/
find . -type f -iname "*.png" -print0 | xargs -I {} -0 optipng -o6 -keep -preserve -log optipng-compress.log "{}"


This command is pretty handy to run on own dedicated server, if you don't have one just do it on your Linux computer at home or if you don't own a PC with Linux install any Deb / RPM based Linux inside VirtualBox or VMWare Virtual Machine and do it there, then upload to your Hosting Provider / Amazon EC2 etc and Enjoy the increased website performance 🙂

 

How to find out who sniffs out about your Android mobile smart phone

Thursday, November 16th, 2017

android-hidden-secret_how-to-find-out-who-sniffs-out-your-android-mobile-andrid-hidden-codes

Maybe little know about this embedded Android mobile smart phone features but there is a few mobile code cheats that can help you find out a little bit about your phone security, that's pretty handy for anyone who really wants to know whether mobile phone is being sniffed / tapped on Android software level and can give you an idea on how much your smart phone data is protected or are you being a target of someone's secret surveillance, of course this info is just on Android firmware embedded features level and if your mobile is somehow hacked or trojanned the information that can show could be not adequate, but still it is a good info to know. I'm sure you'll be surprised how much embedded Android features are there for the controllers (Google staff) 🙂
 


 

1. Information about telephone, battery status and statistics about telephone use


*#*#4636#*#* 

To get information about battery, usage statistics and device.
 

2. Are Smart Phone Voice / SMS Transfers on?

*#21#

This combination of numbers and symbols allows you to understand where your mobile is Transferring Calls, SMS-es or other messages. If you type this code and click call the phone screen should show any numbers to which any data is being transferred, if your phone is okay and not tapped you will get a message the phone call transfers and sms transfer is disabled. Always keep in mind that there is a danger for your info / data or even billings to be tapped already as Android is non-free software, so even if that code returns no transfers you're still insecure at the hands of Google's mercy.


3. Where are calls and SMS-es transffered in case if Voice / SMS Transfers are on?
 

*#62#

This codes shows where are your input Calls and SMS-es are being transferred once someone is calling you and he is unable to reach you. At best case the inbound calls will be redirected as voice mail format to voice mail box of the number of your mobile operator.


4. Deactivate all kind of Phone Voice / SMS Transfers (Redirects) for security
 

##002#

By inputting above code you can deactivate all kind of redirects, which were prior configured at your mobile phone. The code is universal one and should work not only in Android but across all smart phones including IPhones. It is a recommended one especially if you're planning to travel in foreign country or region due to the roaming phone expenses.
 

5. Get IMEI (International Mobile Equipment Identifier) phone info

*#06#

Above code provides information about the ID number of the mobile phone th so called IMEI (International Mobile Equipment Identifier). Using the email a mobile phone that has been recently stolen can be easily found, because the device is emitting its IMEI number to the mobile phone operator, nomatter what kind of SIM Card is inserted in the phone.

 

6. How to protect yourself from criminals and spies?


You can use alternative Messanger  Chat / Voice Clients such as: Telegram, Wickr, Signal or Alternatively run your own Jabber server and use it to securily communicate with your friends and relatives


Do not install an unknown source program to mobile phone, abstain from charging the phone on airports and suspicious free "charging" points, abtain from using any free wifi networks whose owner you don't know personally. Beware while browsing as there are websites that could infect you with javascript viruses and terrible phone malware stuff, to be safe make sure you have some kind of Antivirus software installed on the phone just in case.
Be vigilant!

 

7. Bigger list of Codes working across some of Android versions providing various phone stats and info (not working on all mobiles but might be working on yours)

howto-find-out-who-sniffs-out-about-your-Android-android_secret_codes_for_your_android_mobile_phone

Here is a list also with a useful codes for some of Android version releases (this will not work on IPhones)

 

*4636#*#*Information about statistics of phone, battery, usage

*#*#7780#*#*Nullify phone settings.. Delete only applications.

*2767*3855# – Nullify all settings, reinstall firmware.

*34971539#*#* – Full information about phone camera vendor etc.

*#*#273283*255*663282***Quickly archive media files

*#*#197328640#*#Test mobile service

232339#*#* / *#*#526#*#*Test Wireless (Wi-Fi) netework

*#*#232338#*#*Show Wi-Fi card physical MAC Address

*#*#1472365#*#*Quick GPS test

*#*#1575#*#* Various GPS Tests

*#*#0283#*#* Test mobile Loopback interface

*#*#0*#*#* – Test of liquid-crystals mobile display

*#*#0673#*#* / *#*#0289#*#*An Audio test

*#*#0842#*#* Test vibrations of the background phone lid (lightning)

*2663#*#* Get version of sensor screen

*2664#*#*Test of the sensor screen

* * * *0588#*#*Test distance sensor

* * *3264#*#*Get Installed RAM Version

*#*#232331#*#*Bluetooth Test

*#*#7262626#*#*Test GSM signal

*#*#232337#*#*Show bluetooth address

*#*#8255#*#* – Test Mobile Google Talk service

*#*#1234#*#*Information about firmware

*#*#1111#*#*Version of installed Open Trading software version

 

Add gzip compression to optimize web server served files in Apache, Nginx and LiteSpeed

Wednesday, November 15th, 2017

Enable-Gzip-Compression-quick-howto-on-apache-nginx-litespeed

What is GZIP Compression and why you need it?

no-gzip-support-illustration

  • What is gzip? – In Linux / Unix gzip of files is used to compress files so they can take less space when they're transferred from server to server via network in order to speed up file transfer.
  • Usually gzipped files are named as filename.gz
  • Why GZIp compression is important to be enabled on servers, well because that reduces the transferred (served) file by webserver to client browser
  • The effect of this is the faster file transfer of the file and increased overall web user performance


how-gzip-works-with-nginx-illustrated

Most webservers / websites online currently use gzipping of a sort, those who still did not use it has websites which are up to 40% slower than those of competitor websites

How to enable GZIP Compression on Apache Webserver

The easiest way for most people out there who run there websites on a shared hosting is to add the following Apache directives to dynamic loadable .htaccess file:
 

<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

 

You can put a number of other useful things in .htaccess the file should already be existing in most webhostings with Cpanel or Kloxo kind of administration management interface.

Once the code is included to .htaccess you can reflush site cache.
To test whether the just added HTTP gzip compression works for the Webserver you can use The Online HTTP Compression test

If for some reason after adding this code you don't rip the benefits of gzipped content served by webserver you can try to add altenatively to .htaccess

 

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

 


Howto Enable GZIP HTTP file compression on NGINX Webserver?

Open NGINX configuration file and add to it the following command parameters:

 

gzip on;
gzip_comp_level 2;
gzip_http_version 1.0;
gzip_proxied any;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

 

# Disable for IE < 6 because there are some known problems
gzip_disable "MSIE [1-6].(?!.*SV1)";

# Add a vary header for downstream proxies to avoid sending cached gzipped files to IE6
gzip_vary on;

Enable HTTP file Compression on LiteSpeed webserver

In configuration under TUNING section check whether "enable compression" is enabled, if it is not choose "Edit"
and turn it on.

litespeed-how-to-enable-gzip-compressible_type-illustrated

What is the speed benefits of using HTTP gzip compression?

By using HTTP gzip compression you can save your network and clients abot 50 to 70% (e.g. transferred data) of the original file size.
This would mean less time for loading pages and fetched files and decrease in used bandwidth.

effect-of-gzip-compression-diagram-illustrated

A very handy tool to test whether HTTP Compression is enabled as well as how much is optimized for Speed your Website is Google PageSpeed Insights
as well as GTMetrix.com

ArchAngels day 8 of November, the day of All Angels and Archangels – Who are the ArchAngels and why we should venerate them?

Wednesday, November 8th, 2017

Archangel_Michael_A_Warrior-Angel-protector-of-all-Christians

Today on 8th of November, the Bulgarian Orthodox Church is celebrating the day of Arch Angels (Primary Angels) who stay always near God Almigthy the Creator of this world.

Accroding to Christianity, there are seven main angels called (Arch Angels),  each of the Archangels has its own specific ission, one is a messanger of secrets that has to be revealed to man, other is a healer of infirmities.

The names of the Seven main Arch Angels in Eastern Orthodox Christian faith are:

Archangel_Michael_Holy_Orthodox-christian-icon

 

  •     Michael in the Hebrew language means "Who is like God?" or "Who is equal to God?" Michael has been depicted from earliest Christian times as a commander, who holds in his right hand a spear with which he attacks Lucifer/Satan, and in his left hand a green palm branch. At the top of the spear there is a linen ribbon with a red cross. The Archangel Michael is especially considered to be the Guardian of the Orthodox Faith and a fighter against heresies.

     

    Holy-Archangel-Gabriel_orthodox-icon
     

 

  •     Gabriel means "God is my strength" or "Might of God." He is the herald of the mysteries of God, especially the Incarnation of God and all other mysteries related to it. He is depicted as follows: In his right hand, he holds a lantern with a lighted taper inside, and in his left hand, a mirror of green jasper. The mirror signifies the wisdom of God as a hidden mystery.

     

    Holy-Archangel-Raphael-orthodox-icon
     

  •     Raphael means "It is God who heals" or "God Heals" (Tobit 3:17, 12:15). Raphael is depicted leading Tobit (who is carrying a fish caught in the Tigris) with his right hand, and holding a physician's alabaster jar in his left hand.

     

    Archangel-Uriel-orthodox-icon
     

  •     Uriel means "God is my light," or "Light of God" (II Esdras 4:1, 5:20). He is depicted holding a sword against the Persians in his right hand, and a flame in his left.

     

    Archangel_Selathiel_Herodion-of-Patras_1840_Russia
     

  •     Sealtiel means "Intercessor of God." He is depicted with his face and eyes lowered, holding his hands on his bosom in prayer.
    Archangel-Jegudiel-holy-orthodox-icon

     
  •     Jegudiel means "Glorifier of God." He is depicted bearing a golden wreath in his right hand and a triple-thonged whip in his left hand.
    Archangel-Barachiel-the-archangels-the-peace-blessed-by-God
  •     Barachiel means "Blessed by God." He is depicted holding a white rose in his hand against his breast.

     

    holy-Archangel-Jerahmeel
     

  •     Jerahmeel means "God's exaltation." He is venerated as an inspirer and awakener of exalted thoughts that raise a person toward God (II Esdras 4:36). As an eighth, he is sometimes included as archangel.

 

The accent of todays feast (Synaxis of the Holy Archangel Michael and the other Budiness Powers) is Archangel Michael, so I find it worthy to say few words more about Archangel Michael.

Archangel Michael is "the keeper of the souls and a fighter against evil in the world".

That is the reason why Archangel Michael is often depicted with a firy spear at hand piercing the devil.
In the Eastern Orthodox Christian faith there is no other God servent guardian angel with so many duties.

Archangel Michael is:

1. Chiefman of the Heavenly (Bodiless) Powers

2. A fighter against the spirits of wickedness (spirits of evil)

3. A Protector of Christians from the devil

4. A Chief Leader of Christ's armies against the pagans and heresies

5. A Keeper of All Christian Souls

6. The Archangel that is present on mens deathbed and divides the soul from the body
 

Archangel_Michael_piercing-the-devil

The dividing of the soul on a men deadbed is perhaps one of the most important of Archangel Michael's missions it does stop our earthly way and collects the soul. Just before this according to our Orthodox Christian faith, each one of us Christians is given by God during Baptism with a personal guardian angel, who keeps him from perils, troubles and sorrows.

Each-Christian-has-A-Guardian_Angel

The Guardian Angel each Christian receives during baptism

But man has to be cautious, the guardian angel does cries watching at us when we live careless sinful life, he is not enforced to keep for us eternally if we wish to live a life without faith or God, then he leaves us crying for our fallen state.

The more sinful life a man leads in this life, the more clean his soul is being collected by Archangel Michael.
The food we put on table Archangels day is a feastful one, it is a tradition here in Bulgarian to eat Lamb meat the so called (Kurban) and a special breads are prepared, the so called Rangel's Bread, there are 2 types actually (Bogovica and Rangelovo bludo).
A boiled wheat is also a common meal on the table, beans and of course red wide.

The meaning of 8 of Novembers feast is to celebrate the Congregation Integrity of all Angel ranks (just like in Army we Christians believe that Angels and they all work together for the same goal the salvation of each man's soul)

Archangel-Michael-collecting-soul-of-a-dead-man

Because of Archangel Michael being so famous to divide the soul from the body of the dying, perhaps it is not a coincidence why few days before 8th of November on the previous Saturday the Church calendar marks A Memorial day for all those who died (The so called Zadushnica feast), the meaning of which is that people give out food and goods for the remembrance of the souls of their departed beloveds, praying with hope for the deceased people begging God to have mercy over their souls. Because of this unwritten connection between the men deadbed and Archangel michael often in people's tradition ArchAngel Michael is seen to be an Angel of Death and historically has been highly venerated all across the Christiandome.

It used to be an old people believe that if one smiles on his death hour this means ArchAngel Michael has granted him to heaven and as a prize has given him a Golden Apple (in spiritual sense).

Synaxis-Assembly-of-All-The-Holy-Heavenly-Powers-Archangel-Michael

Let the Holy Archangels; Michael, Gabriel, Raphael, Uriel Selathiel, Jegudiel, Barachiel, Jarahmeel along with all angels and bodily powers pray for us so we find ways to become better people and clean up from our numerous sins by repentance.
Amen

 

Play Colorful console Tetris for Linux Mac and BSD ( bastet )

Tuesday, November 7th, 2017

console-terminal-linux-ascii-game-colorful-tetris-really-cool-way-to-kill-time-as-linux-systemadministrator

Do you remember the bsdgames package which had the good old tetris-bsd – an ASCII tetris for terminal / console along with nethack, hunt and number of other cool ascii games? If you don't you can give a try to install the package if you don't have it yet, install it on Debian Linux / Ubuntu with.

linux:~# apt-get install –yes tetris-bsd

Then launch tetris-bsd like so:

$ /usr/games/tetris-bsd

tetris-bsd-console-tetris-for-linux-and-freebsd

But wait there is more just recently I found out there is a modern colorful version remake of bsd-tetris called bastet

To give it a try install it with apt-get on Deb based Linuces

linux:~# apt-get install bastet
Четене на списъците с пакети… Готово
Изграждане на дървото със зависимости       
Четене на информацията за състоянието… Готово
Следните допълнителни пакети ще бъдат инсталирани:
  libboost-program-options1.55.0
Следните НОВИ пакети ще бъдат инсталирани:
  bastet libboost-program-options1.55.0
0 актуализирани, 2 нови инсталирани, 0 за премахване и 1 без промяна.
Необходимо е да се изтеглят 219 kB архиви.
След тази операция ще бъде използвано 858 kB допълнително дисково пространство.
Искате ли да продължите? [Y/n] Y
Изт:1 http://ftp.uk.debian.org/debian/ jessie/main libboost-program-options1.55.0 amd64 1.55.0+dfsg-3 [143 kB]
Изт:2 http://ftp.uk.debian.org/debian/ jessie/main bastet amd64 0.43-3+b1 [75,7 kB]
Изтеглени 219 kB за 0с (220 kB/сек)     
Предварително настройване на пакети …
Selecting previously unselected package libboost-program-options1.55.0:amd64.
(Reading database … 172280 files and directories currently installed.)
Preparing to unpack …/libboost-program-options1.55.0_1.55.0+dfsg-3_amd64.deb …
Unpacking libboost-program-options1.55.0:amd64 (1.55.0+dfsg-3) …
Selecting previously unselected package bastet.
Preparing to unpack …/bastet_0.43-3+b1_amd64.deb …
Unpacking bastet (0.43-3+b1) …
Processing triggers for hicolor-icon-theme (0.13-1) …
Processing triggers for man-db (2.7.0.2-5) …
Processing triggers for desktop-file-utils (0.22-1) …
Processing triggers for mime-support (3.58) …
Setting up libboost-program-options1.55.0:amd64 (1.55.0+dfsg-3) …
Setting up bastet (0.43-3+b1) …
Processing triggers for libc-bin (2.19-18+deb8u10) …

linux:~$ /usr/games/bastet

bastet-linux-ascii-colorful-console-terminal-tetris-start-screen

FreeBSD users can also install it either via freebsd ports :

freebsd#  cd /usr/ports/games/bastet/ && make install clean

or through binary package with:


freebsd# pkg install bastet

linux-macos-freebsd-play-game-ascii-colorful-tetris-in-console-bsd-bastet

Mac OS X users can also enjoy it but you need to install Mac OS X home brew package manager

Once having brew command install the tiny ASCII tetris game through Mac OS X terminal with:

$ brew install basket

Enjoy bastet 🙂
 

Where are Apache log files on my server – Apache log file locations on Debian / Ubuntu / CentOS / Fedora and FreeBSD ?

Tuesday, November 7th, 2017

apache-where-are-httpd-access-log-files

Where are Apache log files on my server?

1. Finding Linux / FreeBSD operating system distribtion and version

Before finding location of Apache log files it is useful to check what is the remote / local Linux operating system version, hence

First thing to do when you login to your remote Linux server is to check what kind of GNU / Linux you're dealing with:

cat /etc/issue
cat /etc/issue.net


In most GNU / Linux distributions should give you enough information about the exact Linux distribution and version remote server is running.

You will get outputs like

# cat /etc/issue
SUSE LINUX Enterprise Server 10.2 Kernel \r (\m), \l

or

# cat /etc/issue
Debian GNU/Linux 8 \n \l

If remote Linux is Fedora look for fedora-release file:

cat /etc/fedora-release Fedora release 7 (Moonshine)

The proposed freedesktop.org standard with the introduction of systemd across all Linux distributions is

/etc/os-release

 

# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"


Once we know what kind of Linux distribution we're dealing with, we can proceed with looking up for standard location of Apache config:

2. Apache config file location for Fedora / CentOS / RHEL and other RPM based distributions

RHEL / Red Hat / CentOS / Fedora Linux Apache access file location
 

/var/log/httpd/access_log


3. Apache config file location for Debian / Ubuntu and other deb based Linux distributions

Debian / Ubuntu Linux Apache access log file location

/var/log/apache2/access.log


4. Apache config file location for FreeBSD

FreeBSD Apache access log file location –

/var/log/httpd-access.log


5. Finding custom Apache access log locations
 

If for some reason the system administrator on the remote server changed default path for each of distributions, you can find custom configured log files through:

a) On Debian / Ubuntu / deb distros:

debian:~# grep CustomLog /etc/apache2/apache2.conf


b) On CentOS / RHEL / Fedora Linux RPM based ones:

[root@centos:  ~]# grep CustomLog /etc/httpd/conf/httpd.conf


c) On FreeBSD OS

 

freebsd# grep CustomLog /etc/httpd/conf/httpd.conf
 # a CustomLog directive (see below).
    #CustomLog "/var/log/httpd-access.log" common
    CustomLog "/var/log/httpd-access.log" combined

How to use zip command to archive directory and files in GNU / Linux

Monday, November 6th, 2017

how-to-use-zip-command-to-archive-directory-and-files-in-gnu-linux-and-freebsd

How to zip directory or files with ZIP command in LInux or any other Unix like OS?

Why would you want to ZIP files in Linux if you have already gzip and bzip archive algorithms? Well for historical reasons .ZIP is much supported across virtually all major operating systems like Unix, Linux, VMS, MSDOS, OS/2, Windows NT, Minix, Atari and Macintosh, FreeBSD, OpenBSD, NetBSD, Amiga and Acorn RISC and many other operating systems.

Assuming that zip command line tool is available across most GNU / Linux and WinZIP is available across almost all Windowses, the reason you might need to create .zip archive might be to just transfer the files from your Linux / FreeBSD desktop system or a friend with M$ Windows.

So below is how to archive recursively files inside a directory using zip command:
 

 $ zip -r myvacationpics.zip /home/your-directory/your-files-pictures-text/

 


or you can write it shorter with omitting .zip as by default zip command would create .zip files

 

$ zip -r whatever-zip-file-name /home/your-directory/your-files-pictures-text/

 


The -r tells zip to recurse into directories (e.g. archive all files and directories inside your-files-pictures-text/)

If you need to archive just a files recursively with a file extension such as .txt inside current directory

 

$ zip -R my-zip-archive.zip '*.txt'


Above command would archive any .txt found inside your current directory if the zip command is for example issued from /home/hipo all found files such as /home/hipo/directory1, /home/hipo/directory2, /home/hipo/directory2/directory3/directory4 and all the contained subdirs that contain any .txt extension files will be added to the archive.

For the Linux desktop users that are lazy and want to zip files without much typing take a look at PeaZip for Linux 7Z / ZIP GUI interface tool

 

Email Linux alternative text console clients to Thunderbird, fetchmail, Mutt, fetchmail + Alpine how to

Saturday, November 4th, 2017

linux-email-alternatives-for-text-console-email-fetching-gathering-alternative-to-thunderbird-and-evolution-howto

As a GNU / Linux user you might end up searching for the best email client to satisfy your needs, for those who used so far Outlook Express on M$ Windows first switch to GNU / Linux the most likely one to choose is either Mozilla Thunderbird or GNOME's Evolution default Mail Clientbut what more text / console programs are there that will allow you to easily check email via POP3 and IMAP on Linux?

 

1. Install Fetchmail and use to collect and copy your emails from remote server to your local machine
 

 SSL enabled POP3, APOP, IMAP mail gatherer/forwarder
 fetchmail is a free, full-featured, robust, and well-documented remote mail
 retrieval and forwarding utility intended to be used over on-demand TCP/IP
 links (such as SLIP or PPP connections).  It retrieves mail from remote mail
 servers and forwards it to your local (client) machine's delivery system, so
 it can then be read by normal mail user agents such as mutt, elm, pine,
 (x)emacs/gnus, or mailx.  The fetchmailconf package includes an interactive
 GUI configurator suitable for end-users.

To install it, issue:
 

apt-get install –yes fetchmail procmail


To configure fetchmail to gather your mail from your POP3 / IMAP mailbox, create below
.fetchmailrc configuratoin and modify according to your account

 

# vim .fetchmailrc

 

#### .fetchmailrc
 set daemon 600
 set logfile fetchmail.log

 poll the_mail_server_hostname proto POP3

  user "Remote_Username" pass "PASSWORD=" is "local_username" preconnect "date >> fetchmail.log"
 #ssl
  fetchall
  #no keep
  no rewrite
  mda "/usr/bin/procmail -f %F -d %T";


Here is also few words on each of the .fetchmailrc config options

set daemon 600 The fetchmail binary with run in the background in daemon mod and fetch mail from the server every 600 seconds or 10 minutes.

set logfile fetchmail.log This will set the directory and file name of the fetchmail user log file. Eveytime fetchmail recieves an email, checks the pop3 server or errors out you will find an entry here.

poll the_isp_mail_server proto POP3 This line tells fetchmail what mail server to contact, in theis case "the_isp_mail_server" and to use the "POP3" protocol.

user "remote_user_name" pass "PASSWORD" is "local_username" preconnect "date >> fetchmail.log The user directive tells fetchmail what the name of the user on the remote mail server is for example "remote_user_name". The pass directive is simply the password you will use for the remote user on the mail server. The "is" directive is optional. It tells fetchmail to deliver mail to a diferent user name if the user on the remote mail server and the local machine are different. For example, I may be using the name "joe.doe" on the mail server, but my local user name is "jdoe". I would use a line like user "joe.doe" pass "PASSWORD" is "jdoe". The preconnect command simply adds the current time and date to the fetchmail log file every time fetchmail checks for new mail.

ssl The "ssl" directive tells fetchmail to use encryption when connecting to the pop3 mail server. Fetchmail will use port 995 instead of port 110 for un-encypted mail communication. In order to use ssl the remote mail server must be able to use ssl. Comment out this directive if you do _not_ use pop3s.

fetchall Fetchall just means to fetch all of the mail on the mail server no matter what the "read" flag is. It is possibly to read mail through many different processes. If you use another mail client from another location, for example you could have read you mail and kept it ont he server, but marked it with the "read" flag. At this point if you did _not_ use the "fetchall" flag then only mail marked as new would be downloaded.

no keep Once the mail is downloded from the mail server fetchmail is to tell the server to remove it from the server. You may choose to comment this option out if you want to leave all mail on the server.

no rewrite Do not rewrite headers. When fetchmail recieves the mail you do not want any of the headers mangled in any way. This directive tells fetchmail to leave the headers alone.

mda "/usr/bin/procmail -f %F -d %T"; The mda is your "mail delivery agent. Procmail is the program that fetchmail will hand the mail off to once it is downloaded. The argument "-f %F" logs who the mail if from and "-d %T" turns on explicit delivery mode, delivery will be to the local user recipient.

For configuring multiple mailboxes email to be gathered to local machine through fetchmail add to above configuration, some more config similar to this:

 poll mail.example.com protocol pop3:
       username "admin" password "your-plain-text-password" is "username" here;
       username "what-ever-user-name" password "Just-another-pass#" is "foreman" here;

  poll mail.example.org protocol pop3 with option sslproto '':
       user "whatever-user1" password "its-my-pass" mda "/usr/bin/procmail -d %T":   user "whatever-user1" password "its-my-pass" mda "/usr/bin/procmail -d %T

 


Because as you can see fetchmail keeps password in plaintext it is a best security practice to set some good file permissions on .fetchmailrc just to make sure some other local user on the same Linux / Unix machine will not be able to read your plaintext password, to do so issue below command.
 

chmod 600 ~/.fetchmailrc

 

For the purpose of logging as we have it into the config you will also need to create new blank file fetchmail.log
 

touch fetchmail.log


Once fetchmail all your emails you can use mail command to view your messages or further configure alpine or mutt to read the downloaded messages.

 

2. Use Alpine text based email client to check your downloaded email with fetchmail
 

Alpine is Text-based email client, friendly for novices but powerful
 Alpine is an upgrade of the well-known PINE email client.  Its name derives
 from the use of the Apache License and its ties to PINE.

In other words what Alpine is it is a rewritten and improved version of the good old PINE Unix email client (for those who remember it).

To give alpine a try on Debian / Ubuntu install it with:

 

apt-get install –yes alpine pilot

 

Mutt-text-console-linux-email-client

 


3. Use MuTT advanced and much more colorful text email client to view your emailbox

mutt-text-email-client-logo-dog

 Mutt is a sophisticated text-based Mail User Agent. Some highlights:
 .
  * MIME support (including RFC1522 encoding/decoding of 8-bit message
    headers and UTF-8 support).
  * PGP/MIME support (RFC 2015).
  * Advanced IMAP client supporting SSL encryption and SASL authentication.
  * POP3 support.
  * ESMTP support.
  * Message threading (both strict and non-strict).
  * Keybindings are configurable, default keybindings are much like ELM;
    Mush and PINE-like ones are provided as examples.
  * Handles MMDF, MH and Maildir in addition to regular mbox format.
  * Messages may be (indefinitely) postponed.
  * Colour support.
  * Highly configurable through easy but powerful rc file.

 

To install MuTT:

 

linux:~# apt-get install –yes mutt

Configuring mutt if you don't have priorly set-up with fetchmail to collect your remote e-mails, you might want to try out .mutt's email fetch features to do so you will need a .muttrc configuration like that:
 

# Automatically log in to this mailbox at startup
set spoolfile="imaps://User_Name:Your-Secret-Password@mail.example.com/"
# Define the = shortcut, and the entry point for the folder browser (c?)
set folder="imaps://mail.example.com/"
set record="=Sent"
set postponed="=Drafts"

You might also omit placing the password inside .muttrc configuration as storing the password in plaintext might be a big security hole if someone is able to read it at certain point, but the downside of that is you'll be asked by mutt to fill in your email password on every login which at a point becomes pretty annoying.
 

If you face problems with inability of mutt to connect to remote mail server due to TLS problems, you can also try to play with below configurations:
 

# activate TLS if available on the server
 set ssl_starttls=yes
 # always use SSL when connecting to a server
 set ssl_force_tls=yes
 # Don't wait to enter mailbox manually
 unset imap_passive        
 # Automatically poll subscribed mailboxes for new mail (new in 1.5.11)
 set imap_check_subscribed
 # Reduce polling frequency to a sane level
 set mail_check=60
 # And poll the current mailbox more often (not needed with IDLE in post 1.5.11)
 set timeout=10
 # keep a cache of headers for faster loading (1.5.9+?)
 set header_cache=~/.hcache
 # Display download progress every 5K
 set net_inc=5
 

 

Once you have the emails downloaded with fetchmail for your mailbox mutt should be showing your email stuff like in below screenshot
 

linux:~$ mutt

 

 

Mutt-text-console-linux-email-client

Of course a very handy thing to have is w3m-img text browser that displays images as it might be able to open your pictures attached to email if you're on a physical console tty.

I'll be curious to hear, if you know of better and easier solutions to check mail in console, so if you know such please drop a comment explaining how you check your mail text.

 

How to make for loop (cycles) in KSH useful for FreeBSD / UNIX system administrators

Friday, November 3rd, 2017

korn-shell-how-to-make-loops-easily-for-sys-admin-purposes

Sometimes we have to administrate this operating systems such as FreeBSD / AIX / HP UX or even Mac OS server where by default due to historical reasons or for security bash shell is not avialable. That's not a common scenario but it happens so if as sysadmin we need to create for loops on ksh it is useful to know how to do that, as for loop cycles are one of the most important command line tools the sysadmin swiss army knife kind of.

So how to create a for loop (cycle) in ksh (Korn Shell)?

The most basic example for a KSH loop shell is below:
 

#!/bin/ksh
for i in 1 2 3 4 5
do
  echo "Welcome $i times"
done

 


Add the content to any file lets say ksh_loop.ksh then make it executable as you do in bash shells

 

 

$ chmod +x ksh_loop.ksh
$ ksh ksh_loop.ksh

 


The overall syntax of the for loop ksh command is as follows:

 

 

for {Variable} in {lists}
do
    echo ${Variable}
done

 


Hence to list lets say 20 iterations in a loop in ksh you can use something like:
 

#!/bin/ksh
for i in {1..20}
do
  echo "Just a simple echo Command $i times";
# add whatever system commands you like here
done

 


Example for some useful example with KSH loop is to list a directory content so you can execute whatever command you need on each of the files or directories inside

 

#!/bin/ksh
for f in $(ls /tmp/*)
do
        print "Iterating whatever command you like on /tmp dir : $f"
done


Other useful for loop iteration would be to print a file content line by line just like it is done in bash shell, you can do that with a small loop like belows:

 

#!/bin/ksh
for iteration_variable in $(cat  file_with-your-loved-content-to-iterate.txt)
do
        print "Current iteration like is : $iteration_variable"
done