Light Sidebar
What is GOPATH and GOROOT in GoLang
- May 04, 2020
- by
- Adnan Sattar
Go tools expect a certain layout of the source code. GOROOT and GOPATH are environment variables that define this layout. These two are the most essential PATHs in GoLang. The go tool uses it to do the task in a better way. Now, we are going to take a look at what each one represents.
• GOPATH in Go Programming
• GOROOT in GoLang
• Modifying GOPATH and GOROOT
GOPATH is a variable that defines the root of your workspace. By default, the workspace directory is a directory that is...
How To STOP WordPress wp-login.php Brute Force Attack
- April 11, 2020
- by
- Adnan Sattar
There been several large scale WordPress wp-login.php brute force attacks, coming from a large number of compromised IP addresses spread across the world since April 2013.
A large botnet of around 90,000 compromised servers has been attempting to break into WordPress websites by continually trying to guess the username and password to get into the WordPress admin dashboard.
Global WordPress brute force attack General WordPress brute force protectionWhile we do HIGHLY recommend implementing as many security solutions as possible for WordPress. The following guides would be a great first step in protecting yourself and...
How to Protect WordPress Pages, Posts With Password
- April 11, 2020
- by
- Adnan Sattar
There may come a time when you want to password protect a WordPress page, post or product. Maybe you want only your family and friends to read a blog post or allow certain clients to access a product for purchase. No matter your reason, luckily, WordPress has you covered.
This article will show you how to password protect WordPress pages, posts or products, as well as give plugin suggestions for additional content protection needs.
Using Default WordPress Functionality Plugins for Additional Password Protection Using Default WordPress FunctionalityFor the simple functionality of password protecting a...
WordPress Speed & Performance Optimization
- March 18, 2020
- by
- Adnan Sattar
Website speed is an actual Google ranking factor. That’s why you need to emphasize site speed and performance. Unfortunately, there’s no easy solution to slow web speeds. There is no magic plugin, script, or tactic that will instantly speed up your website. Optimizing a WordPress site’s performance can be a daunting task, especially for larger sites.
Here are a few common WordPress speed optimization myths that I would like to dispel.
Benchmarking Tools -Test Your Speed Choose a Better Web Hosting Provider Use Content Delivery Network (CDN) Minimizing Plugins Caching Reduce Image Sizes Enable GZIP Compression Cleanup WordPress Database Keep External Scripts Minimum Disable...Android Architecture MVC, MVP and MVVM Design Patterns – A Detail Tour
- September 25, 2019
- by
- Adnan Sattar
There are many different architectural approaches available these days like MVP, FLUX, MVI, MVVM etc. One can use any approach as long as code is maintainable. MVC, MVP, and MVVM are three popular design patterns in software development. All these design patterns by and large help in developing applications that are loosely combined, easy to test and maintain. All discussion about the pattern...
How to Fix 404 Page Not Found Error – Codeigniter in subdirectory on Nginx
- September 05, 2019
- by
- Adnan Sattar
This article covers How to Fix 404 Page Not Found Error in Codeigniter and run Codeigniter application from subdirectory on Nginx.
For example, we may have an application running at example.org but need a second application running at example.org/blog.
This feels like it should be simple, but it turns out to be more complex and fraught with confusing Nginx configurations!
Here’s the working configuration to have two Codeigniter apps working, where one application exists in a subdirectory of another.
server { listen 80 default_server; listen [::]:80 default_server; root...FirebaseInstanceIdService is deprecated – Android
- July 04, 2019
- by
- Adnan Sattar
Recently Google pushed got many updates in dependencies of Firebase along with JetPack aka AndroidX. In the new version of firebase messaging the firebaseInstanceIdService is deprecated. Now we don’t need to use INSTANCE_ID_EVENT, just extend MyInstanceIDListenerService with FirebaseMessagingService. That means no need to use FirebaseInstanceIdService service to get FCM token.
We can safely remove FirebaseInstanceIdService service. Now only need to @Override onNewToken() get Token in “FirebaseMessagingService“.
@Override public void onNewToken(String s) { super.onNewToken(s); Log.d("FCM TOKEN "+s); } @Override public void onMessageReceived(RemoteMessage remoteMessage) { }onNewToken will give you the token and onMessageReceived will received the message. Now no need to call onMessageReceived in another service. After all this, we also need to...
How To Avoid ANR & Memory Leaks In Android
- June 14, 2019
- by
- Adnan Sattar
Building an Android app is easy, but making a super-high-quality, memory-efficient Android app is not. Many times we see ANR dialog while using android apps, a developers need to take many things into consideration to deliver state of the art solution, with purpose to make sure that apps are robust and do not crush.
A common cause of ANR is memory leaks. In most cases a steady increase in in memory usage happen until the app cannot allocate more resources. In Java this often results in an...
Storing Secret Keys in Android
- May 25, 2019
- by
- Adnan Sattar
Let’s say that you are building an Android app, that connects to a third-party service. Almost any API worth implementing uses an API key as part of basic authentication and security. Often your app will have secret credentials or API keys that you need to have in your app to function but you’d rather not have easily extracted from your app.
If you are using dynamically generated secrets, the most effective way to store this information is to use the Android Keystore API. You should not store them...