Friday, September 8, 2017

Bash-Snippets

For those who live in Terminal all day Bash-Snippets provides the following 12 useful tools (BASH scripts):
  1. currency – Currency converter.
  2. stocks – Provides certain Stock details.
  3. weather – Displays weather details of your place.
  4. crypt – Encrypt and decrypt files.
  5. movies – Search and display a movie details.
  6. taste – Recommendation engine that provides three similar items like the supplied item (The items can be books, music, artists, movies, and games etc).
  7. short – URL Shortner
  8. geo – Provides the details of wan, lan, router, dns, mac, and ip.
  9. cheat – Provides cheat-sheets for various Linux commands.
  10. ytview – Watch YouTube from Terminal.
  11. cloudup – A tool to backup your GitHub repositories to bitbucket.
  12. qrify – Turns the given string into a qr code.
You can run the scripts directly from commandline.

Wednesday, August 23, 2017

Web crawler

   Do you know what are they?  They are Hardware or Software?
   Well, a Web crawler, sometimes called a spider, is an Internet bot  that
systematically browses the World Wide Web, typically for the purpose
of Web indexing (web spidering).
Web search engines and some other sites use Web crawling or spidering
software to update their web content or indices of others sites' web
content. Web crawlers can copy all the pages they visit for later
processing by a search engine which indexes the downloaded pages so
the users can search much more efficiently.
   The web is like an ever-growing library with billions of books and
no central filing system. Software known as web crawlers is used to
discover publicly available webpages. Crawlers look at webpages and
follow links on those pages, much like you would if you were browsing
content on the web. They go from link to link and bring data about those
webpages back to servers.
  When the spider looked at an HTML page, it took note of two things:
  • The words within the page
  • Where the words were found
  Words occurring in the title, subtitles, meta tags and other positions
of relative importance were noted for special consideration during a
subsequent user search. The spider is built to index every significant
word on a page, leaving out the articles "a," "an" and "the."

Tuesday, August 22, 2017

Comparing popularity and pay scale of programming languages in 2017

   Some programming languages are more popular than others depending on how the developers use them to solve problems and build software. On the other hand, programming languages have different pay scale.
   The link between high pay and increased popularity is nowhere more apparent than with Go and Scala, topping the pay chart at $110,000:
  1. Go -- $110,000
  2. Scala -- $110,000
  3. Objective-C -- $109,000
  4. CoffeeScript -- $105,000
  5. Perl -- $105,000
  6. C++ -- $100,890
  7. R- $100,000
  8. Swift -- $100,000
  9. TypeScript -- $100,000
  10. Python -- $99,000

Top Paying Languages in the U.S.

Top Paying Languages in the U.S. (source: Stack Overflow)




Worldwide, the rankings are:
  1. Clojure -- $72,000
  2. Rust -- $65,714
  3. Elixir -- $65,000
  4. F# -- $64,516
  5. Go -- $64,516
  6. Perl -- $63,068
  7. Groovy -- $61,809
  8. Ruby -- $60,000
  9. Scala -- $60,000
  10. R -- $57,125

The thing is that some of the fastest growing technologies are 
also the highest paying languages.
The choice of  a programming language belongs to developers.
 

Sunday, August 13, 2017

iPhone 7

 
      The iPhone 7's overall design is similar to the iPhone 6S, but introduces new color options, water and dust resistance, a new capacitive, static home button, and removes the 3.5 mm headphone jack. The device's internal hardware also received upgrades, including a heterogeneous quad-core system-on-chip with improved system and graphics performance, and upgraded 12 megapixel rear-facing cameras with optical image stabilization on all models and an additional telephoto lens on the iPhone 7 Plus model to provide enhanced zoom capabilities.
       
      The Good Improved front and rear cameras -- now with optical image stabilization -- deliver much improved photos, especially in low light. Water resistant. A faster processor, plus slightly better battery life. More onboard storage than last year's models for the same price.
      The Bad No headphone jack (but there's a dongle and compatible wired headphones in the box). Click-free home button takes getting used to. Only the larger 7 Plus has the cool dual camera. Shiny jet-black version scratches easily.
      The Bottom Line The iPhone 7's notable camera, battery and water resistance improvements are worthwhile upgrades to a familiar phone design. But ask yourself if you really need an upgrade... and if the Plus might be a better choice.

Monday, July 31, 2017

20 Linux commands for sysadmins


      Basic Linux commands for troubleshooting, debug problems
      and resolve issues with your application.

  1.  curl
  2.  python -m json.tool / jq
  3.  ls
  4.  tail
  5.  cat
  6.  grep
  7.  ps
  8.  env
  9.  top
  10.  netstat
  11.  ip address
  12.  lsof
  13.  df
  14.  du
  15.  id
  16.  chmod
  17.  dig / nslookup
  18.  iptables
  19.  sestatus
  20.  history

Monday, June 12, 2017

Find Installed Repositories From Commandline In Linux

use this command to find the installed repositories in your DEB based system like Debian, Ubuntu, Linux Mint etc.
sudo grep -Erh ^deb /etc/apt/sources.list*

Run the following command to view the list of installed packages in DEB based systems
sudo apt-cache policy

Sunday, June 4, 2017

Install YouTube-DL on Linux (a tool to download videos from dailymotion, youtube etc)

We can easily install YouTube-DL on all the Linux distribution such as Debian, RHEL, Ubuntu, LinuxMint, CentOS, Fedora, suse, openSUSE, ArchLinux, Manjaro, Mageia, etc..,. by using below method.

[Download through curl]
# curl https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl

or

[Download through wget]
# wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

[Set Executable permission]
# chmod a+rx /usr/local/bin/youtube-dl

[Upgrade to latest version]
# youtube-dl -U
How to use youtube-dl to download videos

[Syntax]
# youtube-dl [Video URL]

[example]
# youtube-dl https://www.youtube.com/watch?v=SjiwQxbol7I

[Sample video downloading from YouTube]
# youtube-dl https://www.youtube.com/watch?v=SjiwQxbol7I
[youtube] SjiwQxbol7I: Downloading webpage
[youtube] SjiwQxbol7I: Extracting video information
[download] Destination: Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f136.mp4
[download] 100% of 16.10MiB in 00:13
[download] Destination: Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f140.m4a
[download] 100% of 2.55MiB in 00:02
[ffmpeg] Merging formats into "Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.mp4"
Deleting original file Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f136.mp4 (pass -k to keep)
Deleting original file Linux _ Unix - Find Out DNS IP Addresss Settings Tutorial-SjiwQxbol7I.f140.m4a (pass -k to keep)

Monday, May 29, 2017

use of command "mount" on Linux

To mount the root partition as read/write, become root user and type in a terminal the command:

mount -o remount,rw /

Friday, March 17, 2017

A guide to the Bash Terminal for Beginners

Below is a list of most common commands:

NAVIGATION

  • ls - list directory contents
  • pwd - print name of current/working directory
  • cd - change working directory
  • pushd/popd - put the working directory on a stack
  • file - determine the file type
  • locate - find files by name
  • updatedb - update database for locate
  • which - locate a command
  • history - display bash command history

GETTING HELP

  • whatis - display the on-line manual descriptions
  • apropos - search the manual page names and descriptions
  • man - an interface to the on-line reference manuals

WORKING WITH FILES

  • mkdir - create a directory/make directories
  • touch - change file timestamps/create empty files
  • cp - copy files and directories
  • mv - move (rename) files
  • rm - remove files or directories
  • rmdir - remove empty directories

TEXT FILES

  • cat - concatenate files and print on the standard output
  • more/less - file perusal filter for CRT viewing
  • nano - command line text editor

USERS

  • sudo - execute a command as the superuser
  • su - change user ID or become another user
  • users - print the usernames of users currently logged in
  • id - print real and effective user and group IDs

CHANGING FILE PERMISSIONS

  • chmod - change permissions of a file

KILLING PROGRAMS AND LOGGING OUT

  • Ctrl+C - kill a running command
  • killall - kill processes by name
  • exit - log out of bash

How to check if a package is installed on Linux

On RPM based system
on RPM based systems like Red Hat, Cent OS etc, we can use rpm query command like below :
rpm -qa | grep telnet
or 
rpm -q telnet

If system is configured with YUM then it can list all installed packages for you and you can grep out your desired package from it.
yum list installed | grep telnet

On APT based systems 
on APT based systems like Debian, Ubuntu etc, dpkg command can be used to verify if package is installed
dpkg -l | grep telnet

Friday, January 27, 2017

How to check the weather from Linux Terminal


Open a terminal and type the command:


curl http://wttr.in/your_city



example :   curl http://wttr.in/karditsa

How to reboot or shutdown from Linux Terminal


Open a terminal (Ctrl + Alt + T or super key + T) and type the following commands:


shutdown -h now     (to shutdown right now)


shutdown -r now      (to reboot)