JavaScript export/import ways

There’s 3 way to do it, all have a difference.

Named Export/Import (example)

//File where are You export some variable
export const name ='some string value';

//File where are You Import
import {name} from "..."

Mandatory :

In Export Module File after word “export” should be name of variable; (without name of variable you will get error, because it’s Named Export – so there should be name!

In Import file after word “import” should be curly braces it´s point out that You want to import exactly that variable name from source ‘…’

‘…’ (three dots) should be the path to file, it’s used just for example, in Your case it will be the path to directory where Your file has been saved for exp. “./Folder/fileName”

Continue reading

Symbolic link in linux

For example if You need to create symbolic link for your virtual host config in Nginx – web server just write this:

ln -s /etc/nginx/sites-available/example.conf /etc/nginx/sites-enabled/

Where /etc/nginx/sites-available/example.conf is path to your original file and /etc/nginx/sites-enabled/  – path to directory where do you want to place Symbolic link, without filename!

Setup Redmine on Ubuntu with nginx webserver.

If You have already configured Nginx server on Ubuntu  with php back-end, but You need to setup Redmine bug-tracker, you need Setup another environment and one of the is “Phusion Passenger” which better to setup in current situation in Stand-Alone mode.

Config for Virtual Hosts in /etc/nginx/sites-available: 
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;

server {
listen 80;

# Tells Nginx to serve static assets from this directory.
root /webapps/foo/public;

location / {
# Tells Nginx to forward all requests for
# to the Passenger Standalone instance listening on port 4000.

# These are "magic" Nginx configuration options that
# should be present in order to make the reverse proxying
# work properly. Also contains some options that make WebSockets
# work properly with Passenger Standalone. Please learn more at
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_buffering off;

I recommend create own file for example (passenger) and put it in directory
/etc/nginx/sites-available with symbolic-link
to /etc/nginx/sites-enabled by this command:

ln -s /etc/nginx/sites-available/passenger /etc/nginx/sites-enabled/passenger

How to lunch Phusion Passenger web server?

First of all You should go to Your application folder
where placed root files of Your application in current situation
 it's Redmine root directory,
after start process in background by this command:

# Start foo on port 4000
$ cd /webapps/foo
$ passenger start –daemonize –address –port 4000

# Start bar on port 4010
$ cd /webapps/bar
$ passenger start –daemonize –address –port 4010

Link: Original article

CSS design for Price


CSS FOR Price:

color: #000;
position: relative;
font-weight: 600;
font-family: Arroyo,Arial,Verdana;
font-size: 73px;
line-height: 100px;
font-style: italic;
text-shadow: 2px 2px #fff, -2px 2px #fff, -2px -2px #fff, 2px -2px #fff, 0 5px 5px grey;


CSS FOR Price, decimal

font-size: 43px;
position: relative;
top: -24px;
line-height: 95px;

Escape Rooms in Tallinn

If you’ve never tried one of the escape rooms in Tallinn, you’re missing out.

I know what you’re thinking. Why should you try something new – possibly something you’ve never heard of?

Maybe you already have a list of activities you enjoy with your family or your mates. Or maybe the idea of an “escape game” or “exit room” sounds too weird.

Well, my friend – it’s time to disrupt your routine.

Continue reading

Linux commands

How to Activate Mod_Rewrites:
sudo a2enmod rewrite

How to enable new-composed virtual-host config
(site-name.conf - filename which Your composed in "site-available" folder in directory "/etc/apache2"):

a2ensite site-name.conf

Install Apache2 and PHP 5.6 for UBUNTU


Install Apache – server:

apt-get install apache2

Add  repository for php packages:

add-apt-repository ppa:ondrej/php

Install php version 5.6:

apt-get install php5.6

apt-get install php5-cli

Very important module without it  I can’t work with *.php files, they just download.
apt-get install libapache2-mod-php5


Also don’t forget install additional php modules for work with mysql, images, curl…. etc.




All available list here :

MySQL : command line

Create new user for MySQL DB from command line with name 'username' and password 'password':
CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';

Create database from linux (Ubuntu, CentOS) with name 'mydb' and charset 'utf8' and collate 'utf8_general_ci'
CREATE DATABASE `mydb` CHARACTER SET utf8 COLLATE utf8_general_ci; 

Give rights for all tables in 'mydb' for user 'username' with password 'password'

GRANT ALL ON `mydb`.* TO `username`@localhost IDENTIFIED BY 'password';

Update rights: