Last day, I registered for #Hacktoberfest coding competition organised by #Digital Ocean and #GitHub . And start contribution in project which is listed under #Hactoberfest projects. Let’s do fun in #Hactoberfest. Happy Hacking 🙂
Finally, I install gnupg-2.0.30 after struggle
From last one day, I was trying to install gnupg-2.0.30 for file
encryption and decryption. But I was unable to install it after
downloading. Error (No target found) was coming whenever I execute
“make” after “./configure”. But “make” was there in gnupg-2.0.30’s
folder. I searched alot and also saw youtube videos, But nothing found
regarding installation of gnupg. I was following same procedure as in
README, But I didn’t know where I was wrong. So, I leave it.
Today, I tried again. I read README again, some packages name was
defined in README before installation. So, I thought, I should install
all, after that I will be see error. After package installation, I
execute ./configure again. Now error was different :-). It was giving
only 2 errors, regarding installation of 2 libraries (zlib and
libpth-dev) and previous errors was solved. So, I install that 2
libraries. After that I run “./configure”again, it was succesfull. Now
“make” was ready to run. Finally I installed gnupg-2.0.30 after “make”and
“make install” commands :-).
Push code via SSH keys
I was facing problem i.e I was unable to push code on GitHub from home network. Whenever I tried to push or clone code, it was giving below error:
error: RPC failed; result=7, HTTP code = 0
fatal: The remote end hung up unexpectedly
This problem was coming with https protocol. Then I tried to solve problem with another method. I used SSH to fix above error.
How I solved above error?
I used SSH keys instead of https. In this method, you will generate your public key and attach that key with your GitHub account.
Step1: Install OpenSSH:
sudo apt install openssh-server
Step 2: clone repository with ssh:
But it will give below error because you did not generate and connect public key.
Step 3: Generating public/private rsa key pair:
$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Step 4: List the files and directories in your ssh folder:
$ ls -al ~/.ssh
Step 5: Check that you are connecting to the correct server:
To make sure you are connecting to the right domain, you can enter the following command:
Note the IP address (the numbers within the [] brackets). The connection should be made to a GitHub IP address, on port 22.
Step 6: Add your SSH key to the ssh-agent:
$ ssh-add
Step 7: Verify that you have a private key generated and loaded into SSH. If you’re using OpenSSH 6.7 or older:
$ eval "$(ssh-agent -s)"
$ ssh-add -l
Step 8: Add your SSH key to your account:
$ sudo apt-get install xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub
Then add the copied key to GitHub. Go to Settings->SSH keys(Personal settings side bar)->Add SSH key->fill out form(key is on your clipboard, just use ctrl+v)->Add key.
Done 🙂
Now you can clone and push code via SSH keys :-). See
Enjoy 🙂
Hackathon
Today, We did Hackathon. It was Hackathon for Ebook project. In our team, there were 6 members. Sir, discuss with us requirements of a project and its present error from user point of view. Then we begin Hackathon. Firstly, one member created the repository on Gitlab and for scheduling of task, we use Trello. As first task, we reorganized the chapters, we just remove hard code using JSON and shell script. Secondly, we make Ebook screen compatible, add minor code to differentiate with mobile screen and Desktop. Third was to make its browser compatible (pending). The fourth was to resolve an issue of div overlapping. Which is in progress. We enjoyed Hackathon :-).
Root Android phone to create more space for Apps
Sometimes, our Android phone don’t have enough space for Apps. And we are unable to install our favourite Apps due to short space. Some people do reset their phone to get space But reset can release space of User Applications not System Application. In other words, reset can’t release space occupied by builtin Apps (System Application).
So, to release space of unnecessary builtin Apps (System Application), you should Root your Android phone. Now what is Root? Root is “su” power on your device. You can work as developer in your device If you have knowledge.
Root Android phone using following steps:
Download and install Kingo ROOT in Android phone.
Open Kingo ROOT to Root your phone. But my phone is already rooted.
After root, new App “SuperUser” will be installed. Just open it. It will give you “su“ power on phone. You can delete Built-in Apps to create space.
Step 1
Step 2
Step 3: You can delete unwanted Apps or Games that are unecessary.
Now restart your phone.
Enjoy 🙂
July 21, 2016
Today, tried to complete task “Deadlock”. Edit limits.conf file, and define limit of no.of files that @manpreet user can open simultaneously. But it is not giving desired results. So, asked Question from community.
July 15, 2016 (Makefile)
Today, Amrit gave a presentation on Make. It was a very good presentation. Anyone can make makefile who listened to his presentation.
Before start, he presents difference between script and make. When the script is used, all files are compiled during compilation, even only single file is changed. But when we make makefile, it will compile only that s changed. And make is beneficial only if there is a large project.
After that he shows us demo of a makefile. Basically, to create makefile We must know the steps of compilation to get final result. We must know commands that will be used to get the final output. Then follow same steps in a makefile. But must create object file that is needed to get final output. And there is one option “-I “, when this option used compiler search current directory to get header file (.h file created by us). If this optoin “I” is not used then the compiler will search standard library to get your header file. And .PHONY is most important in a makefile. Using it, compiler recognised that there are commands under the variable assigned to .PHONY. For example: If I define .PHONY=CLEAN and write some bash commands under CLEAN then compiler will run that commands. Without assigning CLEAN to .PHONY, a compiler will consider CLEAN as a file.
ngrok in Linux
Today, I install and use ngrok. ngrok is similar to Teamviewer which is used in windows and Linux to connect computers from any remote location and does not require to be on the same network. I thought that ssh can access computer only on the same network. So, I used Teamviewer instead of ssh.
Later on, Amrit told me about ngrok and he said that we can connect computers from any remote location using ngrok. So, I install it 🙂
ngrok is easy to use. Follow below steps:
- Just download its zip file from : https://ngrok.com/download.
- Then unzip it. It will create binary file ngrok. Then run this binary file using ./ngrok.
- Now login on : https://ngrok.com/download and Install your authtoken using :
./ngrok authtoken 2CAB7**************************
- Now read its README file and apply command for your purpose.
- for example: ./ngrok tcp 22 (if you want to provide your computer as server on terminal). just give its link to client computer.
- ./ngrok http 80 (if someone wants to access your computer from a browser).
Read math symbols from CSV
Today, I came to know about the new thing. Whenever I wanted (or tried) to print math symbol (\leq, \sigma) through .CSV. It was giving an error. Because we can’t read LaTeX symbols directly from CSV. So, to read this, we will use \(math\) like this \(\leq\) in CSV to read any symbol.
Secondly, I did not know, how to define NULL values in the table using pgfplotstable? I was doing wrong. “I defined ‘nan’ for this, But it did not work”. If we want to define NULL values then leave it blank and separated by commas.
JSON with LaTeX
Today, I used JSON data in LaTeX. To do this, Firstly, I load one file JSON.lua in .tex file. When I did not download and load JSON.lua file in tex, it was giving an error during compilation. And when we are using JSON data inside .tex file then we use lualatex command to run latex code instead of pdflatex.