Month: October 2018

setup a nodejs server on digital ocean

Following are steps to setup a nodejs server on digital ocean Create a new droplet Once you have droplet, you need to setup a ssh key (it is an optional step) so that you can access your server from terminal Install mongodb if your nodejs server works with mongodb (Reference: https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-16-04) Install nodejs by following this …


ssh to digital ocean droplet

If you have already setup for a droplet in Digital Ocean with an ssh key. Then, you can follow steps below to access to your droplet using terminal: TienTham:.ssh tientham$ ssh-add do_id_rsa Identity added: do_id_rsa (do_id_rsa) TienTham:.ssh tientham$ ssh root@<ip_address_of_your_server> You are required to change your password immediately (root enforced) Welcome to Ubuntu 18.04.1 LTS …


c# – parsing string remove white spaces

1- Use split function This string: string s = “hello hi 123 test abc” -> var parts = s.Split(‘ ‘); You will get parts[0]=”hello” parts[1]=”hi” parts[2]=”123″ parts[3]=”test” parts[4]=”abc” 2- Use split function with option This string: string s = “hello   hi  123 test       abc” -> var parts = s.Split(new char[] {‘ …


c#

How to find provisioning profile in MAC OS

Once you have provisioning profile installed in your MAC. If you want to find out where it is, just click into Finder In the menu top bar, click “Go” -> “Go to folder” as in the picture   Then: Click “Go”, you will see the folder: “Provisioning Profiles”. Your files are stored inside this folder. …


it

Extract java library .jar or .aar using command line

Sometimes, you want to extract .jar or .aar file to see the classes or to add into your project. Following are steps to do 1- With .jar Open terminal console jar xf <your_jar>.jar You then will see the extract files / folders created 2- With .aar .aar is a compressed file. You can do as …