Posts

Showing posts from October, 2020

What is the cause of slow website loading and the solutions for it

Image
Top 10 Reasons Your Site is Loading Slow (And steps you can take to fix it!) Ever wonder why your website is slow to load? Here are 10 of the most common reasons for slow website loading times, and also tips on how to fix it. Don’t be slow! You might have heard that age-old adage which says “slow and steady wins the race”, but when it comes to the performance of your website, that certainly is a recipe for failure. Here are our Top 10 Reasons for Slow Loading Websites. 1. Unoptimized Images A large volume of unoptimized images is usually the most common reason behind website slowness. High-resolution images can consume lots of bandwidth while loading. Uploading larger sized images and then scaling them down can unnecessarily increase the size of your web page – causing your website to load slowly. The image format is another important factor to consider. For example, JPEG images are much smaller in size compared to other image formats like PNG or GIF. Quite naturally, your web page wil

Over sitting for long hours is not good for health.

  Sitting all day at work? Get up every 30 minutes to cut your risk of death Research has warned time and time again that “ sitting disease ” is real. But if you’re sitting all day at work, you should get up every 30 minutes and move to cut your risk of death, a new study is advising. American scientists out of Columbia University say that adults who sit for one or two hours at a time without moving have a higher risk of early death than their peers who are sitting for just as long but are still getting up for even short bouts of movement. “We tend to think of sedentary behaviour as just the sheer volume of how much we sit around each day. But previous studies have suggested that sedentary patterns – whether an individual accrues sedentary time through several short stretches or fewer longer stretches of time – may have an impact on health,” Dr. Keith Diaz, the study’s lead author, said in a statement. “So if you have a job or lifestyle where you have to sit for prolonged periods of ti

Importance of quitting social media

Image
13 Things That Could Happen When You Quit Social Media Social media is glorious fun and a colossal time-suck, not to mention pretty darn addictive. Here's what happens when you pull the plug, even for a short hiatus. Why you might want to consider quitting social media Social media is riddled with contradictions. It can be fun but also infuriating.  It can make you feel less alone, but also trigger feelings of isolation and inadequacy. And can we talk about the trolls?  If you’re spending a lot of time on social media , or on your phone in general, it can be hard to imagine life without it. However, there are plenty of reasons to consider taking a break from endless scrolling. If you’re ready to take the plunge, here are some things to expect when you take a break from social media. Dragana Gordic/Shutterstock You’ll get more work done, and you’ll do it faster When you don’t have to worry about your devices buzzing left and right, you could find your productivity le

How to change PostgreSQL database encoding to UTF8

  The default encoding of the template databases in PostgreSQL is set to SQL_ASCII. If this encoding has not been changed, then the new databases will be created using this template and hence will have the same encoding SQL_ASCII. Overall this should not be a big problem unless Unicode data is required to be saved in the database. In that case you will receive an error such as : Unicode escape values cannot be used for code point values above 007F when the server encoding is not UTF8. In this blog, we will go through all steps in order to change the encoding of the database to UTF8. First of all one needs to know that encoding of already created database cannot be altered. Hence we need to drop and create a new one. Checking the current server encoding. postgres@yourserver : ~ $ psql psql ( 10.7 ( Ubuntu 10.7 - 0ubuntu0 .18 . 04.1 ) ) Type "help" for help . postgres = # SHOW SERVER_ENCODING; server_encoding - - - - - - - - - - - - - - - - - SQL_ASCII ( 1 row ) po

Why most servers run on linux

  There are many reasons that most servers on the Internet run Linux. Software.  Web servers, caches, FTP servers, web applications, DNS severs, and on and on. They are available for Linux and Unix first and in a wide variety. History.  Windows was designed for the single user desktop, whereas Unix was designed as a multiuser networked machine early on, even before Windows existed. Secondly, Unix was commercial, and the BSDs were tied up in court when Linux rose to power. Price.  Linux systems are free. A company can grab a Linux variant and have an industrial strength server for free. Sure, they can get support and such if they pay - but the fact is many companies let support go. Marketshare.  Back in the 80s there was a slogan:  No one has ever been fired for buying IBM.  That sentiment now extends to Linux. The lawsuit that embroiled Unix did a huge amount of damage to Unix in the marketplace and Linux filled the void. Security.  Linux was designed as a multiuser environment from th

Setting up or scheduling a task or cron job in Django

Image
  Hey folks! I’ve got something interested to share which I recently learned. You already know it, don’t you? Yes, from the title. Well then, let’s get start with it. When working on a project, you might require to setup a cron job. Those who don’t know what a cron job is, “cron” is a utility that schedule scripts or commands to be run automatically at specified time and date or intervals and these tasks or jobs are what we call as “cron job”. Every *nix system has a default cron utility. Crons are identified by  crontab (cron-tab file), a configuration file that specifies the commands to be run periodically. However, to set up a cron job in Django, we can make use of a third party module which I found really useful,  django-crontab How to write a cron job? Before we go any further, we must understand the syntax in which a cron job is defined. Yes, a cron job has a specified format which can be understand by the cron utility. The main part of a cron is its timing syntax which defines t