Monday, 30 March 2020

How to Run Android Apps on Ubuntu

How to Run Android Apps on Ubuntu


Running android application APK's on you Linux(Ubuntu) or PC computer requires the use of an android emulator.

The top 10 best emulators that can be used are:
  1. Genymotion
  2. Andro VM
  3. Anbox
  4. Android-x86
  5. Shashlik
  6. ARChon
  7. Android SDK
  8. Andy OS
  9. Jar of Beans
  10. Bliss
Reviews on the emulators can be found here.

I used Anbox emulator and  the steps on how to install it on Ubuntu can be found here

Download your Android app or a Game from here (APKMirror)


Related Resources

Monday, 9 March 2020

How To: Wordpress and PHP App Cache Clearing Solution


Wordpress & PHP Cache-Control Solution


How to Handle Memory Cache-Control in Wordpress and PHP Applications (Cache Clearing)



Usefulness of Caching

Using caching on your website is possibly the most effective way to decrease loading times of your web pages and bring content to your visitors quickly.

Wordpress Cache Plugins

  • WP Super Cache
  • W3 Total Cache
  • WP-Optimize (Clean, Compress, Cache)

Other performances improvement plugin

  • a3 Lazy Load
  • Accelerated Mobile Pages
In general, you can cache a variety of aspects of your WordPress website:
  • Menu Cache: Cache your WordPress navigation menus.
  • NIX Gravatar Cache: Easily cache your Gravatar images.
  • Cache External Scripts: Plugin to cache your external scripts.
  • Widget Output Cache: Cache all widget content.

Problems with Caching

As a developer of PHP or Wordpress, while in the process of developing your application or content, you will be faced with memory caching problems.

The automatic memory caching configurations will prevent your PHP or WP application form showing the most current content outputs that should be produced by changes in your script codebase.

Clearing your Plugin Cache

Not being able to view the recent post or page changes or being unable to view changes made using the customizer, are some of the most common cache issues users can experience when making use of a cache plugin.

Most cache issues can be solved by clearing the cache. That can usually be done via the provided options page of the cache plugin you're currently using on your Wordpress website.

The Solution to Solving Memory Cache Problem in Wordpress and PHP Applications

There are multiple approaches to solving the application memory caching drawbacks.

I will try to arrange according to hierarchy, so you know which ones come first.
  • Clearing Browser Cache and Refresh Application
  • If using WP Caching Plugins, Use them to Purge Cache and then Disable the Plugins temporarily 
WP Super Cache Plugin - goto settings via Settings => WP Super Cache => Contents in your WordPress dashboard and click the Delete Cache button.
  • Find Cache Files on your Server or WP App directories.
  • Backup and delete all files inside the cache directory
public_html/wp-content/cache/
  • Caching Issues while Developing / Coding
If you're modifying theme code or making design changes on a live site whilst
a cache is active, it's different.
You very likely won't be able to see your changes until you clear the cache of your plugin or browser
  • Disabling or Enabling Caching in wp-config.php
Simply add the code : define('WP_CACHE', true);
  • Disabling Plugins when Facing Issues
Use the plugin menu on WP Admin Dashboard if you have access to WP Admin. 
We can deactivate all plugins by renaming your plugins folder (/public_html/wp-content/plugins )
  • Inserting Cache-Control Code to App Script File (PHP or HTML )
HTML File To use cache-control in HTML, you use the meta tag,
<meta http-equiv="Cache-control" content="public"> . Read More

PHP File
To use cache-control in PHP, you have to Set the PHP Headers
<?php
//set headers to NOT cache a page
header("Cache-Control: no-cache, must-revalidate"); //HTTP 1.1
header("Pragma: no-cache"); //HTTP 1.0
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
//or, if you DO want a file to cache, use:
header("Cache-Control: max-age=2592000"); //30days (60sec * 60min * 24hours * 30days)
?>
  • Editing the .htaccess file with Cache-Control Code (Final Solution)
However, beware of the time you leave the contents in the cache.
Where: 604800 = 7 days. (60s * 60 * 24 * 7 = 604800)

Add this to your root .htaccess file and save the file in the specific web application root folder (Note: This can be used to reset any header).

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

This goes in your root .htaccess file but if you have access to httpd.conf that is better.
This code uses the FilesMatch directive and the Header directive to add Cache-Control Headers to certain files.

Related Resources

- I have made some changes on my WordPress site but they are not showing
when I try to access it.
- This issue is most often caused by the cache functionality of WordPress.
- To see your changes, you should clear your WordPress cache.
- The cache is located in a folder called /wp-content/cache/.
- You should delete the content of the cache/ folder either by FTP or via File Manager in cPanel, clear the cache of your web browser and reload your website.

Potential Related Research Questions

  • Online way to check if a website has a cache problem?
  • php file cache-control


Wednesday, 12 February 2020

Ubuntu 18 - My laptop shuts down when I close the lid even though it's set to hibernate



Tested Solutions

My laptop shuts down when I close the lid even though it's set to hibernate

Edit logind.conf file

/etc/systemd$ sudo nano logind.conf

Insert the following changes (remove #'s )

#HandleLidSwitch=suspend
#HandleLidSwitchDocked=suspend

Restart logind.service unit

$ systemctl restart systemd-logind.service (help man)

Note: If changes are not working yet, use this command to suspend the computer system.

$ systemctl suspend


Useful Knowledge

  • systemd  - (systemctl manual) is a suite of basic building blocks for a Linux system.
  • Power management with systemd (read more)
  •  
  • ACPId - (is a flexible and extensible daemon for delivering ACPI events, When an event occurs, it executes programs to handle the event.)
sudo apt install acpi
acpi -i   (To read out battery information)

ACPI (Advanced Configuration and Power Interface) is an open industry specification co-developed by Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. 
ACPI modules are kernel modules for different ACPI parts.


 

 

Monday, 11 November 2019

Thursday, 8 August 2019

Fighting for What is Right or Neccesary, Nigeria

Fighting for What is Right or Neccesary, Nigeria

Be Resolute 

Its a personal journey, stop looking for validation.

Its a personal race, its a responsiblity, the gift and the curse.

Sometimes it gets tiring when trying to create a better world for yourself and the people around you.

At the beginning most people can not see the vision, most can not think independently and outside the box. They can't understand the vision, why do you keep looking for validation from people.

Let your guide be your imagination, your visions and well research knowledge, that will build wisdom for the necessary action.

Never give up on your visions for a greater tomorow.

If tomorow may exist, it will be what you make of it.

Tomorrow depends on you and your great vision.




Wednesday, 7 August 2019

The Revolution Manifesto Nigeria


The Revolution as it will be, Nigeria

Until that day when Nigerians realizes, it's a class war and not tribal.

It's Rich against Poor, Rulers against Subjects, Oppressor against the Oppressed,
they will never be a revolution that will spark progress in this country, Nigeria.

Every time a new Ruler enters into power, with the support of the Rich, he or she goes into power
and serves the agenda of the Rich. They have little or no care for the Nigerian masses because
they assume we are powerless, because they know that divisions caused by tribes, religion, and
political parties can not allow us #RiseAsOne.

#RiseAsOne and fight oppression, nonchalant treatment of the masses by the Rich People,
Rich Corporations and Rich Politician. These set of people will forever oppress you and sustain
corruption in the country, Nigeria.

The Rich oppressor and Rich Rulers only use the law and commonwealth for themselves, friends and family.
They do not feel your pain or have no empathy as far as they are safe in their palaces.

Forget tribe, religion, political parties #RiseAsOne.
Fight the Rich Oppressors. Wicked and Insensitive Politicians.
Remember the Very Rich and the Politicians dine together, like in every other country with corruption and oppression.

Rich Pastors
Rich Imams
Rich Politicians
Rich Military Officers
Rich Civil Servants
Rich Rulers


Criminal political elements, all self-serving, leaving only scraps for the Nigerian
masses.

Bringing about a New Nigeria requires removing the Rich and Political Vagabonds.

Nigeria needs a Vigilante, guided by a simple and concise agenda, which is to
remove corrupt or unintelligent people from positions of influence. This would
ensure that others coming to take their positions serve with the fear of God.

The fear of God brought about by The Vigilante or Masses should make New
politicians of New Nigeria do the right things, accountably and transparently.

The Vigilante will lead the revolution, the masses will follow. The Vigilante can
be national or regional, a mixture of intelligent people willing to take action for
the progress of Motherland. Every Nigerian should bring about the cleansing of
their communities.

Power corrupts, even The Vigilante needs laws to prevent it from being corrupt.

The Rich are sustaining the corruption, bad governance and insecurity because
they profit from it.




What are your needs as a Nigerian ?
  1. Security
  2. Rule of Law
  3. No Corruption
  4. Human Rights of Expression
  5. Electricity
  6. Refineries
  7. Technology
  8. Education
  9. Jobs
  10. Mass Transportation and Railways
  11. Health
  12. Water
  13. Housing 
  14. Food Security and Agriculture
  15. Expedient Socio-Economic Emancipation and Alleviation, 
Nigeria needs no more excuses, results or get out of power.

Monday, 5 August 2019

Who is the Nigerian Messiah?

Who is the Nigerian Messiah?


Revolution in Nigeria  


Nigeria has not found it's messiah yet, until that day, we may never progress.

A messiah in my thought is someone that combines revolutionary ways with spiritual powers.
Teaching the truth and performing magic or miracles like Jesus did.

Remember we fight not against just flesh and blood but against principalities and powers, demons. - Ephesians 6:12

Arm yourself with knowledge, laws, as well as your principalities and powers as you go into battle.

Open your eyes, demons in human are here, in high places, even in regilious houses, be not decieved.

Remove these humans or isolate them from positions of influence and you have removed the demons.

Progress can only be certain afterwards.

Pray no more, Act now.

Ephesians 6:12 ESV
For we do not wrestle against flesh and blood, but against the rulers, against the authorities, against the cosmic powers over this present darkness, against the spiritual forces of evil in the heavenly places.




Follow on