rxjs Subject / ReplaySubject and Observable.publishReplay().refCount();

February 5, 2017 Javascript No comments

If you know what PubSub means then you can achieve nearly the same behavior with the Subject(s) features of the RxJS. More details here, here and here.

(more…)

disable web security in chrome (cors issue)

December 24, 2016 Documentation No comments

More details here and here

shortly… for windows, the shortcut should have these flags/parameters:


"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --user-data-dir

big-o

December 11, 2016 Books, C/C++, Documentation, Javascript, PHP No comments

https://rob-bell.net/2009/06/a-beginners-guide-to-big-o-notation/

air tickets sites

September 25, 2016 Travel No comments

https://www.skyscanner.net/

http://www.fluege.de/

https://www.amadeus.net

understanding ECMAScript 6

September 24, 2016 Books, Documentation, Javascript No comments

ES6 more details : https://leanpub.com/understandinges6/read

install C/C++ compilers on linux (deb)

September 23, 2016 C/C++, Linux No comments

install C/C++ compilers:

sudo apt-get update
sudo apt-get install build-essential

install mysql library for C/C++:
sudo apt-get install libmysqlclient-dev

(more…)

git: pull and overwrite all your local changes

September 23, 2016 Git No comments

git fetch --all
git reset --hard origin/master

instead of master branch you can use your custom branch name:
git reset --hard origin/your_branch

source: http://stackoverflow.com/questions/1125968/how-to-force-git-pull-to-overwrite-local-files

kill all the processes of a program

September 23, 2016 Linux, Servers config/admin No comments

kill $(ps aux | grep 'chrome' | awk '{print $2}')
where chrome – is the application you want to kill

mount a remote folder on local machine via SSH

September 23, 2016 Linux, Servers config/admin No comments

1. install sshfs:
sudo apt-get install sshfs
More details here: https://www.digitalocean.com/community/tutorials/how-to-use-sshfs-to-mount-remote-file-systems-over-ssh

2. mount the  ssh location:
sshfs -o nonempty user@ip:/var/www/test /home/testuser/testdirectory

to unmount it:
fusermount -u /home/testuser/testdirectory

where:
user – your SSH user
ip – IP of your remote machine
/var/www/test – path of the directory on your remote server which you want to mount on your local machine
/home/testuser/testdirectory – path of mounted remote directory on your local machine

ubuntu ssh disable root login using password

September 22, 2016 Linux, Servers config/admin No comments

1. make sure .ssh/ folder has the write permissions 700:
chmod 700 .ssh
2. the file .ssh/authorized_keys should have the write permissions 600:
chmod 600 .ssh/authorized_keys
3. in the file /etc/ssh/sshd_config the line PermitRootLogin should be like this:
PermitRootLogin without-password
more details you can find here: https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-14-04