- Unable to establish a connection to adb
After opening an Android project in Studio running under Ubuntu 15.04 Linux, the following error was displayed,
Unable to establish a connection to adb. This usually happens if you have an incompatible version of adb running already. Try reopening Studio after killing any existing adb daemon.
- Invalid Gradle JDK configuration found
After starting Android studio, running on Ubuntu 15.04 Linux, the following error was reported:
Invalid Gradle JDK configuration found. Open Gradle Settings. Platform SDK does not point to valid SDK (/usr/lib/jvm/jdk1.8.0_40).
The problem was solved by clicking in Android Studio, File -> Project Structure -> SDK Location. Under JDK location, enter the ...
- Using Git
Git commands for common source code management use cases are listed.
2.0 Install Git
On an Ubuntu Linux system, Git can be installed with the command,
$ sudo apt-get install git
3.0 Set Identity
Before using Git, the user's identity (name, email) has to be set
$ git config --global user.email ...
- Importing an Android Studio project in Git
Importing an Android Studio project into Git is easy. First create the project or import an existing project in Android Studio. In this case a placeholder project HelloWorld was created. The directory listing of the project root directory looks like this.
$ ls -lsa total 60 4 drwxrwxr-x ...
- Bash idioms
bash idioms are tiny scripts, mostly one-liners, that accomplish a lot and can be used as building blocks in bigger scripts.
1.0 Find most frequent words
Suppose we have a bunch of text files and we wish to find the most frequently used words ...
- Posting images on Twitter
It is fun posting images on Twitter but we often see that only a part of the image is visible in the stream of tweets. One has to click on the visible part to see the full picture. How to ensure that the full image becomes visible in the tweet stream? The answer lies in ...
- Getting WordPress to work with Varnish 4.0
With Varnish 4.0, the VCL has changed. So an update from Varnish 3 .0 to Varnish 4.0 requires a change in the VCL file, /etc/varnish/default.vcl. As a part of Varnish cache server configuration for a WordPress based site, using nginx web server, the following VCL is ...
- Drupal: Web page stuck in maintenance mode
After a Drupal based site came out of the maintenance mode, one particular web page was found to be stuck in the maintenance mode. It showed the message that the site was under maintenance, while the other web pages were displayed correctly.
The problem was resolved by clearing the cache. In the administrative menu, the
- nginx 502 Bad Gateway Error
A routine software update on the server running nginx was done. After that the website stopped opening in the browser window and
502 Bad Gatewayerror along with the nginx version number was displayed. Looking in the log file showed an entry like,
2014/06/26 11:09:53 2539#0: *15 connect() to ...
- How to redirect non-www URLs to www in Varnish
If a website's canonical URL has www, it is desirable, as a good SEO practice, to redirect the non-www URLs to www. That is, if the canonical URL is www.example.com, example.com should be redirected to www.example.com. How to do this when Varnish is listening on port 80 as a reverse HTTP proxy is given below ...
- Trigonometric calculations with bc
bc, the basic calculator under Linux and UNIX environments, provides commands for doing arbitrary precision mathematical calculations. The syntax for basic arithmetic functions is intuitive. Here, we look at the commands for doing trigonometric calculations.
The global scale variable gives the number of digits after the decimal point. By ...
- Unity launcher stays at the left, does not auto-hide
Problem: After login in the Ubuntu Linux system, the Unity launcher stays at the left edge of the display. It does not auto-hide.
Solution: Click on the Settings icon in the top right corner of the display. You will find tabs like Wi-Fi, Bluetooth, Background, etc. in the left column. ...
- Repairing Drupal site blocks manually in database
The text format of a block was
PHP codeand it contained PHP code with an error. This broke the website resulting in blank screen web pages, the
white screen of death(WSOD). The error was rectified by manually updating the MySQL database. The following steps were taken.
From the command line, connect with the website ...
- Not able to login
Problem: Not able to login to Ubuntu Linux system because the disk partition containing the HOME directory has become full.
- Press CTRL ALT F1 together to switch to text mode and try to login.
- After login, check the free space in disk partitions by give ...
- Wireless is disabled by hardware switch
While configuring the wired network on Ubuntu 12.04 Linux laptop, the wireless network connection broke down suddenly. On clicking the networking icon on the top panel, no wireless networks were displayed on the NetworkManager applet and a message Wireless is disabled by hardware switch was reported. The laptop wireless switch was in ...