The file permissions for the ssh keys and the .ssh folder should be set as follows:
File | Permission |
---|---|
.ssh directory | 700 |
.pub (public key file) | 644 |
id_rsa (Private key file) | 600 |
File | Permission |
---|---|
.ssh directory | 700 |
.pub (public key file) | 644 |
id_rsa (Private key file) | 600 |
sudo apt-get install software-properties-common curl
sudo apt-get install git
sudo apt-get install vim
sudo apt-get install mariadb-server mariadb-client
sudo apt-get install apache2 apache2-doc apache2-utils libapache2-mod-php php7.4 php7.4-common php7.4-gd php7.4-mysql php7.4-imap phpmyadmin php7.4-cli php7.4-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear mcrypt imagemagick php7.4-curl php7.4-intl php7.4-pspell php7.4-sqlite3 php7.4-tidy php7.4-xmlrpc php7.4-xsl memcached php-memcache php-imagick php7.4-zip php7.4-mbstring php-soap php7.4-soap
Select the following as answers:
Web server to reconfigure automatically: <– apache2
Configure database for phpmyadmin with dbconfig-common? <– Yes
MySQL application password for phpmyadmin: <– Press enter
sudo mysql
CREATE USER 'dbuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'dbuser'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
Check whether the db user is logging fine. Open browser and go to http://localhost/phpmyadmin/. Login using the credentials dbuser
and password
cd ~
sudo apt-get install golang-go
mkdir gocode
echo "export GOPATH=$HOME/gocode" >> ~/.profile
source ~/.profile
go get github.com/mailhog/MailHog
go get github.com/mailhog/mhsendmail
sudo cp ~/gocode/bin/MailHog /usr/local/bin/mailhog
sudo cp ~/gocode/bin/mhsendmail /usr/local/bin/mhsendmail
Letβs connect PHP with MailHog at php.ini. Find the sendmail_path setting and set it in the following way:
sendmail_path = /usr/local/bin/mhsendmail
The php.ini for both CLI and Apache should be configured. It can be found in the folder /etc/php/7.4/apache2 and /etc/php/7.4/cli. The location may change based on the distro.
/etc/systemd/system/mailhog.service
.
sudo vim /etc/systemd/system/mailhog.service
[Unit]
Description=MailHog service
[Service]
ExecStart=/usr/local/bin/mailhog \
-api-bind-addr 127.0.0.1:8025 \
-ui-bind-addr 127.0.0.1:8025 \
-smtp-bind-addr 127.0.0.1:1025
[Install]
WantedBy=multi-user.target
sudo systemctl start mailhog
. Verify it is working by accessing the URL – http://127.0.0.1:8025sudo systemctl enable mailhog
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
#To switch composer 1
sudo composer self-update --1
cd ~
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
#install Node v10
Close the terminal and reopen it again. Run the command
nvm install v10.24.0
Install the GPG key:
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
Ensure apt is set up to work with https sources:
sudo apt-get install apt-transport-https
Set the channel:
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
Update apt sources and install Sublime Text :
sudo apt-get update
sudo apt-get install sublime-text
Run the following command to enable mod-rewrite
sudo a2enmod rewrite
Then change AllowOverride None
to AllowOverride All
for directory /var/www/
in the file /etc/apache2/apache2.conf
Download visual studio code from https://code.visualstudio.com/Download and download the .deb file. Install the deb file.
If your system is 64 bit, enable 32 bit architecture
sudo dpkg --add-architecture i386
Now run the commands
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
sudo apt update
sudo apt install --install-recommends winehq-stable
sudo add-apt-repository ppa:serge-rider/dbeaver-ce
sudo apt-get update
sudo apt-get install dbeaver-ce
Run the following commands
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
Then run the following command
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER
Install the needed Docker composer version v1.27 is the latest stable version as of Sep 10, 2020.
Run
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
If you ever encounter ugly Tamil fonts in Elementary OS or other Ubuntu based distros, the following method will help in fixing it.
Create a file called 90-tamil.conf in the folder ~/.config/fontconfig/conf.d. If the folder doesnt exists, create it.
In the file add the following code and save the file. The following code uses Noto Serif Tamil as Serif font and Noto Sans Tamil as sans font. Change the tamil font as your liking.
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<match target="pattern">
<test name="lang" compare="contains">
<string>ta</string>
</test>
<test qual="any" name="family">
<string>sans-serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Sans Tamil</string>
</edit>
</match>
<match target="pattern">
<test name="lang" compare="contains">
<string>ta</string>
</test>
<test qual="any" name="family">
<string>serif</string>
</test>
<edit name="family" mode="prepend" binding="strong">
<string>Noto Serif Tamil</string>
</edit>
</match>
</fontconfig>
After adding it, run the following in Terminal to see the system is picking the font properly.
LANG=ta_IN fc-match
For, me its shows some thing like this:
After adding these, the fonts in the entire OS should look like this(not only in the browser).
After seeing one of my friend Shrini using ORG mode in Emacs, I have been tempted to try it. I have heard of ORG mode before, but not get any inspiration to use it. Shrini, gave me a short intro to ORG mode, while we were pair programming for an opensource project. So, I decided to give it a try.
I always get night mare, while thinking of emacs. My previous experience with emacs was not good. So, I decided to try it with Spacemacs. Everytime I try a new IDE or Editor, my usual habit is to check the Tamil language support in it. The Tamil unicode font rendering with emacs is broken. But it can be easily fixed, by specifying the font in the dotfile of spacemacs.
(set-fontset-font "fontset-default" 'tamil "Noto Sans Tamil")
After closing and opening the emacs, tamil fonts seems to rendered properly.
Next I tried to type in Tamil using Ibus. I can’t get it working. After some research, I found that the python-ibus and ibus-el libraries needs to be installed. I scratched my head as the usual apt get thing failed. I had to manually download the files and install. (Download Links are provided at the end of the post). Then I need to add the lines in the Spacemacs dotfile.
(require 'ibus)
(add-hook 'after-init-hook 'ibus-mode-on)
After restarting the Ibus Daemon, it seems to be working ok. I am not getting a predictive behaviour with tamil input over spacemacs. Also I feel it is little heavier.
After little searching the internet, I found there is a another emacs distribution called Doom. I just backed up the ~/.emacs.d folder and start playing around with Doom. Doom Emacs has a very light learning curve, for some one familiar with Vim. For tamil font rendering, the unicode package needs to be enabled in the init.el. After making the changes I have to run the sync command for doom ~/.emacs.d/bin/doom sync. Tamil font then seems to be rendered fine in Doom.
As I had already installed the python-ibus ans ibus-el libraries, the tamil input seems to be working fine in Doom. I am using elementary os, it feels so good after setting up the tamil input.
Download Links:
PyGTK2 – http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
Python IBus – http://archive.ubuntu.com/ubuntu/pool/main/i/ibus/python-ibus_1.5.5-1ubuntu3_all.deb
ibus-el – http://archive.ubuntu.com/ubuntu/pool/universe/i/ibus-el/ibus-el_0.3.2-2_all.deb
When the announcement came itself, I was so exciting about this event. My participation to the opensource community has been just started a year ago, even though I am stepping in to the eighth year of my IT career. Still I have little hesitations in meeting people around and communicate with them.
This event actually opened me a up a little. On the first day of the event I had missed the Soumya Deb’s first session.
The next session was about the Open Stack. The session cleared up some long time misunderstood perspectives of cloud computing. My self has enjoyed this session verymuch. I came to know from this event only that the OpenStack guys are meeting in Chennai regularly.
The ANTLR session, I was completely blank during this session, without knowing the applications of it. I had tried very much to follow this session.
Then we had a nice lunch with my favorite Paruppu Podi at an Andhra mess near by π
Ravishankar had opened the session after the lunch. Very informative, for people who would like to go as freelancer. I am meeting Ravi for the first time, and the wikipedia team is the one who are very enthu in there. Ravi and myself has exchanged couple of mails we both know our names. Ravi is still fooling people with his way back profile photo. π Also met Yuvi Panda the Terror for the first time.
Soumya’s Firefox OS session was good and I liked the way he addressed the questions.
The second day was started so amazingly by the wiki team. The CLICK session, the guys did the wonderful presentation, followed by Bala’s talks on wikipedia and how that works.
Then starts the hackathon, this is the second hackathon I am attending and finishing it with out doing any thing useful. The Plivo guys were roaming and don’t know where they had gone after sometime. I had explored Plivo api’s and able to make a outgoing call to SIP endpoint while at the hackathon. I have a doubt whether Plivo guys attended the hackathon had used to their API. Really they had cool api.
But I feel I should have done some thing other than that useful there. And also feeling a bit guilty now for not interacted with all of the guys out there.
More events like this needs to be organized. I really got good inspirations and stickers and badges. π
Thanks for Shrini for a click of me π
I had recently came upon a situation to work out string reverse in javascript, where it can be done with various techniques. I have tried some methods. The first one is using a standard for loop. The same can be achieved through a while loop also. Getting the length of the string and from there we can iterate down to the first character while collecting those in another variable and finally we get the string reversed.
The second one is using the split and join technique. We can split the string and make it an array and reverse it and again joining the array we end up with the reversed string.
str.split("").reverse().join();
Another thing I had tried is using,
Array.prototype.reverse.call(str,str);
And would you think this will work? The answer is no … Because javascript strings are immutable ie., they can’t be changed. Actually the array reverse method, reverse the array itself and so it will try to reverse the string itself and fails saying that the string is read only.
But ,
Array.prototype.slice.apply(str,[0,1]);
will work returning an array but the splice method fails as it will try to modify the object itself.
While trying the string reverse,for the first time I personally understand what is meant by immutable. Before this, it was just a word to me. π