SpeechSynthesis example

The code has been tested and works

install mailhog on Ubuntu

Install Go programming language and Configure home directory for Go language

cd ~
curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz
tar xvf go1.6.linux-amd64.tar.gz
sudo chown -R root:root ./go
sudo mv go /usr/local
export GOPATH=$HOME/work
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
mkdir ./work

#Install MailHog Main GitHub repo
Download link for MailHog

The code has been tested and works

How to add SSH key to remote server

Step One—Create the RSA Key Pair
The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):

ssh-keygen -t rsa

Step Two—Copy the Public Key
Once the key pair is generated, it's time to place the public key on the virtual server that we want to use.

You can copy the public key into the new machine's authorized_keys file with the ssh-copy-id command. Make sure to replace the example username and IP address below.

The code has been tested and works

Restart Mysql crontab script

#!/bin/bash
if [[ ! "$(/usr/sbin/service mysql status)" =~ "start/running" ]]
then
/usr/sbin/service mysql start
fi

chmod +x /path/to/script

Edit root crontab file using:
sudo crontab -e
And add the following line to the file:
*/1 * * * * /path/to/script

The code has been tested and works

Install docker in Debian Jessie

#!/bin/bash

# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit

sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y

sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

The code has been tested and works

Add terminal autocomplete

Installation

Step 1: Install bash-completion

$ sudo apt-get install bash-completion
And some times it works if we re-installed it by the follwing command:

$ sudo apt-get install --reinstall bash-completion
Step 2: Enable bash-completion in your .bashrc file

Open your gedit ~/.bashrc and if these content doesn't exist there, add them at the end of it and save it.

The code has been tested and works

Страницы

Подписка на moscovie.com RSS