Posts

Configure self signed certificate on a locally hosted website

 1. create a private key cd /etc/ssl/aureusapps sudo openssl genrsa -des3 -out aureusapps.key 2048 2. Create a self signed certificate to use as root CA sudo openssl req -x509 -new -key aureusapps.key -sha256 -days 1825 -out aureusapps.pem -x509: Specifies that the certificate is to be self-signed rather than signed by a Certificate Authority (CA). This option is used for generating a root or self-signed certificate. -new : generate new certificate request -noenc : if a private key is created it will not be encrypted -key : provides the private key for signing a new certificate or certificate request -sha256 : Specifies SHA-256 as the hashing algorithm 3. Install root certificate  sudo trust anchor aureusapps.pem 4. Creating CA-Signed Certificates for Your Dev Sites     1. Create private key for site           sudo openssl genrsa -out memeslab.aureusapps.dev.key 2048     2. Create certificate signing request CSR           sudo openssl req -new -key memeslab.aureusapps.dev.key -out meme

Optimize Gnome Desktop Environment

 1. Remove Gnome software - Gnome software has a memory leak issue. sudo pacman -Rscn gnome-software 2. Disable indexing services (If you don't use it) systemctl --user mask tracker-extract-3.service tracker-miner-fs-3.service tracker-miner-rss-3.service tracker-writeback-3.service tracker-xdg-portal-3.service tracker-miner-fs-control-3.service 3. disable evolution services (Personal information management such as email. calendar and address book) systemctl --user mask evolution-user-prompter.service systemctl --user mask evolution-source-registry.service systemctl --user mask evolution-calendar-factory.service systemctl --user mask evolution-addressbook-factory.service 4. Remove gnome online accounts sudo rm /usr/share/applications/gnome-online-accounts-panel.desktop 5. Remove gsd wacom sudo rm /usr/share/applications/gnome-wacom-panel.desktop get it back by installing gnome control center

Android: Set AutoCompleteTextView popup background corner radius

 This is a most cumbersome problem. If MaterialAutoCompleteTextView, or  AutoCompleteTextView  is used, it is hard to style it with theme attributes, because corner radius is hard coded https://github.com/material-components/material-components-android/blob/784f901135c654e938a4b0a71252b6887a276244/lib/java/com/google/android/material/textfield/DropdownMenuEndIconDelegate.java#L212 . It seems the only solution that is working is setting it manually. According to material specs, the corner radius of AutoCompleteTextView popup should be set to 4dp.   https://material.io/components/menus#exposed-dropdown-menu

Maven - Create Executable Jar

Image
In this article we focus on how executable jar file is created in maven project. Usually we want to create java package and run it without specifying classpath of the main class that we want to execute. For this purpose we want to specify application entry point in the Jar manifest as follows. Manifest-Version: 1.0 Created-By: 1.7.0_06 (Oracle Corporation) Main-Class: MyPackage.MyClass So that we can execute our jar file in the terminal as follows. java -jar MyJar.jar Configuration We have to configure our pom.xml file and set packaging property as jar. <groupId>com.udara</groupId> <artifactId>tcp-client</artifactId> <version>1.0-SNAPSHOT</version> <packaging>jar</packaging> In maven we can configure jar manifest using plugins. Here we talk about few plugins that we can use

Apache Tomcat - Brief Introduction

Image
What is Apache Tomcat? Apache Tomcat is an open source web sever and servlet container developed by apache software foundation. It implements Java servlet and Java Server Pages (JSP) specificartions from sun microsystems. What is Servlet? Servlet is is an app that runs on a server. Installing (1) Download and Install a Java SE Runtime Environment (JRE) (1.1) Download a Java SE Runtime Environment (JRE), release version 8 or later, from http://www.oracle.com/technetwork/java/javase/downloads/index.html (1.2) Install the JRE according to the instructions included with the release. You may also use a full Java Development Kit (JDK) rather than just a JRE. (2) Download and Install Apache Tomc

Flutter - Create Image Container with Round Corners and Splash Effect

Image
Introduction In this article I'm going to explain you about how image with round corners and splash effect is created using Flutter widgets. Before doing some coding, let's see how images are loaded in Flutter and what the splash effect means. Images in flutter In flutter apps, we can load images from network, assets (App resources) or from the file system. Loading images from network is very easy task in flutter using Image.network constructor. Image.network( 'https://raw.githubusercontent.com/flutter/website/master/src/_includes/code/layout/lakes/images/lake.jpg', ) If you want to load images from network and cache it for offline usage, you can use CachedNetworkImage widget. You need to add cached_network_image dependency to use it. Click here to see installation instructions. CachedNetworkImage( placeholder: CircularProgressIndicator(), imageUrl: '

Flutter - Using Fixed Width Widgets Inside ListView

Image
ListView is used to display scrollable list of widgets. Children inside ListView takes whole width of ListView by default. So elements inside ListView expands to take whole width. There are couple of ways we can set fixed width to elements inside ListView. Using Align - Set alignment property of the Align widget to Alignment.center , Alignment.centerLeft , Alignment.centerRight etc. ListView( children: [ Align( alignment: Alignment.center, child: SizedBox( width: 160.0, height: 160.0, child: Image.asset('images/default_avatar.jpg'), ), ), ], ); Using Container - In here Align widget is internally used inside Container ListView( children: [ Container(

Popular posts from this blog

Flutter - Create Image Container with Round Corners and Splash Effect

AVR Analog Comparator

JAudioTagger - ID3 tagger library