Categories
Linux

How to list all URL's in Redirect chain

This simple utility is extremely useful in detecting bad redirects and loops, specially in big websites. You can also include it in scripts. wget http://gmail.com 2>&1 | grep Location: The response, in this case, is: Location: https://www.google.com/gmail/ [following] Location: https://mail.google.com/mail/ [following] Location: https://accounts.google.com/ServiceLogin?service=mail&passive=true&rm=false&continue=https://mail.google.com/mail/&ss=1&scc=1&ltmpl=default&ltmplcache=2&emr=1&osid=1# [following]

Categories
Tech

Pros and Cons of Hosting your own Nameservers

Benefits of hosting your Nameservers Ease of changing hosting providers: Having your own nameservers make it easy when you are changing your hosting providers for two reasons: Zero downtime in switching Minimal change on Domain Register (change Nameserver and Hostname reords only) Other nameserver changes can be done easily with your own nameserver, even scripted […]

Categories
Linux

OVH: How to add Additional IP Addresses (IP Alias) on Ubuntu 16.04 / 18.04

Adding additional IP addresses in OVH is rather unconventional and the guide they point to in their mail is non-existent. The process, fortunately, is simple: ssh to the server as root cd /etc/systemd/network/ vi *-default.network Add the new IP address after the original IPv4 Address DHCP=no Address=Main_IP/24 Address=Failover_IP/32 Save and close the file Reboot the […]

Categories
Tech

Chrome: How to view YouTube at 3x Speed

When viewing a YouTube video you may want to quickly skip through introductory section or boring/repetitive parts. The following solution will allow you to toggle between high speed and normal viewing. 3x speed-up is not offered by YouTube. With little practice you can understand even at that high speed, you need to be a bit […]

Categories
Linux Tutorials

LXD: How to easily apt update and upgrade all running LXD containers

It is easy to create large number of LXD / LXC containers as it consumes minimal resources. Coupled with btrfs, it consumes minimal hard-disk space also due to de-duplication built-in within btrfs file system. Soon you would find yourself spending a significant amount of time updating (sudo apt update) and upgrading (sudo apt -y upgrade) […]

Categories
Java Tech

Grails: Validating User Domain class

Grails provides support for validating fields. Here is a typical User class with field validation. It ensure that email address & url is of proper format, login is unique and password is not openly displayed. package com.taragana class User { String login String password String email String url static constraints = { login unique: true […]

Categories
Java

Ubuntu: How to install Oracle JDK 8 with apt get

Oracle JDK can be easily installed in Ubuntu using apt. Using apt simplifies the job of updating the JDK from time to time. To install Oracle JDK 8 sudo apt update sudo add-apt-repository ppa:webupd8team/java sudo apt update sudo apt install oracle-java8-installer  

Categories
Tech

Script to kill all GradleDaemon processes – gkill

GradleDaemon sometimes redundantly runs in the background and Grails gives erroneous responses. The simplest solution is to kill all the errant GradleDaemon processes and run the app again. Below is a simple script which will run all the errant GradleDaemon processes. The same can be used for killing any processes like say Firefox. Just substitute […]

Categories
Featured

Jeff Bezos: 3 questions to ask interviewers after interview for effective hiring

20 years ago to ensure that Amazon would retain high standards as it grew, Jeff Bezos outlined a simple, three-question test for hiring new employees in his 1998 letter to shareholders, a year after the online bookseller went public. “It would be impossible to produce results in an environment as dynamic as the Internet without […]

Categories
Tech

Bash: How to trim leading, following spaces from text

Many Linux/Unix commands are shown formatted like ps -ef for instance. As such it becomes difficult to process them subsequently in the pipeline, like for instance passing it to xargs kill for killing the filtered errant processes. The command below, when part of a bash / sh pipeline will remove the leading and following spaces […]