tag:blogger.com,1999:blog-12484320900599925472019-03-01T10:36:20.100+01:00Jan 'h0nza' HřídelOne day, my hard work will overtake your talent. Watch me.Unknownnoreply@blogger.comBlogger83125tag:blogger.com,1999:blog-1248432090059992547.post-2936072912709338572018-12-31T10:22:00.001+01:002018-12-31T10:41:33.180+01:00PF 2019<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><span style="margin-left: auto; margin-right: auto;"><a href="https://hridel.com/pf?utm_source=pf2019&utm_campaign=link&utm_medium=blog" target="_blank"><img border="0" data-original-height="450" data-original-width="800" height="360" src="https://hridel.com/images/pf/pf_2019_web.jpg" width="640" /></a></span></td></tr><tr><td class="tr-caption" style="text-align: center;"><a href="https://hridel.com/pf" target="_blank">Pour Féliciter 2019: choose the right point of view</a></td></tr></tbody></table><br /><div style="text-align: center;"><span style="font-size: large;"><a href="https://hridel.com/pf?utm_source=pf2019&utm_campaign=link&utm_medium=blog">www.hridel.com/pf</a></span></div><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.comtag:blogger.com,1999:blog-1248432090059992547.post-47746053085163664832018-07-04T11:13:00.001+02:002018-12-07T12:43:20.941+01:00Vim: How to delete linesIf you need to quickly delete some lines of text document in <strong>vim</strong> editor, these commands could be useful for you: <br /><ul><li><b>dd</b> (delete current line)</li><li><b>5dd</b> (delete five lines)</li><li><b>d$</b> (delete to end of line)</li><li><b>d0</b> (delete to beginning of line)</li><li><b>:1,.d</b> (delete to beginning of file)</li><li><b>:.,$d</b> (delete to end of file)</li></ul><div class="separator" style="clear: both; text-align: center;"><a href="https://2.bp.blogspot.com/-OdAK276uNLU/WzyPfTq2piI/AAAAAAABjZA/gULXvldvKjkfP_NSnNQTds8iMSe7YVC7ACLcBGAs/s1600/Selection_151.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="581" data-original-width="732" height="505" src="https://2.bp.blogspot.com/-OdAK276uNLU/WzyPfTq2piI/AAAAAAABjZA/gULXvldvKjkfP_NSnNQTds8iMSe7YVC7ACLcBGAs/s640/Selection_151.png" width="640" /></a></div><div><br /></div><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-50000068829448128712018-01-01T11:38:00.000+01:002018-12-31T10:43:10.780+01:00PF 2018Happy New Year to you all!<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://hridel.com/pf#archive" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="600" data-original-width="800" height="480" src="https://hridel.com/images/pf/pf_2018_web.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><span id="goog_745672670"></span><span id="goog_745672671"></span><a href="https://draft.blogger.com/"></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div style="text-align: center;"><a href="https://hridel.com/pf#archive" target="_blank">www.hridel.com/pf#archive</a></div><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0Benátky, Itálie45.4408474 12.31551509999997145.0840994 11.67006809999997 45.797595400000006 12.960962099999971tag:blogger.com,1999:blog-1248432090059992547.post-40831439008847113772017-09-18T15:04:00.000+02:002017-09-18T15:07:20.947+02:00How to install Sublime Text 3 in linuxSublime Text 3 is the current version of Sublime Text. Version 3.0 was released as a stable version on the 13th of September.<br /><br /><h4>Some news from changelog:</h4><ul><li>Refreshed UI theme, including full high DPI support</li><li>New icon</li><li>Added alternate theme, Adaptive, that inherits colors from the color scheme</li><li>Added new color schemes Breakers, Mariana and Sixteen, derived from the excellent work of Chris Kempson and Dmitri Voronianski</li><li>Added color scheme and theme switchers with live preview via the command palette</li><li>Linux: Added repositories for apt, yum and pacman</li><li>etc…</li></ul><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://3.bp.blogspot.com/-YO3bY82OZjA/Wb_D9rj9xcI/AAAAAAABeXc/UPfRh6uV_JsKneJa6lFh8XbRdwdB0h37wCLcBGAs/s1600/Sublime-Text-3.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="883" data-original-width="1328" height="265" src="https://3.bp.blogspot.com/-YO3bY82OZjA/Wb_D9rj9xcI/AAAAAAABeXc/UPfRh6uV_JsKneJa6lFh8XbRdwdB0h37wCLcBGAs/s400/Sublime-Text-3.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Sublime Text 3 in elementary OS</td></tr></tbody></table><div><br /></div><h4>Instalation in Ubuntu-based distributions (Ubuntu, Elementary OS, Linux Mint, …)</h4><div><pre class="pretty-print">~$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -<br />~$ echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list<br />~$ sudo apt-get update<br />~$ sudo apt-get install sublime-text<br /></pre></div><h4><br /></h4><h4>How to run it from terminal</h4><div><pre class="pretty-print">~$ subl<br /></pre></div><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-16469170639752823272017-01-03T14:41:00.002+01:002018-12-31T10:44:49.331+01:00#PF2017Happy New Year to you all!<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://hridel.com/pf#archive" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="410" data-original-width="800" height="328" src="https://hridel.com/images/pf/pf_2017_web.jpg" width="640" /></a></div><br /><div class="separator" style="clear: both; text-align: center;"><span id="goog_745672670"></span><span id="goog_745672671"></span><a href="https://draft.blogger.com/"></a></div><div class="separator" style="clear: both; text-align: center;"><br /></div><div style="text-align: center;"><a href="https://hridel.com/pf#archive" target="_blank">www.hridel.com/pf</a></div><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-32309651644196799592016-02-25T22:03:00.000+01:002016-02-25T22:04:52.601+01:00Jessy loves soccer!Jessy is our 6 months old puppy and she loves ball games. Today she had an opportunity to celebrate with AC Sparta Prague! Our favourite football team defeated Krasnograd in European League match.<br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/9RPNQ7dYZdo/0.jpg" frameborder="0" height="532" src="https://www.youtube.com/embed/9RPNQ7dYZdo?feature=player_embedded" width="640"></iframe></div><br /><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-71643759354232712502016-02-08T19:56:00.001+01:002016-02-08T19:56:54.868+01:00How to setup a VirtualHost on FedoraIf you are developing more projects at the same time on your localhost machine, it is very practical to use the virtual hosts on your Apache web server. How to run <a href="http://blog.hridel.com/2016/02/how-to-install-apache-on-fedora.html">Apache web server on Fedora</a> you can read in another post on my blog.<br /><br />For example we will develop projects on domains <i>www.projectA.com</i> and <i>www.projectB.com</i>. So let's set it up.<br /><br />All additional configurations of Apache web server are loaded from alphabetically sorted files with <code>.conf</code> extension in <code>/etc/httpd/conf.d/</code> directory. So create the first one. You can use your favourite text editor of course (<i>vim</i> is not required ;)).<br /><pre class="pretty-print">$ sudo vim /etc/httpd/conf.d/01-projectA.conf</pre><br />with this content:<br /><pre class="pretty-print"><VirtualHost *:80><br /> ServerAdmin your@adminemail.com<br /> ServerName projecta.dev<br /> ServerAlias www.projecta.dev<br /> DocumentRoot /var/www/projecta.com/public/<br /><br /> ErrorLog /var/log/httpd/error-projecta.log<br /> CustomLog /var/log/httpd/access-projecta.log combined<br /><br /> <Directory /var/www/projecta.com/><br /> Options Indexes FollowSymLinks<br /> AllowOverride All<br /> </Directory><br /><br /></VirtualHost><br /></pre><br />I used .dev <abbr title="Top Level Domain">tld</abbr> (which is very popular by web developers) in configuration above. Then is easy to work with url rewrites and domains.<br /><br />For the second project just create very similar file: <code>/etc/httpd/conf.d/02-projectB.conf</code><br /><pre class="pretty-print"><VirtualHost *:80><br /> ServerAdmin your@adminemail.com<br /> ServerName projectb.dev<br /> ServerAlias www.projectb.dev<br /> DocumentRoot /var/www/projectb.com/public/<br /><br /> ErrorLog /var/log/httpd/error-projectb.log<br /> CustomLog /var/log/httpd/access-projectb.log combined<br /><br /> <Directory /var/www/projectb.com/><br /> Options Indexes FollowSymLinks<br /> AllowOverride All<br /> </Directory><br /><br /></VirtualHost><br /></pre><br />Of course we need to create directories and index files specified above, for example: <code>/var/www/projecta.com/public/index.html</code> and <code>/var/www/projectb.com/public/index.html</code>. <br /><br />As the next step we need to add these lines into our <code>/etc/hosts</code> file. This file is responsible for right routing specific domains to correct ip addresses. <br /><pre class="pretty-print">127.0.1.1 projecta.dev www.projecta.dev<br />127.0.2.1 projectb.dev www.projectb.dev<br /></pre><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-r9d9F7lDAZk/VrjiugEsLgI/AAAAAAABITU/jpTGpwMdyX4/s1600/h0nza%2540hydra%253A%257E_017.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="312" src="https://1.bp.blogspot.com/-r9d9F7lDAZk/VrjiugEsLgI/AAAAAAABITU/jpTGpwMdyX4/s640/h0nza%2540hydra%253A%257E_017.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">edit /etc/hosts file</td></tr></tbody></table><br />And the last step is restart the Apache webserver:<br /><pre class="pretty-print">$ sudo systemctl restart httpd</pre><br />Then we can test our configuration by enter the urls: <i>http://projecta.dev</i> and <i>http://projectb.dev</i><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-iAPXx-6Naek/VrjiZ3zWtAI/AAAAAAABITM/XllhSz7rXQU/s1600/Selection_018.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="396" src="https://4.bp.blogspot.com/-iAPXx-6Naek/VrjiZ3zWtAI/AAAAAAABITM/XllhSz7rXQU/s640/Selection_018.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Test urls in browser: http://projecta.dev and http://projectb.dev</td></tr></tbody></table><br /><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-50948504453593513902016-02-07T11:25:00.001+01:002016-02-07T11:30:24.200+01:00How to add PostGIS to PostgreSQLPostGIS is a great extension if you want to work with geographical data in PostgreSQL. Installation of <b>PostgreSQL</b> extension is really easy. Just run this SQL command:<br />CREATE EXTENSION postgis;<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-49C1bQZj2WQ/VrcYHBkEBlI/AAAAAAABIMQ/_0JeORkZ0lI/s1600/Selection_014.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="388" src="https://2.bp.blogspot.com/-49C1bQZj2WQ/VrcYHBkEBlI/AAAAAAABIMQ/_0JeORkZ0lI/s640/Selection_014.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Create postgis extension in pgAdmin3</td></tr></tbody></table>If you see the error like in the picture above, that means you have not installed postgis package. Just install it with command (Fedora 23 solution):<br /><pre class="pretty-print">$ sudo dnf install postgis postgis-utils postgis-docs</pre><br /><br />And then repeat sql command:<br />CREATE EXTENSION postgis;<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-_oU1NLZ_OOs/VrcbK9telRI/AAAAAAABIMc/G6zNmFxlYYI/s1600/Selection_016.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="388" src="https://3.bp.blogspot.com/-_oU1NLZ_OOs/VrcbK9telRI/AAAAAAABIMc/G6zNmFxlYYI/s640/Selection_016.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">PostgreSQL: PostGIS extension</td></tr></tbody></table><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-9465274432715275512016-02-07T10:33:00.000+01:002016-02-07T10:33:16.036+01:00How to setup PostgreSQL on FedoraNot only <a href="http://blog.hridel.com/2016/02/how-to-install-mysql-or-mariadb-on.html">MySQL or MariaDB</a> you can use for web development. My favourite database system is <b>PostgreSQL</b>. PostgreSQL is more like Oracle and has many and many features (and extensions). So how to install it on Fedora linux...<br /><pre class="pretty-print">$ sudo dnf install postgresql-server postgresql-contrib</pre><br />By default the postgresql server is disabled and of course turned off. You can enable its start during the boot your system following this command:<br /><pre class="pretty-print">$ sudo systemctl enable postgresql</pre><br />If you try to start it after installation with command...<br /><pre class="pretty-print">$ sudo systemctl start postgresql</pre><br />...you will probably end with an error like this:<br /><i>Job for postgresql.service failed. See 'systemctl status postgresql.service' and 'journalctl -xn' for details.</i><br /><br />It's ok because postgresql needs to be populated with initial data after instalation. It means you have to create the configuration files <code>postgresql.conf</code> and <code>pg_hba.conf</code>. You can do that by the following command:<br /><pre class="pretty-print">$ sudo postgresql-setup initdb</pre><br /><h2>Firewall</h2>Of course you should enable postgresql ports on firewall:<br /><pre class="pretty-print">$ firewall-cmd --add-port=5432/tcp<br />$ firewall-cmd --permanent --add-port=5432/tcp</pre><br /><h2>Database management</h2>It is more comfortable to use graphical interface like the web application <i>phpPgAdmin</i> or the desktop app <i>PgAdmin</i>. Both of them you can install with command:<br /><pre class="pretty-print">$ sudo dnf install phpPgAdmin<br />$ sudo dnf install pgadmin3</pre><br /><h2>Basic security configuration</h2>It is good idea to create new user and new database. For that You should switch to postgres user and then run postgre's interactive shell:<br /><pre class="pretty-print">$ sudo su<br />$ su - postgres<br />$ psql</pre><br /><h3>Setup password for postgres user</h3><pre class="pretty-print">postgres=# \password postgres</pre><br /><h3>User and database creation</h3>Commands for postgre's interactive shell:<br /><pre class="pretty-print">postgres=# CREATE USER joe WITH PASSWORD 'superfriend';<br />postgres=# CREATE DATABASE sandwich OWNER joe;</pre><br /><h2>Configuration</h2>For postgres configuration there are two main config files (<code>/var/lib/pgsql/data/postgresql.conf</code> and <code>/var/lib/pgsql/data/pg_hba.conf</code>).<br />If you want postgres to accept network connections, you should change in the <code>postgresql.conf</code>:<br /><pre class="pretty-print">listen_addresses = 'localhost'</pre>to <br /><pre class="pretty-print">listen_addresses = '*'</pre>You need to configure access to your database server too. You should edit the <code>pg_hba.conf</code> file to:<br /><pre class="" pretty-print=""># IPv4 local connections:<br /># TYPE DATABASE USER ADDRESS METHOD<br /> host all all 127.0.0.1/32 md5</pre><br /><h2>pgAdmin 3</h2>If you installed pgAdmin by <i>sudo dnf install pgAdmin3</i> command (seen above), it will executable by command: <br /><pre class="pretty-print">$ pgadmin3</pre><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-8LLiw4GNDpM/VrcNu4NvRkI/AAAAAAABIMA/59Go-gReic0/s1600/pgAdmin%2BIII_013.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="584" src="https://4.bp.blogspot.com/-8LLiw4GNDpM/VrcNu4NvRkI/AAAAAAABIMA/59Go-gReic0/s640/pgAdmin%2BIII_013.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">PgAdmin3</td></tr></tbody></table><br /><h2>phpPgAdmin</h2>If you installed phpPgAdmin by <i>sudo dnf install phpPgAdmin</i> command (seen above), it will accessable via url: <code>http://localhost/phpPgAdmin/</code><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-pkVB8t9RgLU/VrcEH6xIekI/AAAAAAABILw/upTMszZ72jE/s1600/phpPgAdmin%2B-%2BGoogle%2BChrome_012.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="https://1.bp.blogspot.com/-pkVB8t9RgLU/VrcEH6xIekI/AAAAAAABILw/upTMszZ72jE/s640/phpPgAdmin%2B-%2BGoogle%2BChrome_012.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">phpPgAdmin startpage</td></tr></tbody></table><br /><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-65893424870008271872016-02-06T16:44:00.000+01:002016-06-24T20:48:12.437+02:00How to install MySQL (or MariaDB) on FedoraFor your webdevelopment you probably need to communicate with database server. On Fedora you can run standard databases like <i>MySQL</i>, <i>SQLite</i>, <i>Postgresql</i> and many others. Very popular in combination with <a href="http://blog.hridel.com/2016/02/how-to-install-apache-on-fedora.html">Apache</a> and <a href="http://blog.hridel.com/2016/02/how-to-run-php-on-fedora.html">PHP</a> is <b>MySQL database</b>.<br /><br />It is very easy install and run MySQL on Fedora. Or wait... better. Why to install MySQL if you can install MariaDB? <b>MariaDB</b> is GNU GPL fork of the MySQL and offers more storage engines than MySQL. For more details about that you can try <a href="https://www.google.com/search?q=MySQL+vs.+MariaDB" rel="nofollow" target="_blank">Google</a>.<br /><br />To install MariaDB just type in your termina:<br /><pre class="pretty-print">$ sudo dnf install mariadb-server</pre><br /><br />After installation you can configure MariaDB to automatic start. Start it now and check the status of MariaDB:<br /><pre class="pretty-print">$ sudo systemctl enable mariadb.service<br /><br />$ sudo systemctl start mariadb<br /><br />$ sudo systemctl status mariadb</pre><br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://1.bp.blogspot.com/-5lPcHuB3788/VrYN-YQT4jI/AAAAAAABILE/nK4_w-7sKvo/s1600/h0nza%2540hydra%253A%257E_008.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="368" src="https://1.bp.blogspot.com/-5lPcHuB3788/VrYN-YQT4jI/AAAAAAABILE/nK4_w-7sKvo/s640/h0nza%2540hydra%253A%257E_008.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">MariaDB - status check</td></tr></tbody></table><br />After that it is good to <b>setup</b> some <b>security</b>. You can do it with command:<br /><pre class="pretty-print">$ sudo mysql_secure_installation</pre><br /><br />Note that default root password is empty. Just hit Enter key. Then you can setup new root password, disable remote login for user, disable default user, etc. Just answer <i>Yes</i> or <i>No</i> to some questions.<br /><br />If you can some tool for managing your MariaDB, you can use webtool <b>PhpMyAdmin</b>. Install it with this command:<br /><pre class="pretty-print">$ sudo dnf install phpmyadmin</pre><br /><br />That should install <i>php-mysqlnd</i> (a module for PHP applications that use MySQL databases) too. If you don't install PhpMyAdmin or if you have any problems with php - Mysql / MariaDB communication, you can install it separately with this command:<br /><pre class="pretty-print">$ sudo dnf install php-mysqlnd</pre><br /><br />Then you can try access url: <code>http://localhost/phpmyadmin/</code> and you should see login page of PhpMyAdmin:<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/-l_16wQdutw4/VrYQq0_a-BI/AAAAAAABILQ/aUClGEj3Q_4/s1600/phpMyAdmin%2B-%2BGoogle%2BChrome_010.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="502" src="https://2.bp.blogspot.com/-l_16wQdutw4/VrYQq0_a-BI/AAAAAAABILQ/aUClGEj3Q_4/s640/phpMyAdmin%2B-%2BGoogle%2BChrome_010.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">PhpMyAdmin login page</td></tr></tbody></table><br />Of course if you would rather MySQL than MariaDB, use the equivalent commands with <i>mysql</i> instead of <i>mariadb.</i><br /><pre class="pretty-print">$ sudo dnf install mysql-server<br /><br />$ sudo systemctl enable mysqld<br /><br />$ sudo systemctl start mysqld</pre><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-MMNXKRXWgtQ/VrYUVgIt8hI/AAAAAAABILc/CwD5GuEnF54/s1600/localhost%2B-%2Blocalhost%2B%257C%2BphpMyAdmin%2B4.5.4.1%2B-%2BGoogle%2BChrome_011.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="362" src="https://4.bp.blogspot.com/-MMNXKRXWgtQ/VrYUVgIt8hI/AAAAAAABILc/CwD5GuEnF54/s640/localhost%2B-%2Blocalhost%2B%257C%2BphpMyAdmin%2B4.5.4.1%2B-%2BGoogle%2BChrome_011.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">PhpMyAdmin homepage with information about your Database and Web server</td></tr></tbody></table><br /><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-353383304715070502016-02-03T21:29:00.003+01:002016-02-03T21:29:59.390+01:00How to run PHP on FedoraThis post is next from my "web development series". The last one was about <a href="http://blog.hridel.com/2016/02/how-to-install-apache-on-fedora.html" title="how to install apache on fedora">starting Apache web server on Fedora</a>.<br /><br />Of course, if you have successfully running Apache web server, you need more sophisticated programming or scripting language than HTML. You can choose <i>ruby</i>, <i>python</i>, <i>perl</i>, ...or my favourite <b>PHP</b>.<br /><br />To install php on Fedora just type in your terminal:<br /><pre class="pretty-print">$ sudo dnf install php -y</pre><br /><br />And that's all. Now just restart your Apache:<br /><pre class="pretty-print">$ systemctl restart httpd</pre><br /><br />Let's try PHP. Create new file <code>info.php</code> in document root of your webserver (probably, <code>/var/www/html/</code>) with this content: <br /><pre class="pretty-print"><?php <br /> phpinfo();<br />?><br /><br /></pre><br />Then go to url: <code>http://localhost/info.php</code> and you should see...<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-xPTGrQu8nTQ/VrJhJkgQmKI/AAAAAAABIHQ/tytecnt_kiU/s1600/phpinfo%2528%2529%2B-%2BGoogle%2BChrome_004.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="408" src="https://3.bp.blogspot.com/-xPTGrQu8nTQ/VrJhJkgQmKI/AAAAAAABIHQ/tytecnt_kiU/s640/phpinfo%2528%2529%2B-%2BGoogle%2BChrome_004.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">PHPinfo page</td></tr></tbody></table><br /><br />If you see this page... woala PHP is working fine. Next time we will talk about databases.<div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-7812677298740699472016-02-02T18:25:00.001+01:002016-06-22T14:08:31.099+02:00How to install Apache on FedoraIf you are a webdeveloper or if you just need to start local (or remote) web server (e.g. <em><strong>Apache</strong></em>, <em>NGINX</em>, <em>lighttpd</em>, <em>Jigsaw</em>, ehmm <em>IIS</em>) it is very easy process on GNU/Linux. Except MS IIS of course. My favourite is Apache and in this post I'll show you how to easy install and run it on <strong>Fedora 23</strong> and <strong>Fedora 24</strong>.<br />Apache in RPM is called httpd. So just install it.<br /><pre class="pretty-print">$ sudo dnf install httpd</pre>Done. That's it.<br /><br /><h3>Run, Apache, run!</h3>How to <b>start</b> Apache web server?<br /><pre class="pretty-print">$ systemctl start httpd</pre><br />How to <b>stop</b> Apache web server?<br /><pre class="pretty-print">$ systemctl stop httpd</pre><br />How to <b>restart</b> Apache web server? For example if you are doing some configuration changes.<br /><pre class="pretty-print">$ systemctl restart httpd</pre><br />How to start it automatically at boot time?<br /><pre class="pretty-print">$ systemctl enable httpd.service</pre><br />You also need to allow the Apache service on <strong>Firewall</strong>:<br /><pre class="pretty-print">$ firewall-cmd --permanent --zone=public --add-service=http</pre><pre class="pretty-print">$ firewall-cmd --permanent --zone=public --add-service=https</pre><pre class="pretty-print">$ firewall-cmd --reload</pre><br />Now direct your browser to <code>http://localhost</code>, and you should see the Apache2 start page:<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://4.bp.blogspot.com/-UhZi5EYi_uY/VrDh1dl1xoI/AAAAAAABIG0/iSOHmKohn9g/s1600/Test%2BPage%2Bfor%2Bthe%2BApache%2BHTTP%2BServer%2Bon%2BFedora%2B-%2BGoogle%2BChrome_003.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="444" src="https://4.bp.blogspot.com/-UhZi5EYi_uY/VrDh1dl1xoI/AAAAAAABIG0/iSOHmKohn9g/s640/Test%2BPage%2Bfor%2Bthe%2BApache%2BHTTP%2BServer%2Bon%2BFedora%2B-%2BGoogle%2BChrome_003.png" width="640" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">Apache2.4 start page on Fedora</td></tr></tbody></table><br /><h3>Useful information</h3>Apache's default <strong>document root</strong> is <code>/var/www/html</code> on Fedora, and the <strong>configuration file</strong> is <code>/etc/httpd/conf/httpd.conf</code>. Additional configurations are stored in the <code>/etc/httpd/conf.d/</code> directory. And default <strong>log files</strong> (<code>access_log</code> and <code>error_log</code>) are in the <code>/var/log/httpd/</code> directory. Note: you need root rights to access this directory. <br /><br />And how to run PHP? We will see in the next post about <a href="http://blog.hridel.com/2016/02/how-to-run-php-on-fedora.html">installing PHP</a>. ;)<div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-84453183023318161042016-02-01T18:05:00.001+01:002016-02-01T18:20:34.657+01:00How to color bash prompt in Fedora...or other <b>linux system</b>.<br /><br />If you wish to color your command line prompt in your terminal you should edit your <code><span style="font-family: "courier new" , "courier" , monospace;">.bashrc</span></code> file located in your <code><span style="font-family: "courier new" , "courier" , monospace;">home</span></code> directory. For editing you can choose your favourite text editor such as <b><i>vim</i></b>, <i>nano</i>, <i>gedit</i>, <i>kate</i>, <i>sublime text</i>, etc. Everything in linux is just text file and that's great. :)<br /><br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody><tr><td style="text-align: center;"><a href="https://1.bp.blogspot.com/-NzD-CwwQpns/Vq-Ml3PPh0I/AAAAAAABIGA/cZJ4IwhgZ-M/s1600/h0nza%2540hydra%253A%257E_001.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="267" src="https://1.bp.blogspot.com/-NzD-CwwQpns/Vq-Ml3PPh0I/AAAAAAABIGA/cZJ4IwhgZ-M/s400/h0nza%2540hydra%253A%257E_001.png" width="400" /></a></td></tr><tr><td class="tr-caption" style="text-align: center;">vim .bashrc in terminal</td></tr></tbody></table><br />So for me it is command in console: <br /><pre class="prettyprint">$ vim ~/.bashrc<br /></pre><br />And edit it like this:<br /><br /><pre class="prettyprint"># .bashrc<br /><br /># Source global definitions<br />if [ -f /etc/bashrc ]; then<br /> . /etc/bashrc<br />fi<br /><br /># Uncomment the following line if you don't like systemctl's auto-paging feature:<br /><br /> # using tput commands<br /> FGBLK=$( tput setaf 0 ) # 000000<br /> FGRED=$( tput setaf 1 ) # ff0000<br /> FGGRN=$( tput setaf 2 ) # 00ff00<br /> FGYLO=$( tput setaf 3 ) # ffff00<br /> FGBLU=$( tput setaf 4 ) # 0000ff<br /> FGMAG=$( tput setaf 5 ) # ff00ff<br /> FGCYN=$( tput setaf 6 ) # 00ffff<br /> FGWHT=$( tput setaf 7 ) # ffffff<br /><br /> BGBLK=$( tput setab 0 ) # 000000<br /> BGRED=$( tput setab 1 ) # ff0000<br /> BGGRN=$( tput setab 2 ) # 00ff00<br /> BGYLO=$( tput setab 3 ) # ffff00<br /> BGBLU=$( tput setab 4 ) # 0000ff<br /> BGMAG=$( tput setab 5 ) # ff00ff<br /> BGCYN=$( tput setab 6 ) # 00ffff<br /> BGWHT=$( tput setab 7 ) # ffffff<br /><br /> RESET=$( tput sgr0 )<br /> BOLDM=$( tput bold )<br /> UNDER=$( tput smul )<br /> REVRS=$( tput rev )<br /><br />if [ $EUID == 0 ]; then<br /> export PS1="\[$FGRED\]\u\[$FGMAG\]@\[$FGCYN\]\h \[$FGBLU\]\W\$ \[$RESET\]"<br /> else<br /> export PS1="\[$FGGRN\]\u\[$FGMAG\]@\[$FGCYN\]\h \[$FGBLU\]\W\$ \[$RESET\]"<br />fi<br /><br /></pre><br />I think the code above is clear. :) So restart your terminal and you will see.<br /><br />Happy coloring.<div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-41491417078624202772016-01-28T11:14:00.000+01:002016-01-28T11:14:41.739+01:00HyperMedia TeambuildingI work as a web developer in the company <a href="http://www.hypermedia.cz/">HyperMedia</a>, Inc. Last week we had a teambuilding in Prague kart track "Praga Arena".<br /><br />Watch the record: <br /><br /><div class="separator" style="clear: both; text-align: center;"><iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/dmUas1ukrOw/0.jpg" frameborder="0" height="500" src="https://www.youtube.com/embed/dmUas1ukrOw?feature=player_embedded" width="640"></iframe></div><br /><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0Horní Počernice, 193 00 Praha-Praha 20, Česká republika50.116099 14.62098590000005147.495259499999996 9.45741190000005 52.7369385 19.784559900000051tag:blogger.com,1999:blog-1248432090059992547.post-60762077460948354282015-12-31T14:59:00.006+01:002015-12-31T14:59:37.054+01:00#PF2016Přátelé, kolegové, obchodní partneři,<br />rádi bychom Vám popřáli mnoho úspěchů v novém roce. A ať Vás potkávají jen samé dobré zprávy.<br /><br />=============== ENGLISH ========================<br /><br />Dear friends who don't speak Czech,<br />let us wish you a wonderful, happy, healthy and prosperous New Year full of good messages.<br /><br />================================================<br /><br /><div style="text-align: center;">PF 2016: <a href="http://hridel.com/pf/?s=blog">http://hridel.com/pf/</a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://hridel.com/pf/?s=blog-img" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-DMECn_O4Ke8/VoU0HsL4AbI/AAAAAAABHE4/nY-1CPbNJy8/s320/pf_2016_mail.jpg" /></a></div><div style="text-align: center;"><br /></div><div style="text-align: right;">Lin & Honza</div><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0Praha 3, Česká republika50.086445842971877 14.45354461669921950.066067342971877 14.41320411669922 50.106824342971876 14.493885116699218tag:blogger.com,1999:blog-1248432090059992547.post-41148448908527732372015-04-06T15:31:00.000+02:002015-10-06T15:35:55.278+02:00How to get second-level domain from URL in PHP<p>There is relatively easy way in PHP how to get the full URL of your actual page. But what to do if you need just a 2nd level domain name? Okay, let's see how to!</p> <h3>1) Get the full URL</h3><pre class="prettyprint"><br />if(isset($_SERVER['HTTPS'])) $protocol = 'https';<br />else $protocol = 'http';<br /><br />$url = $protocol.'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];<br /></pre> Now when we have the full URL. We can call this function with the URL parameter. <h3>2) Function which returns 2nd level domain name</h3><pre class="prettyprint"><br />function get2ndLvlDomainName($url)<br />{<br /> // a list of decimal-separated TLDs<br /> static $doubleTlds = [<br /> 'co.uk', 'me.uk', 'net.uk', 'org.uk', 'sch.uk', 'ac.uk',<br /> 'gov.uk', 'nhs.uk', 'police.uk', 'mod.uk', 'asn.au', 'com.au',<br /> 'net.au', 'id.au', 'org.au', 'edu.au', 'gov.au', 'csiro.au',<br /> 'br.com', 'com.cn', 'com.tw', 'cn.com', 'de.com', 'eu.com',<br /> 'hu.com', 'idv.tw', 'net.cn', 'no.com', 'org.cn', 'org.tw',<br /> 'qc.com', 'ru.com', 'sa.com', 'se.com', 'se.net', 'uk.com',<br /> 'uk.net', 'us.com', 'uy.com', 'za.com'<br /> ];<br /><br /> // sanitize the URL<br /> $url = trim($url);<br /><br /> // check if we can parse the URL<br /> if ($host = parse_url($url, PHP_URL_HOST)) {<br /><br /> // check if we have IP address<br /> if (preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $host)) {<br /> return $host;<br /> }<br /><br /> // sanitize the hostname<br /> $host = strtolower($host);<br /><br /> // get parts of the URL<br /> $parts = explode('.', $host);<br /><br /> // if we have just one part (eg localhost)<br /> if (!isset($parts[1])) {<br /> return $parts[0];<br /> }<br /><br /> // grab the TLD<br /> $tld = array_pop($parts);<br /><br /> // grab the hostname<br /> $host = array_pop($parts) . '.' . $tld;<br /><br /> // have we collected a double TLD?<br /> if (!empty($parts) && in_array($host, $doubleTlds)) {<br /> $host = array_pop($parts) . '.' . $host;<br /> }<br /><br /> return $host;<br /> }<br /><br /> return 'unknown domain';<br />}<br /></pre><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-48951703406746795582015-04-06T07:30:00.000+02:002015-10-06T15:12:48.193+02:00Universal jQuery delete confirmation dialogDo you want to use JavaScript (jQuery) confirmation dialog before deleting some item? It's very simple in jQuery. Just add class "confirmDelete" to your HTML delete link. E.g. <code><a href="/delete.php?postId=15" class="confirmDelete">delete article</a></code> <div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-KlO7RRVYeVM/VhPGW9PNYiI/AAAAAAAA8iI/1R6q1e9jBHY/s1600/confirmationdialog.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-KlO7RRVYeVM/VhPGW9PNYiI/AAAAAAAA8iI/1R6q1e9jBHY/s400/confirmationdialog.jpg" /></a></div> Don't forget to link jQuery library: <code><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script></code> And finally the JavaScript (jQuery) function: <pre class="prettyprint"><br />$('.confirmDelete').click(function (){<br /> var answer = confirm("Are you sure you want to delete this article?");<br /> return !!answer;<br /> });<br /></pre> And complet testing HTML page: <pre class="prettyprint"><br /><br /><!DOCTYPE html><br /><html><br /><head lang="en"><br /> <meta charset="UTF-8"><br /> <title>Delete confirmation dialog</title><br /></head><br /><body><br /><br /><areticle><br /> <p>Aliquam accumsan lacus sed risus vulputate lacinia. <br /> Suspendisse potenti. Ut convallis enim vel erat<br /> euismod laoreet. Aenean ornare velit vel imperdiet luctus.<br /> Pellentesque condimentum luctus mattis.</p><br /></areticle><br /><p><a href="/delete.php?postId=15" class="confirmDelete">delete article</a></p><br /><br /><br /><script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script><br /><script type="text/javascript"><br /> $('.confirmDelete').click(function (){<br /> var answer = confirm("Are you sure you want to delete this article?");<br /> return !!answer;<br /> });<br /></script><br /></body><br /></html><br /></pre><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-86418902757645182752015-03-19T07:34:00.000+01:002015-10-02T07:37:05.235+02:00How to send an email with an attachment in php<p>At first, you should check if your <strong>php.ini</strong> file is configured correctly. It depends on your operating system. So locate and open your php.ini file. E.g. <strong>/etc/php5/apache2/php.ini</strong> and find the <strong>[mail function]</strong> section. </p> <div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/--kUpxeIVWdw/Vg4X5gMpc0I/AAAAAAAA8bE/QghmkXCgFw8/s1600/emailing.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/--kUpxeIVWdw/Vg4X5gMpc0I/AAAAAAAA8bE/QghmkXCgFw8/s400/emailing.jpg" /></a></div> <p>This file should looks like this. Be sure you have the right configuration depending on your system. ;)<p> <pre class="prettyprint"><br />[mail function]<br />; For Win32 only.<br />; http://php.net/smtp<br />SMTP = localhost<br />; http://php.net/smtp-port<br />smtp_port = 25<br /><br />; For Win32 only.<br />; http://php.net/sendmail-from<br />;sendmail_from = me@example.com<br /><br />; For Unix only. You may supply arguments as well (default: "sendmail -t -i").<br />; http://php.net/sendmail-path<br />;sendmail_path =<br /><br />; Force the addition of the specified parameters to be passed as extra parameters<br />; to the sendmail binary. These parameters will always replace the value of<br />; the 5th parameter to mail(), even in safe mode.<br />;mail.force_extra_parameters =<br /><br />; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename<br />mail.add_x_header = On<br /><br />; The path to a log file that will log all mail() calls. Log entries include<br />; the full path of the script, line number, To address and headers.<br />;mail.log =<br />; Log mail to syslog (Event Log on NT, not valid in Windows 95).<br />;mail.log = syslog<br /></pre> <p>In PHP is used <code>bool mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )</code> function to send emails. The meaning of the parameters is:</p><ul> <li><strong>to</strong> - Receiver, or receivers of the mail. Examples:<ul><li>user@phpninja.eu</li><li>user@phpninja.eu, anotheruser@phpninja.eu</li><li>User <user@phpninja.eu></li><li>User <user@phpninja.eu>, Another User <anotheruser@phpninja.eu></li></ul></li> <li><strong>subject</strong> - Subject of the email to be sent. </li><li><strong>additional_headers</strong> (optional) - String to be inserted at the end of the email header. It's typically used to set <em>From</em>, <em>CC</em>, <em>BCC</em>.</li><li><strong>additional_parameters</strong> (optional) - It can be used to pass additional flags as command line options to the <em>sendmail</em> program.</li></ul> <p>The <code>mail()</code> function returns <strong>TRUE</strong> if the mail was successfully accepted for delivery, <strong>FALSE</strong> otherwise. </p><h3>Adding an attachment</h3><p>If you want to send an email with an attachment is required to set <strong>Content-type</strong> header to <strong>multipart/mixed</strong>. Then you can specify the body and the attachment sections within the boundaries.</p><p>A boundary starts with <strong>two hyphens</strong> followed by a <strong>unique number</strong>. It can't appear in the body part of the email. For generating this number you can use e.g. <code>md5()</code> or <code>sha1()</code> function. A final boundary of the final section must also end with two hyphens.</p><p>For safer transmission of the attachments you should encode them with the <code>base64_encode()</code> function, and with the <code>chunk_split()</code> function split them into chunks. This function adds <strong>\r\n</strong> break inside the file at regular intervals (normally every 76 characters).</p><p>See this example which send HTML email with <strong>/tmp/file.pdf</strong> file as an attachment.</p> <pre class="prettyprint"><br />$to = "PHP ninja <ninjasmail@phpninja.eu>";<br />$subject = "See attachment";<br />$body = 'Hi ninja,<br>please check the attachment! :)';<br /><br />// Open a file<br />$file = fopen( '/tmp/file.pdf', 'r' );<br /><br /><br />// Read the file into a variable<br />$size = filesize('/tmp/file.pdf');<br />$content = fread($file, $size);<br /><br />// encode the data for safe transit<br />// and insert \r\n after every 76 chars.<br />$encodedContent = chunk_split(base64_encode($content));<br /><br />$number = sha1(microtime());<br /><br />// Define the main headers.<br />$header = "From:superadmin@phpninja.eu\r\n";<br />$header .= "MIME-Version: 1.0\r\n";<br />$header .= "Content-Type: multipart/mixed; ";<br />$header .= "boundary=$number\r\n";<br />$header .= "--$number\r\n";<br /><br />// Define the message section<br />$header .= "Content-Type: text/html\r\n";<br />$header .= "Content-Transfer-Encoding:8bit\r\n\n";<br />$header .= $body."\r\n";<br />$header .= "--$number\r\n";<br /><br />// Define the attachment section<br />$header .= "Content-Type: multipart/mixed; ";<br />$header .= "name=\"file.pdf\"\r\n";<br />$header .= "Content-Transfer-Encoding:base64\r\n";<br />$header .= "Content-Disposition:attachment; ";<br />$header .= "filename=\"file.pdf\"\r\n\n";<br />$header .= $encodedContent."\r\n";<br />$header .= "--$number--";<br /><br /># Send email now<br />if(mail($to, $subject, "", $header))<br /> echo("E-mail was successfully sent");<br />else<br /> echo("Ooops! Something's not right.");<br /><br /></pre><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-63915307595627806882015-03-19T07:30:00.000+01:002015-10-06T11:16:54.323+02:00PHP: How to extract numbers from the stringYou can use regular expression of course. Other choice is to use the <strong>PHP</strong> <code>filter_var()</code> <strong>function</strong>. <div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-rGGl5jyUy98/VhOQK0T2heI/AAAAAAAA8h4/vM-PpzngzT4/s1600/numbers.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://2.bp.blogspot.com/-rGGl5jyUy98/VhOQK0T2heI/AAAAAAAA8h4/vM-PpzngzT4/s400/numbers.jpg" /></a></div> See this example: <pre class="prettyprint"><br /><br />$array = array('car1',<br /> '20apples',<br /> 'birds',<br /> 'string 111 with spaces',<br /> 'more 20 integers 5 in one string');<br /><br />foreach ($array as $item) {<br /> $number = filter_var($item, FILTER_SANITIZE_NUMBER_INT);<br /><br /> //print results<br /> var_dump($number);<br />}<br /></pre> As you can see, the result is string which contains only the digits from the original string. <pre><br />string(1) "1"<br />string(2) "20"<br />string(0) ""<br />string(3) "111"<br />string(3) "205"<br /></pre><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-34901920996705691182015-03-15T08:09:00.000+01:002015-09-30T08:18:35.179+02:00How to hash and verify the password?<p>When you develop any application that accepts passwords from users, you should store passwords hashed. It's the basic rule of <strong>security</strong>.</p> <div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-NaRNj9VeVmA/Vgt8-kHUJOI/AAAAAAAA8aI/BO8YnktxjcA/s1600/hash.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-NaRNj9VeVmA/Vgt8-kHUJOI/AAAAAAAA8aI/BO8YnktxjcA/s400/hash.jpg" /></a></div> <p>Probably you know basic hash functions such as <code>sha1()</code> or <code>md5()</code>. These algorithms are designed to be very fast and efficient. But with modern techniques and computers it's not very hard to use “brute force” to determine the original input. Of course you can use your own “salt solution” for passwords but from PHP 5.5 you can use <code><a href="http://php.net/manual/en/function.password-hash.php" title="PHP manual: password hash function" target="_blank">password_hash()</a></code> function for <strong>password hashing</strong> and <code><a href="http://php.net/manual/en/function.password-verify.php" title="PHP manual: password hash verify function" target="_blank">password_verify()</a></code> function for the <strong>hash verification</strong>.</p> <p><code>password_hash()</code> will create a random salt if one isn't provided, and this is generally the easiest and most secure approach.</p> <p>Next advance of the <code>password_hash()</code> function is that you can specify algorithm – by predefined constants <code>PASSWORD_DEFAULT</code> or <code>PASSWORD_BCRYPT</code>, salt (if omitted, a random salt will be generated) and cost - which denotes the algorithmic cost that should be used.</p> <p>The examples with format desription of output of the <code>password_hash()</code> function for the 'MySecretPassword' string:</p> <p><span class="c-red">$2y$</span><span class="c-blue">10$</span><span class="c-green">6wBPb3lkUcTINsEq3qkYZ.</span><span class="c-navy">Lj2dX7v4j0/N5g32fMW0wrmqRyhF7oK</span><br><span class="c-red">$2y$</span><span class="c-blue">10$</span><span class="c-green">mXIc4sRxAA7zEuBdaiPwXOBz.</span><span class="c-navy">PktMmORr1rR.G3FdcuQOTke3fIaq</span></p> <p><span class="c-red">Algorithm</span><br><span class="c-blue">Algorithm options (e.g. cost)</span><br><span class="c-green">Salt</span><br><span class=c-navy>Hashed password</span></p> <p>How to hash and how to verify passwords?</p><pre class="prettyprint"><br /><br />$password = 'MySecretPassword';<br />$hashedPassword = password_hash($password, PASSWORD_DEFAULT);<br />//$hashedPassword contains something like<br />// $2y$10$mXIc4sRxAA7zEuBdaiPwXOBz.PktMmORr1rR.G3FdcuQOTke3fIaq<br />//you can store it into database<br /><br />$hash = '$2y$10$mXIc4sRxAA7zEuBdaiPwXOBz.PktMmORr1rR.G3FdcuQOTke3fIaq';<br />$result = password_verify($password,$hash);<br />//$result contains TRUE if the password and hash match, or FALSE otherwise.<br /></pre><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-4455727365651361852015-03-14T07:42:00.000+01:002015-09-30T07:47:03.419+02:00How to get the client's IP address?You know that. You want (or need) to log some user activity and his/her IP address is very often one of the most requested values.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-bD9vWCawcH4/VgUodHV4TMI/AAAAAAAA8U8/D5eGu84NJBU/s1600/ipscheck.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="http://2.bp.blogspot.com/-bD9vWCawcH4/VgUodHV4TMI/AAAAAAAA8U8/D5eGu84NJBU/s320/ipscheck.jpg" width="320" /></a></div><br />The most reliable value you can get is in system variable <code>$_SERVER['REMOTE_ADDR']</code>.<br />However, the user can be behind a proxy server and it may have set the <code>$_SERVER['HTTP_X_FORWARDED_FOR']</code> variable. <strong>But be aware, this value is easily spoofed!</strong><br />So, if you are going to save the <code>$_SERVER['HTTP_X_FORWARDED_FOR']</code>, make sure you save the value from the <code>$_SERVER['REMOTE_ADDR']</code> variable too.<br />But sometimes you can find other server variables with the IP address (e.g. from shared internet etc.). Other possibilities are: 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED', HTTP_X_FORWARDED_FOR', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED'<br />Anyway you should validate the IP address every time. For the validation you can use a <code><a href="http://php.net/manual/en/function.filter-var.php" target="_blank" title="PHP manual: filter_var function">filter_var</a></code> php function.<br />How to get and validate user's IP? See an example of these functions: <br /> <pre class="prettyprint">function isValidIPAddress($ipAddress){<br /> if (filter_var($ipAddress, FILTER_VALIDATE_IP,<br /> FILTER_FLAG_IPV4 |<br /> FILTER_FLAG_NO_PRIV_RANGE |<br /> FILTER_FLAG_NO_RES_RANGE) === false)<br /> return false;<br /> return true;<br />}<br /><br />function getIPAddress() {<br /> $possibilities = array('HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR',<br /> 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP',<br /> 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED',<br /> 'REMOTE_ADDR');<br /> foreach ($possibilities as $key) {<br /> if (array_key_exists($key, $_SERVER) === true) {<br /> foreach (explode(',', $_SERVER[$key]) as $ipAddress) {<br /> $ipAddress = trim($ipAddress);<br /> if (isValidIPAddress($ipAddress)) {<br /> return $ipAddress;<br /> }<br /> }<br /> }<br /> }<br /> return isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : false;<br />}<br /></pre><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-27749082107641625052015-03-09T15:35:00.000+01:002015-09-29T16:54:53.789+02:00How to check European VAT number validityVIES (VAT Information Exchange System) is an electronic means of transmitting information relating to VAT-registration (= validity of VAT-numbers) of companies registered in EU. <div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-XvQvI71CcIg/VgEvt7AFwxI/AAAAAAAA8S4/mwQeUHx670w/s1600/eu_vat.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-XvQvI71CcIg/VgEvt7AFwxI/AAAAAAAA8S4/mwQeUHx670w/s400/eu_vat.jpg" /></a></div> Use PHP and SOAP to create easy verification of the VAT-number validation. <pre class="prettyprint linenums lang-php"><br /><br /><br />namespace libs\vies;<br /><br />use SoapClient;<br />use SoapFault;<br /><br /><br />class VatChecker {<br /><br /> /**<br /> *<br /> * @var boolean<br /> */<br /> private $valid;<br /><br /> /**<br /> *<br /> * @var string<br /> */<br /> private $vatId;<br /><br /> /**<br /> *<br /> * @var SoapClient<br /> */<br /> private $client;<br /><br /> public function __construct($vatId){<br /> $this->vatId = $vatId;<br /> $this->client = new SoapClient("http://ec.europa.eu/taxation_customs/vies/checkVatService.wsdl");<br /> $this->valid = $this->validate();<br /> }<br /><br /> private function validate(){<br /> $countryCode = substr($this->vatId, 0, 2);<br /> $vatNumber = substr($this->vatId, 2);<br /> $params = array('countryCode' => $countryCode, 'vatNumber' => $vatNumber);<br /> try{<br /> $result = $this->client->checkVat($params);<br /> return $result->valid;<br /> } catch(SoapFault $e) {<br /> echo 'Error: '.$e->faultstring;<br /> }<br /> }<br /><br /> /**<br /> * @return boolean<br /> */<br /> public function isValid()<br /> {<br /> return $this->valid;<br /> }<br />}<br /></pre> And here is an example of the use of this class: <pre class="prettyprint linenums lang-php"><br /><br /><br />use \libs\vies\VatChecker;<br /><br />$vatNumber = 'CZ27251748';<br /><br />/* @var $vatChecker \libs\vies\VatChecker */<br />$vatChecker = new VatChecker($vatNumber);<br />echo $vatChecker->isValid();<br /><br /></pre> That's all. Now you can easily check if your business partner from the European Union is a VAT payer.<div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-57558485996364324352014-12-30T13:10:00.000+01:002014-12-30T14:10:09.238+01:00PF 2015Rok s rokem se sešel. Uteklo to jako voda. Prožili jsme si toho všichni jistě mnoho... Nicméně, stejně mám pocit, že ten následující by měl být ještě lepší!<br /><br /><div style="text-align: center;">Hodně úspěchů v novém roce a posuňte se na svou další metu.</div><br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://hridel.com/pf/?s=blog" target="_blank"><img border="0" src="http://4.bp.blogspot.com/-bdfFsioR9wY/VKKVgvhUMmI/AAAAAAAAtW0/wDbBA61wHfM/s1600/pf_2015_web.jpg" height="266" width="400" /></a></div><br /><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-84083822238615417452014-09-19T19:49:00.000+02:002014-09-19T19:49:02.281+02:00Instagram Hashtags<div class="separator" style="clear: both; text-align: center;"></div><div style="text-align: center;"><i>Do you want to get more likes or followers on Instagram? Do you want to use hashtags but you have no idea which of them to use? You can use this copy/paste friendly list of hashtags. ;-)</i></div><div style="text-align: center;"><span style="font-size: x-small;"><i><br /></i></span></div><h3 style="text-align: left;">Popular (25)</h3><div>#implus_daily #bestoftheday #cool #f4f #follow #fun #igdaily #igers #igersoftheday #instadaily #instagramers #instagramhub #instagrammer #instamood #iphoneonly #jj #l4l #like #love #me #photooftheday #primeshots #statigram #tbt #webstagram</div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-AIpGkBF5kmU/VBxrnaIK82I/AAAAAAAAmx4/j_ZleRemJKw/s1600/instagramblog.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="http://1.bp.blogspot.com/-AIpGkBF5kmU/VBxrnaIK82I/AAAAAAAAmx4/j_ZleRemJKw/s1600/instagramblog.jpg" /></a></div><h3>Contest (24)</h3><div>#ig_snapshots #bestoftheday #contestday #contestgram #dailyphoto #dayshots #greatfeeds #ig_captures #ig_ms #igs #igsg #insta_shot #insta_sleep #instagallery #instagramhub #instahub #instamood #instapicturing #instarox_presents #instauno #jj #photowall #primeshots #rscpics</div><h3>Text (23)</h3><div>#tweegram #comment #inspiration #instatext #look #message #messages #note #quote #quotes #read #reading #text #textgram #textmessage #typography #versagram #word #words #write #writer #writers #writing</div><h3>Sunset and Sunrise (23)</h3><div>#sun #beauty #clouds #color #fabskyshots #ic_sky #igs #insta #instasunsets #instasunsetsred #irox_skyline #nature #orange #scenicsunset #sky #sky_collection #sunrise #sunset_lovee #sunsetlovers #sunsetsniper #sunshine #tramonto #twilightscapes</div><h3>Clouds (24)</h3><div>#clouds #beauty #blue #blueskys #cloud #cloudporn #cloudy #igcentric_nature #instagood #instahub #iskygram #iskyhub #light #nature #outside #picoftheday #sky #skylovers #skyporn #skysnappers #skystyles_gf #sun #sunshine #white</div><h3>Beach (24)</h3><div>#beach #beautiful #beauty #blue #cloud #coast #horizon #instabeach #instasummer #love #nature #ocean #sand #sea #seaside #sky #summer #sun #sunny #view #water #wave #waves #yellow</div><h3>Sea (26)</h3><div>#sea #beautiful #blue #cloud #clouds #est #gorgeous #horizon #ic_water #ignaturale #irox_water #nature #ocean #oceano #ola #onda #ripple #ripples #seascape #seascapes #seaside #sky #view #water #wave #waves</div><h3>Mountain (21)</h3><div>#mountain #beautiful #bestoftoday #clouds #hike #hiking landscape #ig_captures #instanature #instanaturelover #landscape_lovers #landscapes #mountains #mountainview #nature #nature_seekers #peak #scenery #sky #summit #view #wilderness</div><h3>Night time (23)</h3><div>#night #cool #dark #insta_sleep #instagood #lastnight #latenight #latenite #luna #lunar #moon #nightsky #nighttime #nite #noche #nuture #photo #sleep #star #stars #themoon #thestars #twlightscapes</div><h3>Fashion (23)</h3><div>#fashion #accessories #classy #clothes #clothing #dress #fashionable #fashiondiaries #girly #highheels #insta #instafashion #makeup #model #musthave #ootd #pants #shoes #skirt #style #swag #swagger #weheartit</div><div><br /></div><h3>Male fashion (22)</h3><div>#ashion #cool #denim #fashionstudy #hair #instacool #instafashion #jacket #jeans #look #model #outfitoftheday #pants #shirt #shoes #sneakers #streetwear #style #swag #swagg #swagger #tshirt</div><h3>Dog (24)</h3><div>#dog #adorable #animal #animals #cute #cutie #doggy #dogoftheday #dogs #dogsofinstagram #dogstagram #ilovemydog #instagramdogs #life #nature #pet #pets #petsagram #petstagram #picpets #precious #pup #puppies #puppy</div><h3>Cat (24)</h3><div>#cat #animal #catlover #catlovers #cats #catsofinstagram #catstagram #cutie #ilovemycat #ilovemypet #instacat #instapets #kitten #kittens #kitty #life #meow #nature #pet #pets #petsagram #petstagram #picpets #sweet</div><h3>Animal (19)</h3><div>#animal #animali #animals #animalsofinstagram #awesome_shots #dayshots #fauna #igs #instalife #instanature #instanaturelover #natgeohub #natura #naturaleza #nature #nature_shooters #vida #wild #wildlife</div><h3>Food (25)</h3><div>#food #beautiful #breakfast #delicious #dessert #dinner #eat #eating #favorite #foodgasm #foodpics #foodporn #getinmybelly #homemade #hot #instafood #love #lunch #munchies #sharefood #stuffed #sweet #yum #yummy #yumyum</div><h3>Drink (21)</h3><div>#drink #bar #bestfriend #cocktails #delicious #drinks #food #foodforfoodies #foodgasm #foodporn #foods #friends #getinmybelly #instafood #liquor #mmm #pub #soyummy #thirsty #yum #yumyum</div><h3>Follow (18)</h3><div>#follow #alwaysfollowback #f4f #followall #followbackalways #followbackteam #follower #followers #followforfollow #followher #followme #followme #ifollow #me #pleasefollow #pleasefollowme #teamfollowback #likeback</div><h3>Shoutout (22)</h3><div>#shoutout #clubshoutout #f4f #follow #followers #followher #followhim #igaddict #ilovemyfollowers #like #like4like #love #pleasefollow #pleasefollowme #s4s #shout #shout_out #shoutmeout #shoutouts #shouts #so #thankyou</div><h3>Black & White (24)</h3><div>#blackandwhite #bandw #black #blancoynegro #bnw #bw #bw_lover #bw_society #bwbeauty #bwoftheday #bwstyles_gf #byn #ic_bw #igersbnw #irox_bw #mono #monoart #monochrome #nb #nero #noir #noiretblanc #noirlovers #white</div><h3>Sports (24)</h3><div>#sport #active #best #crowd #excercise #fit #fitness #fitspo #fun #gameday #gym #health #healthy #instasport #justdoit #loveit #score #somuchfun #sports #train #training #win #winner #workout<br /><h3>Surfing (23)</h3>#surfing #awesome #beach #billabong #board #fun #instagood #rush #sand #sea #sky #sport #sports #surf #surfboard #surfer #swell #tide #water #watersport #watersports #wave #waves</div><div><h3>Soccer (24)</h3>#soccer #ball #club #crowd #fan #fans #football #footballgame #footballplayer #fun #game #goal #grass #green #kick #kicking #net #pitch #play #player #playing #score #sport #sports<br /><h3>Basketball (23)</h3>#basketball #ball #basket #basketballneverstops #bball #board #bounce #court #dunk #hoop #jump #jumping #nba #net #orange #player #score #slamdunk #sport #sports #tall #team #throw<br /><h3>Cars (20)</h3>#car #amazing_cars #auto #autotrend #badass #cargram #cargramm #carporn #cars #carsofinstagram #carsovereverything #carstagram #carswithoutlimits #exotic_cars #fastcar #instaauto #instacars #motor #motors #thecarlovers<br /><h3>Art <i>general </i>(24)</h3>#art #arte #artist #artwork #color #colour ers #creative #dibujo #drawing #drawings #graphic #graphicdesign #illustration #ink #markers #myart #paint #painting #paintings #pencil #sketch #sketchaday #watercolor #watercolour<br /><h3>Street art (24)</h3>#streetphotography #aerosol #animation #art #arte #artist #buildinggraffiti #color #colour #graff #graffitiart #grafiti #handmade #instagraffiti #rue #spray #spraypaint #street #streetart #streetartistry #urban #urbano #wall #wallart<br /><h3>Architecture (18)</h3>#architecture #architecturelovers #architectureporn #architectures #architettura #arquitectura #beautiful #building #buildingporn #buildings #city #ic_architecture #instadaily #primeshots #town #udog_public #urban #urbano<br /><h3>Children (23)</h3>#children #barn #beautiful #crianças #cute #family #gorgeous #happy #cheeky #child #childrenigers #childrenof_instagram #childrenphoto #childrens #kid #kids #life #myfamily #mykid #mykids #mylife #niñas #smile<br /><h3>Baby (23)</h3>#children #babies #babiesofinstagram #baby #babys #beautiful #bebé #crianças #cute #family #gorgeous #happy #cheeky #child #childrenphoto #childrens #kid #kids #myfamily #mykid #mykids #mylife #niñas<br /><h3>Happy (23)</h3>#happy #enjoy #excited #feelgood #feelgood #feelgoodphoto #feliz #fun #funny #funtimes #goodmood #happier #happyhappy #instagood #instahappy #joy #laugh #laughing #love #lovelife #smile #smiling #sohappy<br /><br /><i>So never more thinking about hashtags on instagram.</i></div><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-1248432090059992547.post-6583994177597107492014-09-17T17:10:00.000+02:002014-09-17T17:10:27.995+02:00Indická restaurace TandoorVe chvíli, kdy nám přestěhovali Fakultu elektrotechniky a informatiky z univerzitního kampusu na Náměstí čs. legií, začali jsme hledat nový způsob stravování. Kam na obědy?<br /><br />Vyzkoušeli jsme řadu restaurací v centru Pardubic. Postupem času jsme si oblíbili indickou <i>Tandoor</i> restauraci na 17. listopadu. Stal se z toho zvyk. Tandoor jsme navštěvovali téměř každé pondělí, minimálně jednou týdně jsme tam zašli vždy. Většinou však častěji. Já osobně jsem tam byl jen podle <i>Foursquare</i> minimálně 77 krát.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-a31ED94xHFQ/VBmjnBNBC0I/AAAAAAAAmto/nOhUm2OIN8Q/s1600/IMG_20140515_135012.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://1.bp.blogspot.com/-a31ED94xHFQ/VBmjnBNBC0I/AAAAAAAAmto/nOhUm2OIN8Q/s1600/IMG_20140515_135012.jpg" height="480" width="640" /></a></div><br /><br />Denní menu s výbornou kuřecí polévkou a kousky masa v ostré omáčce s indickými plackami. Super! To člověku zvedlo náladu i ve dnech, kdy všechno stálo takříkajíc "za houby".<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-0ADbBqGCjfI/VBmirrQS1sI/AAAAAAAAmtc/IkN54da16Hs/s1600/IMG_20140407_195223.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-0ADbBqGCjfI/VBmirrQS1sI/AAAAAAAAmtc/IkN54da16Hs/s1600/IMG_20140407_195223.jpg" height="480" width="640" /></a></div><br /><br />Nabízela-li se nějaká zvláštní příležitost jako narozeniny, začátek semestru, konec zkouškového... Byl to důvod zajít na kuře Vindaloo. Vždy jsme přišli do prostředí, kde nás personál znal, přestože nám rozuměl každé páté slovo, mile se usmíval a hlavně přesně věděl, co nám chutná bylo o nás postaráno.<br /><br /><div class="separator" style="clear: both; text-align: center;"><br /><a href="http://4.bp.blogspot.com/-vtk8F9xZ4uI/VBmjnKplk3I/AAAAAAAAmto/TdTLpcithdw/s1600/IMG_20140515_134143.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://4.bp.blogspot.com/-vtk8F9xZ4uI/VBmjnKplk3I/AAAAAAAAmto/TdTLpcithdw/s1600/IMG_20140515_134143.jpg" height="480" width="640" /></a></div><br /><br />Jenže. Kluci se evidentně museli vrátit do Nepálu a personál restaurace se obměnil, včetně kuchaře. A prostě to už není ono. Ani kartou už platit nelze. Takže po dnešku velké zklamání a otázka kam jít, když ne do Tandoor? Mexiko? Čína? Ganga?<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-cGm-EIam-Rk/VBmjnI4xh0I/AAAAAAAAmto/6KNndZIS6Kc/s1600/1396956520219.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://3.bp.blogspot.com/-cGm-EIam-Rk/VBmjnI4xh0I/AAAAAAAAmto/6KNndZIS6Kc/s1600/1396956520219.jpg" height="480" width="640" /></a></div><br /><div class="blogger-post-footer">--
www.hridel.com | blog.hridel.com | follow me on Twitter @h0nza</div>Unknownnoreply@blogger.com0