GeneratePress to McLuhan

It was a bold decision, but I had to do this.

Lately, I’ve figured out even a premium theme like GeneratePress is overkill for me. My GP customizations get bloated at times, and I’ve realized most of the visitors of this website doesn’t give a shit or two about the styling. I write guides and tutorials. For me, any theme works OOB if the font rendering and navigation are precise.

Rediscovering McLuhan

I knew Anders Norén’s McLuhan ever since its inception on WordPress repository. At that time I wasn’t good at getting comfortable around the theme. I wanted to tweak and tone it down a bit to meet my needs.

Kudos to GeneratePress. GP helped me focus and learn more on front-end coding. I love how it forces you to push the limits. I liked the idea. But, as I’ve said before, I don’t need it now. I want to spend more effort on writing instead of wasting my time on tweaking and WP customization. I’ve decided to settle down.

Goodbye classic editor, my old friend.

Another milestone in my WP journey.

I’ve uninstalled the Classic Editor WordPress plugin. I’ve always preferred the classic editor over Gutenberg for a long (really long) time. But recently, I’ve learned to live with Gutenberg. It’s neat and it gets the job done. I’m happy with it.

What have you done with McLuhan?

A bit of pure CSS edits. And a few PHP edits. For example, I’ve:

  • Removed Google fonts completely.
  • Set to render system fonts (Avenir on Apple devices).
  • Removed the search option. 
  • Converted front page to a minimal landing page.
  • Added the updated on filter to single posts.
  • Changed the position of category meta information.

The additional CSS for the time being

.entry-content li {
	margin-top: 5px;
}

.wp-video {
    margin-bottom: 20px;
}

.page-id-5931 .site-header {
	display: none;
}

.page-id-5931 .entry-title {
	display: none;
}

.page-id-5931 .site-footer {
	display: none;
}

.page-id-5931 {
	height: 50%;
	min-height: 50%;
	background: #121212;
	color: #ececec;
	padding-left: 0px;
}

.page-id-5931 a {
	border-bottom: 1px dotted #ececec;
}

@media (min-width:728px) {
	.page-id-5931 {
		margin-top: 7.33%;
	}
}

@media (max-width:728px) {
	.page-id-5931 {
		margin-top: 7.33%;
	}
}

blockquote p {
	font-weight: 400;
	hanging-punctuation: first;
}

h2 {
	font-size: 25px;
	letter-spacing: -0.35px;
}

h3 {
	font-size: 23px;
	letter-spacing: -0.25px;
}

h4 {
	font-size: 20px;
	letter-spacing: -0.25px;
}

.site-title {
	animation: myanimation 25s infinite;
	font-size: 130%;
	font-weight: 700;
	font-family: avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

pre,
code {
	font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 90%;
}

.meta.bottom p.tags a {
	margin-right: 5px;
}

#side-pointer,
.button-dark {
	padding-top: 10px;
	padding-left: 10px;
	padding-right: 15px;
	padding-bottom: 10px;
	font-size: 0.9rem;
	font-weight: 600;
	background: #ececec;
	letter-spacing: .1px;
	text-transform: uppercase;
	border-radius: 10px;
}

#side-pointer a {
	border-bottom: none;
}

.social-menu .social-search-wrapper {
	display: none;
}

.main-menu .toggle-mobile-search-wrapper {
	display: none;
}

.page-title {
	font-size: 17px;
}

strong {
	font-weight: 600;
}

body,
button,
input,
select,
textarea,
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
	text-rendering: optimizeLegibility;
	font-family: avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.entry-title {
	font-weight: 700;
}

Some habits should change.

Deploy Facebook Bot in Python

Let’s love every word (hmm) in the English language.

Here’s a small bash script to run your own Every Word Bot variant on Facebook. Instead of “fu*k+ word”, we’ll stick to “love+word.”

The script will install Python and necessary modules required to run the bot. You may bookmark this page as well. I will write more Facebook automation scripts in the near future.

Prerequisites

  1. Create a Facebook page
  2. Sign up with DigitalOcean or a cloud-provider of your choice, and set up a low-tier Ubuntu 20.04 instance.

You’ll get 100USD credit on DigitalOcean if you register with the link I shared.

Recommended Settings for DigitalOcean

Deploy Your Facebook Bot with Python

Proceed if you meet the requirements listed in prerequisites.

  1. Generate a non-expiring access token.

    maxbots.ddns.net/token is a tool designed to let you get an access token to allow a Facebook bot to autopost. You use this access token in your API requests for authentication purposes. The access token you receive never expires, unless your account or page gets zucced.

  2. Download fb-bot-starter v1.0 Bash script.

    fbs.sh is a Bash script I created to help you install Python, supporting modules, and set up the bot in action.

    Login to the server, and run wget https://chipfuzz.com/fbs.sh

  3. Make fbs.sh executable.

    In order to run a file directly, we’ll need to change the permissions to allow the script to be executable for the user. chmod is a command that changes permissions on a file, and +x will add execute rights to the script.

    Run chmod +x fbs.sh to make fbs.sh executable.

  4. Execute .fbs.sh.

    Type in ./fbs.sh and press enter.

  5. Enter the access token.

    Enter the access token when the script prompts you to do so.

Yep, that’s it. The script will create a tmux session named lewbot, which will run in the background and automate the page.

Why tmux?

tmux is a terminal multiplexer. The tool allows you to have multiple terminal commands and applications running visually next to each other without the need to open multiple terminal emulator windows.

nohup is another option, but I feel tmux is nice and sleek enough to run FB bots.

main.py script breakdown

Let’s have a look at the main script that powers the Facebook page.

The modules

import random
import facebook
import schedule
import time

random: to cut a line randomly from the words.txt and so on.

k = 1
filename = 'words.txt'
with open(filename) as file:
    lines = file.read().splitlines()

if len(lines) > k:
    random_lines = random.sample(lines, k)
    chosenline = "\n".join(random_lines)
    chosenlinestr = str(chosenline)
    message = "Love " + chosenlinestr 
    print(message)

    with open(filename, 'w') as output_file:
        output_file.writelines(line + "\n"
                               for line in lines if line not in random_lines)

facebook: to interact with the Facebook Graph API
schedule and time: No Shit, Sherlock.

Access Token

#FB Access Token = 'acesstoken'

Post to Facebook

#let's post it
def post():
    #Facebook stuff
    graph = facebook.GraphAPI(accesstoken)
    post_id = graph.put_object(parent_object='me', connection_name='feed', message = message)
    print(f"Submitted \"{message}\" on Facebook successfully!")
    

if __name__ == '__main__':
    schedule.every().hour.do(post).run()
    while 1:
        schedule.run_pending()
        time.sleep(1)

Tip Me

Support if you’d like by referring my resume or donating through PayPal.

How To Start A Blog In 2021

Here’s my step-by-step guide on how to start a self-hosted blog in 2021. If you’re a complete beginner, you’re in the right place.

This blog post is a definitive guide to starting a personal or niche blog from scratch.

If you search for the “best blogging platform” on Google, the SERP may end up with these suggestions:

  1. Blogger
  2. WordPress
  3. Ghost
  4. Tumblr
  5. Squarespace
  6. Medium
  7. Joomla

We’ll use WordPress CMS because it’s intuitive, versatile and the learning curve is smooth. It’s the ideal content management system for beginners. Furthermore, WordPress powers 30% of websites worldwide.

Keep in mind that I’m not a famous blogger or influencer. False motivation isn’t my thing. I won’t promise you a bogus metrics, or an income figure you can make each month as a blogger. I’ll stick to the facts and help you set up a self-hosted website based on WordPress.

I’ve prepared this guide in a story format. I’ll also recommend the optimal settings and plugins for WordPress bloggers. Please bear with my backstories and crossovers nobody asked for.

How to Start A Blog: Step-By-Step Instructions

Let’s divide this definitive guide into two sections:

  1. Buy a domain, enable CDN and purchase a VPS.
  2. Install and configure WordPress.

Prerequisites, Notes & Recommended Apps

Putty (Windows) or Terminal (MacOS): We need an SSH client to log in to the server. PuTTY is an SSH and telnet client, developed originally by Simon Tatham for the Windows platform. macOS users, stick with the Terminal app.

WinSCP (Windows) or Cyberduck (MacOS): As a beginner, you won’t be flexible with Linux commands to move/copy and edit files. Use an SFTP/FTP client to view, edit and manage the data on the server. WinSCP is a free and open-source SFTP, FTP, WebDAV, Amazon S3 and SCP client for Microsoft Windows. I recommend Cyberduck for MacOS users.

VestaCP:  We’ll use VestaCP, a free and open-source control panel as the default control panel to host the WordPress website on your server.

CDN & Managed DNS: We will be using Cloudflare as the DNS manager + cloud network platform. They provide free SSL also. Having an SSL certificate is crucial because Google will be counting HTTPS as a ranking factor. It is recommended to create an account right away.

Example.com: I will use example.com as the dummy domain. You’ve to replace it with your domain-name.tld.

127.0.0.1: I will use 127.0.0.1 as the dummy server IP. You’ve to replace it with your server’s public IP address.

Purchase Domain, Host & CDN.

These three are the crucial steps. A Content Delivery Network (CDN) service is optional, but it has its benefits. We’ll discuss it later. Let’s purchase a server (VPS) first.

Buy A Domain

You need a brand name. Maybe you already have one. Let’s translate that brand name to digital identity.

I prefer NameCheap because I’ve already made more than 40 domain name purchases via their site. They are reliable, and their support has been great.

However, I don’t recommend NameCheap’s hosting services.

Sign-up here, search for a domain name of your choice, add it to the cart and make the payment.

Now, visit this URL, locate the domain you recently purchased, and click “manage.”

Buy and Manage Domain NameCheap

Once you click “manage,” you’ll see something like this.

Manage NameCheap domain

Keep this browser window idle, open a new tab, and proceed to the next step.

Add Site to Cloudflare

Visit dash.cloudflare.com and log in to your account (assuming you’ve created an account). Click “+ Add Site” located in the upper right corner.

Cloudflare Add Site

Now fill in your domain name and click “Add Site.”

Cloudflare Add Domain

Click “Next,” select the free plan and click “Confirm Plan.”

Cloudflare Free Plan

Wait for Cloudflare to finish querying your DNS records.

Cloudflare DNS Query

Usually, Cloudflare will return your current DNS settings; this will be NameCheap’s default settings. Clear all the fields and Click “Next.”

But, sometimes it may display an error like “we are unable to find your DNS settings.” Just click “Next”.

Now, Cloudflare will ask you to change the nameservers in your NameCheap dashboard.

Cloudflare Nameservers

Visit the idle window I mentioned before. Select the “Custom DNS” from the dropdown in the NAMESERVERS section. Fill in the nameservers as suggested by Cloudflare and Click ✓ (save).

Cloudflare Custom DNS

Switch the active window to the Cloudflare setup once again and click “Continue.”

Cloudflare Nameservers

Give it a few minutes for the DNS propagation. The Cloudflare status will be “Active” after DNS propagation.

You’ll receive an email confirmation with the subject line: “example.com has been added to a Cloudflare Free Plan.”

Understand Self-Hosting vs. Shared Hosting

I’m against the idea of shared hosting. A lot of bloggers out there recommend shared-hosting (just because they want to promote their partners/affiliates).

Anyone could purchase, self-host and manage a Virtual Private Server (VPS) efficiently. It’s not as expensive as we think.

I’ve prepared WordPress installation scripts and other necessary resources to aid you.

Buy A Virtual Private Server (Host)

A Virtual Private Server (VPS) is a virtual machine sold as a service by an Internet hosting service.

We will host our WordPress site on a dedicated VPS. Shared hosting is okay, but not recommended since we’ve to share the resources with other people.

I prefer to host the site(s) on my server. Sites like Bluehost come with one-click WordPress installation.

But, I don’t recommend Bluehost or any of the companies that come under the EIG umbrella. They’re known to upsell the services.

I’ve seen some well-known bloggers recommending Bluehost. Don’t fall for the marketing gimmicks. Most of these websites have a partnership with Bluehost.

Moreover, you shouldn’t be hosting your site on a shared server if you plan to go big in the future. Stick with dedicated hosting (VPS), own a private server and scale it.

I always recommend a DIY approach when it comes to web hosting. It’s easy and cheap if you can register an account on sites like RamNode or DigitalOcean.

We’ll use DigitalOcean for this beginners’ guide. I’ve used their services to host multiple projects since it’s reliable, secure and budget-friendly. Their customer support has been great so far.

Here’s another reason why I’m recommending DigitalOcean. My referral link comes with a free $100, 60-day credit for new registrations.

DigitalOcean $100, 60-day credit

Sign-up here.

Nb: All new registrants should verify their account by binding a Credit / Debit Card or by topping up $5 via Paypal. The next step is to create a project and set goals. The company created the “Projects” section to keep users’ systems organized and focused, which save us time navigating the Control Panel.

You’d be able to finish the registration and verification process under five minutes.

Visit this link after verification and creating a new project.

Build Your First Droplet on DigitalOcean

Click on “Get Started with a Droplet

DigitalOcean Droplets: Explained

DigitalOcean Droplets are flexible Linux-based virtual machines (VMs) that run on top of virtualized hardware. Each Droplet you create is a new server you can use. The company offers Standard and CPU Optimized droplets. Standard Droplet is scalable and more than enough for bloggers.

Now the platform asks you to choose an image, size and datacenter region.

DigitalOcean Droplet: Recommended Settings

DigitalOcean Droplet: Recommended Settings

Adding backup and block storage is entirely optional. Don’t worry about backups. We’re going to use VestaCP as the control panel. It comes with backup  option.

Image: CentOS 7.5 x64.
Size: $10/mo. (2GB/1CPU, 50GB SSD Disk & 2TB Bandwidth).
Datacenter region: Select a region close to yor potential audience.

Note:

  1. You can upgrade and scale droplets anytime.
  2. I’ve selected CentOS 7.5 x64 because it is a stable Linux Distro.
  3. I highly recommend users to learn more about SSH keys and generate/set-up SSH keys while creating a droplet. SSH keys provide a more secure way of logging into a virtual private server with SSH than using a password alone. Read this official guide from DigitalOcean. You need PuTTYgen to create SSH Keys on Windows.

Finally, Click “create” if everything looks okay for you.

Patiently wait for DigitalOcean to create the droplet, generate a Public IP, one-time root password and send it over to your registered email address.

Managed Hosting Recommendation (Optional)

Only recommended if DigitalOcean sounds too much of a hassle.

Managed hosting is usually an extension of dedicated hosting, whereby the required hardware is owned by the hosting provider and is leased to a single client. — interoute.com

Sign-up with Kinsta if you prefer a managed WordPress hosting solution. Web hosting with Kinsta can range from $30 per month to $900 per month. The platform exceptional, sleek, and intuitive.

Why Kinsta?

It is a platform officially recommended by Google Cloud as a fully-managed WordPress hosting solution.

Install VestaCP On CentOS

Login to your server as root

Use the credentials DigitalOcean sent you over email to log in.

  • MacOS: Open the Terminal.
  • Windows: Open up PuTTY. If you find it confusing, read this article.

Type the following and hit enter:

$ ssh [email protected]

Replace 127.0.0.1 with your server’s public IP address.

During first login, DigitalOcean’s CentOS distro will force you to change the password.

Install Vesta CP (Control Panel)

Download installation script

$ curl -O http://vestacp.com/pub/vst-install.sh

Run it to start the installation

$ bash vst-install.sh --nginx yes --phpfpm yes --apache no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota yes --exim yes --dovecot yes --spamassassin yes --clamav yes --softaculous no --mysql yes --postgresql no

We’re going with the NGINX + PHP-FPM configuration instead of Apache + PHP. This is one of the best configurations that promises better performance.

CentOS may ask you to force the installation sometimes. Run this command to do it:

$ bash vst-install.sh --nginx yes --phpfpm yes --apache no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota yes --exim yes --dovecot yes --spamassassin yes --clamav yes --softaculous no --mysql yes --postgresql no -f

The setup will ask you type in the hostname and email address.

It’s wise not to use example.com as the hostname. Use server.example.com instead.

VestaCP roughly needs 5 to 10 minutes to finish the installation. It will display the login URL and admin credentials upon completing the installation.

Configure DNS

Visit the DNS section of your website in Cloudflare.com.

Set CNAME and A records as follows.

  • A Record – Name: @, ipv4 address: 127.0.0.1
  • A Record – Name: server, ipv4 address: 127.0.0.1
  • CNAME record – Name: www, Domain Name: @

Make sure it looks like this after editing.

Cloudflare DNS

Don’t forget to replace 67.218.150.74 with your server’s IP.

Add New Website on VestaCP 

Visit the VestaCP login URL

Log in using the credentials you saved before (Login URL may look like https://127.0.0.1:8083). Change the admin password after logging in. Feel free to tweak other settings according to your preference.

Add a website

Visit the WEB section in the VestaCP and click the “ADD WEB DOMAIN” button.

VestaCP Add New Domain

Fill in example.com (e.g., mynewsite.com) and select the default IP address. Click the ADVANCED OPTIONS and edit the Alias to www.example.com. Click “Add” when you’re ready.

VestaCP New Domain

Wait for a few seconds and visit example.com. You’d see a dummy home page generated by VestaCP.

jot.sh example domain VestaCP

jot.sh example domain VestaCP.

Disable Cloudflare HTTP proxy to enable LetsEncrypt SSL.

It is not possible to create Let’s Encrypt SSL certificates in VestaCP while the CloudFlare CDN is active, so turn it off by clicking the Orange Cloud as shown in the image. The Grey Cloud means CloudFlare CDN is off.

Turn off Cloudflare CDN to generate CloudWays Let's Encrypt SSL Certificates

Enable Let’s Encrypt SSL for example.com

Visit this URL: https://127.0.01:8083/edit/web/?domain=example.com

Locate the SSL Support section and check the Let’s Encrypt Support and click Save.

Enable Let's Encrypt SSL for example.com

Install & Configure WordPress

We’ve to configure wordpress2 Web Template for example.com before WordPress installation. It is a dedicated template for WordPress sites based on NGINX + PHP-FPM on VestaCP.

Visit this URL: https://127.0.01:8083/edit/web/?domain=example.com once more and look for the Web Template section. Select wordpress2 from the drop down and click Save.

Now revisit VestaCP web dashboard and make sure it looks like this:

Ideal set-up for an NGINX PHP-FPM WordPress site on VestaCP

Ideal set-up for an NGINX PHP-FPM WordPress site on VestaCP

Finally, Install WordPress

Login to your server as root

Type the following and hit enter:

$ ssh [email protected]

Use my bash script to install WordPress:

Copy and paste:

curl -O https://gist.githubusercontent.com/mighildotcom/7205442783534792a606df39629e22d3/raw/a02564e5eb9931da31e3f4988717b6119a82ea6e/vesta-wp.sh

and run:

bash vesta-wp.sh

The script will ask you to fill in few details like domain name, user and database details. USERNAME should be admin, and you must fill in other information according to your preferences.

  • USERNAME: admin
  • DOMAIN: example.com
  • Database NAME:
  • Database USER:
  • Database PASSWORD:

Wait for the “All done! Enjoy Fresh WordPress Installation.” message.

Now, visit example.com to configure WordPress.

Fill in Site Title, username, email, and password etc. Copy and paste your password and username somewhere safe. There are chances VestaCP mailer won’t send WordPress’ system emails.

You can use Sparkpost as the default mailer. Create an account on their website and configure TXT, CNAME records for the mailer domain (mailer.example.com). Install their plugin and save the API details to activate the same.

Finish WordPress Installation

Install the Cloudflare Flexible SSL, Really Simple SSL Plugins & Turn on Cloudflare SSL

Cloudflare Flexible SSL plugin is essential for enabling Flexible SSL on Cloudflare and will prevent infinite redirect loops when loading your WordPress site under CloudFlare’s Flexible SSL system.

Flexible SSL for CloudFlare

Really Simple SSL plugin will make sure your site is loading over https:// all the time. It is essential to install this one as well.

Really Simple SSL

Install both plugins and head over to Cloudflare dashboard. Turn on Cloudflare CDN right away.

Enable Cloudflare CDN Cloudways

Install A WordPress Theme

Read This Before Installing A Theme

Twenty Nineteen will be the default theme of your blog. Stick with it, if you like it. WordPress 5.0 (Bebo) comes with Gutenberg block editor as default.

You may install and activate the “Classic Editor” plugin if you don’t like the Gutenberg editor.

Install And Activate Classic Editor WordPress

You can download Classic Editor plugin from the official GitHub repo, or install and activate it through your WordPress administration panel at Plugins → Add New.

How to Select The Default Editor on WordPress

You can set the default editor in the Writing Panel within the Settings → Writing.

How to Select The Default Editor on WordPress

How to Install A WordPress Theme

You can install themes via WordPress administration panel at Appearance → Themes → Add New. You could either search and install WordPress Themes or upload them and install.

How to Install A Theme in WordPress

Recommended WordPress Theme For Bloggers

I recommend GeneratePress; a Gutenberg-friendly WordPress theme ideal for both casual and serious bloggers. It is highly flexible, 100% A11Y-ready and lightweight. I’ve been using this theme for a few months. My GeneratePress review covers all the information you need to get started with this WordPress theme.

GeneratePress Review: Best Gutenberg-ready Theme in October 2021

You can download GeneratePress for free from their website, or install it through your WordPress administration panel at Appearance → Themes → Add New.

That’s it; you’re all set. Happy blogging!

Other recommendations

These recommendations are genuine and based on personal experience.

WordPress Caching Plugin

Make use of a caching plugin called Autoptimize developed by Frank Goossens (futtta). It can aggregate, minify and cache scripts and styles, injects CSS in the page head by default (but can also defer), moves and defers scripts to the footer and minifies HTML.

Autoptimize

Hide WordPress Login URL With A Plugin

You should protect your website by changing the login URL and preventing access to the wp-login.php page and wp-admin directory while not logged-in. Use WPS Hide Login, a Free plugin.

WPS Hide Login

More

  • Sparkpost: For email delivery. The setup procedure is straightforward.
  • Zoho Mail: Ad-Free Business Email Hosting.

Need help from a pro?

Send a message now!

Combine Multiple Videos Using ffmpeg

As seen on ma.ttias.be. I’m just documenting this in my own way for future reference. This method is only applicable to videos of the same dimensions and encoding. Tested on FFmpeg 4.3. I use this method to download and concatenate youtube-dl outputs.

Step 1: Create a text file and make a list of video files.

touch files.txt
vi files.txt

Example content to save:

file 'p1.mp4'
file 'p2.mp4'
file 'p3.mp4'
file 'p4.mp4'

Step 2: Run the command below

ffmpeg -f concat -safe 0 -i files.txt -c copy output.mp4

New Laptop & Linux Mint

Update: Sold the HP laptop and purchased an Acer Swift 3 Intel variant. Running macOS and Windows 10 at the moment.

My Lenovo ThinkPad X230 is no more. Lost it to a motherboard issue caused by electrical surge. I’ve been using that laptop connected to direct AC.

Got hold of an HP 14q-cs0029tu i3 8th gen variant. The laptop comes with i3 8130u CPU, Samsung 8GB DDR4 2666MHZ Memory & 256GB WD SN750 NVMe™ SSD. They shipped the laptop with Windows 10 Home.

But, meh…I don’t have a good internet connection at home, which means I can’t install Steam and play lightweight indie games. So ultimately, except for FL Studio, Windows 10 is useless to me at this point.

Installed Linux Mint 19.1 Xfce right away. I’ve installed LMMS as the backup DAW for the time being. I really don’t feel like going to back Windows just for FL Studio. I haven’t installed GIMP yet.

HP 14q-cs0029tu Linux WiFi Driver

And if you’re planning to install Linux on this HP laptop, keep in mind that WiFi won’t work OOB. You’ve to install the Realtek RTL8723DE module for Linux and restart the Machine.

Footnotes

  • I took that cover photo while unboxing. Sorry about the distortion.
  • I use Mc-OS CTLina XFCE theme & OS Catalina icon pack.

API-alpha for Bug Guide

Status: Deprecated

Explore the data-set of 35447 insects!

Based on bugguide.net’s multiple .txt sets, I created an API to deliver insects’ data in JSON format. At present, the API only delivers the common name, genus, species, family, order, bug_guide_id, and bugguide.net URL information.

API Endpoint

https://bugs.deadauthor.org?api&

Documentation

Data can be parsed as JSON. Access to the bugs.deadauthor.org doesn’t require a token-based authentication. Kindly avoid sending too many requests. Consider donating if you plan to actively use the API.

Examples

Query a common name

GET https://bugs.deadauthor.org?api&common_name=Brown%20Angle%20Shades

Query a genus

GET https://bugs.deadauthor.org?api&genus=Oligotoma

Query species

GET https://bugs.deadauthor.org?api&species=nigra

Query a family

GET https://bugs.deadauthor.org?api&family=Oedemeridae

Query an order

GET https://bugs.deadauthor.org/?api&order=Coleoptera

Query a bug_guide_id

GET https://bugs.deadauthor.org?api&bug_guide_id=389

Query combination example

GET https://bugs.deadauthor.org?api&species=scrutator&order=Coleoptera

API Usage Example (Python)

https://github.com/migftw/bugguide-api/blob/master/parse-json.py

Alpha disclaimer

The bugs.deadauthor.org API is actually in the alpha stage, which implies that “bugs” and issues may still remain undiscovered until this phase of testing is complete.

The alpha stage also means that the data may be corrupted, is not 100% validated or complete, and is subject to change.

Finally, services may have downtime and the API schemas and calls are subject to change

An Example Bot for Twitter & Facebook

Here’s a small Python script to run your own Every Word Bot variant on Facebook and Twitter. The basic guide is available at the bottom of the article. Unfortunately, the guide is not applicable to beginners. Here’s the GitHub repo.

Step 1 — You need a VPS or an account on pythonanywhere.com to host and run this script. I highly recommend a DigitalOcean droplet if you can afford a VPS. I think you’ll get a 50USD or 100USD credit on DigitalOcean when you sign-up with the link I shared. You could check Amazon AWS or Google Cloud Platform also. Select Debian, Ubuntu, or CentOS while you’re creating a droplet or instance.

Step 2 — Install Python 3 followed by the modules facebook, tweepy, and schedule. Installing modules will become fairly easy once you get the hang of it. 

Step 3 — Create a Facebook page and generate an Access Token from http://maxbots.ddns.net/token/. Paste the token to the accesstoken field in the script.

Step 4 — Create a Twitter app and generate tokens & secret keys. It’s explained in the Access token/secret method section of this blog post

Step 5 — Download the English words data-set of your choice.  Replace the words.txt in my repo with the text set of yours. Fire up the script with the command sudo python3 main.py

You can use tmux to manage the sessions.

Also read: https://github.com/aparrish/everywordbot

Get Creative

Look at @loveeveryword and @bottubebot for example. You could use Pillow to post images or even GTTS + moviepy to post videos.

Credit: Cover Photo by Brett Jordan on Unsplash

Python for Automation

30 days of Python, and it’s changing my perspective.

I’m more of a “front-end” development guy. I routinely manage WordPress websites and optimize the servers for optimal performance. Python or Node isn’t something I need every day.

Here’s a source code to get started.

The Every Tom and Jerry Frame in Order Facebook page sparked my interest in the area of “social media automation for entertainment”. I grabbed that project’s source code and started tweaking.

Failed miserably at first. Then I wrote an email to the code maintainer. They were generous and wrote back. The emails went back and forth until I fixed my version of the script.

Learning and tweaking Python code has been a spiritually refreshing experience. I had a good time writing various other scripts.

The progress

I religiously use modules like OpenCV, moviepy, Wikipedia, Pillow, FFmpeg, schedule, requests, JSON, etc.

I’ve managed to learn more about JSON data as well.

I’ve also started using WordPress REST API with Python3.

Results (Facebook bots)

Deep Dreaming Harvard Art Museums Bot — A Facebook page that lets you explore Harvard Art Museums in DeepDream (neural network) mode. Objects are picked in no order. No logs stored on my server.

Met. Museum Bot — Another art museum based on The Metropolitan Museum of Art’s API. 474383 objects in total.

Fishbot 13229 — An ultimate wiki-bot that shares photos and information about fishes. I use fishbase.se’ data as the base to gather Wikipedia info and images.

Birdbot 11147 — Another wiki-bot destined to share photos and information about birds. It also shares the IUCN Red List status.

Insect Bot 35499 — A bot that appreciates hexapod invertebrates.

CryptidWiki Bot — A bot based on cryptidz.fandom.com’ data. It shares stories about various cryptids in a timely manner.

Amphibians & Reptiles Bot — Another wiki-bot that shares photos and information about amphibians and reptiles.

Plant Bot — A bot that randomly posts an image of your favorite photosynthetic eukaryotes. The image search isn’t perfect yet.

Bots With Attitude — A bot based on GPT-2 captions and AI-generated (API) photos. Still a work-in-progress.

abstraktr.py — A script that generates CC0 1.0 abstract art every hour. Based on an open-source project.

Haunted Places Bot – US Edition — A bot that shares info about haunted places in the US. The script uses data from Shadowlands Haunted Places Index. Images are randomly captured from search engine results.

@1000000Bot — A script that randomly shares a website URL (from Alexa’s dataset) and its basic PageSpeed insights.

Miscellaneous

  • https://www.facebook.com/loveeveryword/
  • https://www.facebook.com/bottubebot
  • https://www.facebook.com/waybackexe/ (Scrape)
  • https://www.facebook.com/anguirusbot
  • https://www.facebook.com/cidmoosabot

iPhone SE, A13 Bionic FTW

I’ve loved everything about my iPhone SE (GEN1). One of the best form factors in my opinion. Now Apple decided to give us a budget iPhone in the iPhone 8 shell paired with the majestic A13 and classic design.

Highlights — Best Single-Camera System, A13 Bionic Chip & Dual SIM.

Lockdown Extension

So they’ve decided to extend the nationwide lockdown. It’s a good move in my opinion. But I disagree with the idea of bringing back the mass population of Indian ex-pats in UAE and other countries.

The best move would be financially and emotionally supporting them through the embassies. Give them proper quarantine awareness and move them to isolation centers under the Indian embassy’s supervision.

COVID-19 is mainly transmitted through droplets generated when an infected person coughs, sneezes, or speaks. Traveling puts everyone at risk. Or they should travel as mini-groups.

Old ThinkPads

I love everything about the old Lenovo ThinkPads (≤ 2013). These machines are highly customizable compared to the latest ultrabook laptops. I use a T530, X230, and an X230 Tablet. And all of these laptops are capable of running macOS Catalina also.

I highly recommend old Lenovo ThinkPads if you’re on a budget. Plus recycling can benefit your community and the environment. It’s a sustainable approach.

Young Sheldon

Wasn’t a big fan of Sheldon nor The Big Bang Theory. But I’m hooked to the quirkiness of Young Sheldon. Maybe because I’ve got a daughter now. I find this is the right time to start appreciating family TV shows. Life’s changing. My favorite character is Meemaw. Annie Potts is so charming as Constance “Connie” Tucker.

Lockdown

Worst days ever. I miss my wife, daughter, and Chengdu. The Kerala government is doing its best to contain and isolate COVID-19.

Gigabyte B150M-VP Skylake Hackintosh Guide

This was an easy one. I’ve recently installed macOS Catalina 10.15.2 on my desktop PC. The specs are Gigabyte GA-B150M-VP, i5-6600K CPU, Team Elite 8GB DDR4 2400Mhz Memory, and Radeon™ RX 580 GPU alongside a boot SSD for macOS and shared HDD storage for macOS and Windows. This is a test set-up and I won’t tweak this build for the latest versions of Clover or macOS.

Skylake Hackintosh Menu Bar

A word of warning; you should modify the EFI (a lot) if your system specs are different. Ethernet isn’t working for me for the time being. Downgrading Clover would fix that. But I use a nano-USB adapter for WiFi. I’m content with that. Everything else should work out of the box if you have the specs as mine.

Nota bene

  • Proceed with caution. Don’t blame me if you didn’t back up.
  • Delete VoodooHDA from Kexts/Other, if the AppleALC Kext is working.
  • The guide is not applicable to Opencore bootloader. Go ahead though, if you know what you’re doing.

Download The EFI Pack

My EFI folder is applicable for Vanilla approach and SSD hot-swap (just replace/paste EFI folder – not recommended though.) If things go south, use the clover settings from Hackintosher’s ASUS Z170 EFI Pack. But then you’ve to tweak settings a bit more.

Kexts for Gigabyte B150M Skylake Hackintosh Catalina

Kexts/Other folder.

What Doesn’t Work?

  • Sleep/wake
  • Ethernet (For the time being. Catalina broke the ethernet for me. I use a WiFi adapter anyway. So no plans to fix it real soon.)
  • FaceTime/iMessage (It will work after SMBIOS edits. You should do that.)

Resources

  • Guide to create a bootable macOS Catalina USB install drive (on macOS)
  • Guide to create a bootable macOS Catalina USB install drive (on Windows)

Post USB preparation

  • Install Clover to the USB flash drive.
  • Use Clover Configurator (macOS) or DiskGenius (Windows) to mount the EFI folder within the USB flash drive.
  • Paste my /EFI folder to the EFI partition.

Good luck!

Tip Me:

Support if you’d like by referring my resume or donating through PayPal, Phonepe, or Alipay.

Update: ThinkPad T530 Hackintosh Catalina

ThinkPad T530 is undoubtedly a solid machine that can handle macOS Catalina. I installed Mojave on this machine a while ago but never bothered to use T530 as a daily driver. Skip introduction at your own risk.

But here we are! The hacking part was quite easy this time. Few Kext updates and alongside Clover update did the job. I haven’t edited the config.plist from Mojave installation as well. Luckily Apple didn’t throw any kernel panic while testing. I did a Vanilla install by the way.

Behold, behold The mighty one!

Alright, let’s dive in! Read the guide carefully if you’re a beginner. Don’t blame me if you f*ck up your current OS.

Don’t forget to fork or star my GitHub repo while you’re at it. Please don’t sell the EFI or use it on your YouTube video without giving credit to the original author. Don’t be an A-hole.

My ThinkPad T530′ Specs: i7 3740QM, 16GB Memory, 128GB SSD + 256GB SSD + 750GB HDD, NVIDIA NVS 5400M (N/A for Hackintosh)

Search Results Web results Hackintosh | Installing Catalina on Lenovo T530

The Kexts/Other folder.

What Doesn’t Work?

  1. Inbuilt WiFi card.
  2. Mini DisplayPort.
  3. Fingerprint reader (if you’ve one).
  4. Card reader.

#README

  • Proceed with caution.
  • Tested on macOS Catalina 10.15.2.
  • EFI folder is N/A for Opencore bootloader. Go ahead though, if you know what you’re doing.
  • Do a Vanilla install if possible. I haven’t tested a direct update from Mojave.
  • The EFI folder is applicable to SSD hot-swap also. ie, if you’re planning to swap SSD from a MacBook Pro to ThinkPad 530.

Download The EFI folder for ThinkPad T530

Recommended BIOS settings

Disable dGPU: The process is quite simple. Go to BIOS Setup -> Config -> Display and set the Graphics Device as “Integrated Graphics.” Also, disable the OS Detection for NVIDIA Optimus. Make sure it looks like the attached image below. Then, select Save & Exit.

ThinkPad T530 BIOS Display Settings for Hackintosh

Select UEFI Only: Go to BIOS Settings → Startup, select UEFI only.

Disable CSM Support: Do this if the USB doesn’t boot initially. Go to BIOS Settings → Startup, disable CSM support.

T530 BIOS Startup Settings for Hackintosh

ThinkPad T530 macOS Catalina – Vanilla Installation Guide(s)

It doesn’t matter if you own a real Mac or not. I’ll share the installation guide for both macOS and Windows.

How to create a bootable macOS Catalina 10.15 USB install drive? (on macOS)

Step 1: Refer to this guide from 9to5mac

Step 2: Download and install Clover to USB.  Refer to this article for clarity.

Step 3: Install Clover Configurator, and mount the EFI partition. Then replace the EFI folder with the one on my repo.

How to create a bootable macOS Catalina 10.15 USB install drive? (on Windows)

Step 1: Install Transmac on a Windows machine. It has a 15-day trial period and works flawlessly flashing DMG files to USB.

Step 2: Download the macOS 10.15.2 with clover dmg file from here or other sources you come across Google SERP.

Step 3: Download the EFI folder in my GitHub repo.

Step 4: Download Clover Configurator for macOS (latest version).

Step 5: Connect a 16 GB USB flash drive.

Step 6: Open Transmac. In the left pane, right-click the USB Drive and select Format Disk for Mac

Again in the left pane, right-click the USB Drive and select Restore with Disk Image. Then select the DMG file I mentioned in (2). The flashing process will take a few minutes depending on the size of .dmg and speed/port of the USB drive.

Step 7: Install DiskGenius.

Step 8: Locate the USB drive in DiskGenius. Delete the EFI folder and replace it with the new EFI folder. Refer to this part of a YouTube video for clarity.

Step 9: Plug the USB drive into the ThinkPad T530 and boot from USB.

Step 10: Format the disk drive to APFS, install macOS Mojave and restart the system.

Step 11: Connect the Hackintosh system to the Internet via LAN cable, USB tethering or a Mac-compatible external WiFi adapter.

Step 12: Download & install Clover Configurator on MacOS. Open EFI partition and copy -> paste the EFI folder once more.

(Optional) You may use Karabiner-Elements if the keyboard mappings (command and option) are acting up.

All the best! Write to me if you need professional guidance.

Success: X79 Hackintosh

It took a while to optimize. But I finally installed macOS Catalina on my desktop PC with X79/LGA 2011 motherboard, Xeon E5-2650 CPU and Radeon™ RX 580 GPU. Specs listed below.

Part Model Number
CPU Xeon E5-2650
Motherboard Ant Country X79 Basic
GPU RX 580 4B (AMD OEM)
Memory Samsung 8GB DDR3-1333Mhz ECC x 4
PSU Evesky 650W
CPU Cooler Frostwind (Taobao)
mATX Case 钢铁侠M1-N5 (Tmall)
Storage 128GB SSD (macOS), 256GB SSD (Windows 10), 1TB HDD (Shared Storage)
Keyboard 赤暴Readson FH87

A word of warning; you should modify the EFI (a lot) if your system specs are different. I use an ”Ant Country X79 Basic” Chinese motherboard, very similar to Huanan X79.  The CPU type 0x0a01 I set in Clover is only applicable to 8-core CPU models. You should edit that out if your CPU config is different. Also, note that I’ve manually set my system memory info (4x 8GB) within the SMBIOS in Clover. You should edit that as well.

Nota bene

  • Proceed with caution. Don’t blame me if you didn’t back up.
  • Delete VoodooHDA from Kexts/Other, if the AppleALC Kext is working.
  • The guide is not applicable to Opencore bootloader. Go ahead though, if you know what you’re doing.
  • I haven’t tested these settings against the latest version of Clover.

Download The EFI folder for X79

My EFI folder is applicable for Vanilla approach and SSD hot-swap (just replace/paste EFI folder – not recommended though.) If things go south, use the clover settings attached in the starter-EFI folder of my repo. But then you’ve to tweak settings a bit more.

What Doesn’t Work?

  • Sleep/wake
  • Ethernet (For the time being. Catalina broke the ethernet for me. I use a WiFi adapter anyway. So no plans to fix it real soon.)
  • FaceTime/iMessage (It will work after SMBIOS edits. You should do that.)

Resources

  • Guide to create a bootable macOS Catalina USB install drive (on macOS)
  • Guide to create a bootable macOS Catalina USB install drive (on Windows)

Post USB preparation

  • Install Clover to the USB flash drive.
  • Use Clover Configurator (macOS) or DiskGenius (Windows) to mount the EFI folder within the USB flash drive.
  • Paste my /EFI folder to the EFI partition.

Good luck!

Pitaka MagEZ iPhone Case Review

Looking for the best iPhone 11 and iPhone 11 Pro case to purchase this year? Searching for an honest Pitaka review? You’ve reached the right place. Read my story/review and decide whether Pitaka MagEZ Case would be the best fit for your iPhone.

I don’t have the habit of upgrading iPhones every year. However, this year was different. My wife just surprised me with an iPhone 11 as the birthday gift. But I managed to drop the iPhone from our bed the second day itself.

That’s when I started searching for a durable iPhone 11 case. I’ve purchased almost 3 or 4 cases and wasn’t happy with any of those. Problem? the weight and dimensions!

iPhone 11 itself is chunky and it’s quite inconvenient if you don’t find an iPhone case with the right dimensions and weight. I was unaware of Pitaka (brand) until YouTube recommended me an Unbox Therapy Latercase vs. PITAKA video.

This encouraged me to research Pitaka and its product range. Pitaka MagEZ Case for iPhone 11 grabbed the attention.

The reviews I saw were quite promising. So decided to give it a shot. I emailed and they agreed to send me a review unit right away. The shipping was swift via SF Express (the benefits of living in mainland China!)

Unboxing Pitaka MagEZ Case

Pitaka: Minimal iPhone 11 Case (In the Box)

The packaging looks and feels premium. The main box comes in jet grey color. I purchased the black/grey (twill) MagEZ case.

What’s inside the box?

PITAKA Slim Case Unboxing
  • MagEZ Case
  • Warranty Card (as QR code)
  • Thank you card

The features (advertised)

  • Metal plates inside to be attachable to the PITAKA magnetic car mount.
  • Made of 100% aramid, a high-tech luxury material for body armor, aerospace, supercars.
  • Weightless feel. 14g weight only. One of the lightest cases on the planet.
  • Extremely Thin. A slim profile of 0.85mm only.
  • Extraordinary scratch resistant, grippy but non-slippy coating.
  • Ridiculously durable and incredibly strong. 5 times stronger than steel at the same weight.
  • No interference with your phone’s WiFi, Apple Pay, wireless charging or signals.

The features (realtime)

MagEZ Case for iPhone 11 & iPhone 11 Pro

As advertised, Aramid is just great. It feels super-light but sturdy at the same time. It doesn’t interfere with wireless charging, wireless networks, and other signals. Battery performs fine, and I haven’t noticed any irregularities in discharging. The mobile network reception works the way it should be. It doesn’t impede the charging port, buttons nor switches. Everything works fine!

Pitaka's Wireless Charging Friendly iPhone 11 Case

I really admire the work they put into designing this case. It’s incredibly lightweight and the non-slippery texture is a win-win for users like me. Another notable feature is the granular design, which adds a premium look to the iPhone case. I haven’t tested the embedded metal plates though. And yeah, even the metal plates won’t mess with your wireless charger.

Verdict

I’d recommend a MagEZ case anytime. I’m pretty sure it’s the best ultra-thin case for iPhone 11 and iPhone Pro available right now! No wonder why Lew from Unbox Therapy decided to copy Pitaka’s design aesthetics.

Source: Review unit.
Cons: None.
Review type: Unpaid/unbiased. Read my review policy.

Dark Mode for GeneratePress

Yep, Dark mode for GeneratePress done minimally. This website is a demo.

I made Jot, a starter site template for GeneratePress Premium. It comes with an automatic dark mode for supported systems and browsers. This template heavily relies on  prefers-color-scheme CSS media feature. Refer to my previous blog post if you want to read more about that.

Key features of Jot:

  • Automatic dark mode. Follows Google’s best practices.
  • Grayscale filter while in dark mode. Applicable to img, code, kbd, pre, samp, and blockquote.

Overall, the site template would be ideal for writers and bloggers that embrace minimalism.

How to use the GeneratePress Dark Mode site template

Step 1: Download the JSON file and import it to your GeneratePress settings. Accessible via Dashboard → Appearance → GeneratePress → Import Settings.

Step 2: Copy and paste the CSS to the Additional CSS section. Accessible via Dashboard → Appearance → Customize → Additional CSS.

Be sure to edit the settings and style to meet your goals and standards.

Raw .json

{"modules":{"Backgrounds":"generate_package_backgrounds","Blog":"generate_package_blog","Colors":"generate_package_colors","Copyright":"generate_package_copyright","Elements":"generate_package_elements","Disable Elements":"generate_package_disable_elements","Menu Plus":"generate_package_menu_plus","Secondary Nav":"generate_package_secondary_nav","Sections":"generate_package_sections","Spacing":"generate_package_spacing","Typography":"generate_package_typography"},"mods":{"font_body_variants":"regular,italic,700,700italic","font_body_category":"serif","font_site_title_variants":"300,300italic,regular,italic,700,700italic,900,900italic","font_site_title_category":"serif","font_site_tagline_variants":false,"font_site_tagline_category":false,"font_navigation_variants":false,"font_navigation_category":false,"font_secondary_navigation_variants":false,"font_secondary_navigation_category":false,"font_buttons_variants":false,"font_buttons_category":false,"font_heading_1_variants":false,"font_heading_1_category":false,"font_heading_2_variants":false,"font_heading_2_category":false,"font_heading_3_variants":false,"font_heading_3_category":false,"font_heading_4_variants":false,"font_heading_4_category":false,"font_heading_5_variants":false,"font_heading_5_category":false,"font_heading_6_variants":false,"font_heading_6_category":false,"font_widget_title_variants":false,"font_widget_title_category":false,"font_footer_variants":"","font_footer_category":"","generate_copyright":"%copy% %current_year% jot.sh. <\/a> Powered by GeneratePress<\/a> for WordPress<\/a>."},"options":{"generate_settings":{"hide_title":false,"hide_tagline":true,"logo":"","retina_logo":"","top_bar_width":"full","top_bar_inner_width":"contained","top_bar_alignment":"left","container_width":500,"header_layout_setting":"fluid-header","header_inner_width":"contained","nav_alignment_setting":"left","header_alignment_setting":"center","nav_layout_setting":"contained-nav","nav_inner_width":"contained","nav_position_setting":"nav-below-header","nav_dropdown_type":"click-arrow","nav_search":"disable","content_layout_setting":"one-container","layout_setting":"no-sidebar","blog_layout_setting":"no-sidebar","single_layout_setting":"no-sidebar","post_content":"excerpt","footer_layout_setting":"fluid-footer","footer_inner_width":"contained","footer_widget_setting":"0","footer_bar_alignment":"right","back_to_top":"","background_color":"#ffffff","text_color":"#333333","link_color":"#72b1db","link_color_hover":"#3498db","link_color_visited":"","font_awesome":false,"font_awesome_v4_shim":false,"dynamic_css_cache":true,"smooth_scroll":false,"header_background_color":"rgba(232,232,232,0)","site_title_color":"#3a3a3a","site_tagline_color":"#7c7c7c","font_body":"PT Serif","site_title_font_transform":"none","site_title_font_size":45,"navigation_font_transform":"none","navigation_background_color":"rgba(232,232,232,0)","navigation_background_hover_color":"rgba(135,135,135,0)","navigation_background_current_color":"rgba(112,112,112,0)","navigation_font_weight":"400","navigation_font_size":17,"navigation_text_hover_color":"#6b96bc","header_text_color":"#3a3a3a","header_link_color":"#b5190e","navigation_text_color":"#727272","navigation_text_current_color":"#6b96bc","header_link_hover_color":"#b5190e","form_button_background_color":"#72b1db","form_button_text_color":"#ffffff","form_button_background_color_hover":"#3498db","form_button_text_color_hover":"#ffffff","form_background_color":"#ffffff","form_border_color":"#0a0a0a","form_border_color_focus":"#0a0a0a","form_text_color":"#0a0a0a","form_text_color_focus":"#0a0a0a","blog_post_title_color":"#333333","blog_post_title_hover_color":"","heading_2_weight":"500","heading_2_transform":"none","heading_2_font_size":24,"heading_1_weight":"500","heading_1_transform":"none","heading_1_font_size":27,"footer_background_color":"rgba(232,232,232,0)","footer_text_color":"#878787","footer_link_color":"#878787","footer_link_hover_color":"#3498db","buttons_font_weight":"600","buttons_font_transform":"none","buttons_font_size":17,"footer_transform":"none","widget_title_font_weight":"600","widget_title_font_transform":"none","widget_title_font_size":21,"widget_content_font_size":17,"footer_font_size":15,"heading_3_transform":"none","subnavigation_background_color":"#666666","subnavigation_background_hover_color":"rgba(85,85,85,0)","subnavigation_background_current_color":"#555555","subnavigation_text_hover_color":"#ffffff","font_awesome_essentials":true,"body_font_size":17,"mobile_heading_1_font_size":27,"logo_width":60,"mobile_site_title_font_size":24,"heading_3_weight":"500","heading_3_font_size":22,"heading_4_weight":"500","heading_4_font_size":20,"body_line_height":1.7,"site_title_font_weight":"500","site_tagline_font_size":15,"heading_1_line_height":1.15,"heading_2_line_height":1.5,"heading_3_line_height":1.3,"nav_dropdown_direction":"left","heading_1_margin_bottom":30,"single_post_title_font_size":29,"single_post_title_font_size_mobile":27,"single_post_title_line_height":1.7,"content_background_color":"rgba(255,255,255,0)","footer_widget_background_color":"rgba(232,232,232,0)","footer_widget_link_hover_color":"","sidebar_widget_background_color":"rgba(255,255,255,0)","paragraph_margin":1.3,"font_footer":"inherit","heading_2_margin_bottom":20,"mobile_heading_2_font_size":24,"entry_meta_link_color_hover":"#3498db","heading_3_margin_bottom":20,"heading_4_line_height":1.3,"top_bar_background_color":"rgba(99,99,99,0)","top_bar_font_size":14,"container_alignment":"boxes","footer_weight":"400","font_site_title":"Merriweather"},"generate_background_settings":false,"generate_blog_settings":{"excerpt_length":35,"read_more":"","masonry":true,"masonry_width":"width2","masonry_most_recent_width":"width4","masonry_load_more":"Load +","masonry_loading":"Loading...","post_image":true,"post_image_position":"","post_image_alignment":"post-image-aligned-center","post_image_width":"","post_image_height":"","date":true,"author":true,"categories":false,"tags":false,"comments":false,"column_layout":false,"columns":"50","featured_column":true,"single_date":true,"single_author":true,"single_categories":true,"single_tags":true,"read_more_button":false,"infinite_scroll":true,"post_image_padding":true,"single_post_image_padding":true,"page_post_image_padding":false,"page_post_image_position":"inside-content","single_post_image_position":"below-title","infinite_scroll_button":false},"generate_secondary_nav_settings":{"secondary_nav_position_setting":"secondary-nav-float-right"},"generate_spacing_settings":{"menu_item_height":52,"separator":20,"header_top":30,"header_right":30,"header_bottom":30,"header_left":30,"right_sidebar_width":30,"content_top":20,"content_right":10,"content_bottom":20,"content_left":10,"mobile_content_top":15,"mobile_content_right":15,"mobile_content_bottom":15,"mobile_content_left":15,"mobile_menu_item_height":53,"footer_right":10,"footer_left":20,"menu_item":11,"footer_bottom":30,"widget_right":30,"widget_left":30,"left_sidebar_width":30,"mobile_widget_right":20,"mobile_widget_top":20,"mobile_widget_bottom":20,"mobile_widget_left":20,"widget_top":25,"widget_bottom":25,"content_element_separator":1,"footer_top":10,"footer_widget_container_right":10,"footer_widget_container_left":10,"mobile_footer_widget_container_top":10,"mobile_footer_widget_container_bottom":10,"footer_widget_container_top":10,"footer_widget_container_bottom":10,"mobile_footer_widget_container_right":15,"mobile_footer_widget_container_left":15,"sub_menu_item_height":9,"mobile_header_right":10,"mobile_header_left":10,"mobile_menu_item":29,"sub_menu_width":110,"mobile_header_top":20,"mobile_header_bottom":20,"top_bar_right":10,"top_bar_left":30,"top_bar_top":8,"top_bar_bottom":8},"generate_menu_plus_settings":{"mobile_header":"enable","mobile_header_branding":"title","mobile_menu_label":"","mobile_header_logo":"","navigation_as_header":false}}}

Raw CSS

.main-navigation {
	border-top: 1px solid #efefef;
	border-bottom: 1px solid #efefef;
}
code {
	background: #72b1db;
	color: #fafafa;
	padding: 2px;
	border-radius: 3px;
}

img {
	border-radius: 5px;
}
kbd,
pre,
samp {
	font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
	overflow-x: auto;
	margin: 1.5em 0 2em;
	padding: 20px;
	max-width: 100%;
	color: #fafafa;
	font-size: 0.97rem;
	line-height: 1.5em;
	background: #191919;
	border-radius: 3px;
}
blockquote {
	padding: 15px;
	quotes: "\201C""\201D""\2018""\2019";
	font-size: 96%;
	font-style: inherit;
	margin: 0 0 1.18em;
	position: relative;
	border-left: 3px solid #72b1db;
}
/* Dark Mode for GeneratePress*/
@media (prefers-color-scheme: dark) {
	body,
	.page-hero {
		background-color: #121212;
	}
	.entry-content,
	.entry-summary,
	h1,
	h2,
	h3,
	h4,
	.main-title,
	.main-title a,
	.main-title a:hover,
	.main-title a:visited,
	.wp-caption .wp-caption-text,
	br,
	.entry-title a,
	.entry-title a:visited {
		color: hsla(0, 0%, 100%, .75);
	}
	top,
	.generate-back-to-top {
		color: hsla(0, 0%, 100%, .75);
		background-color: #525252;
		text-decoration: none;
	}
	top,
	.generate-back-to-top:hover {
		color: hsla(0, 0%, 100%, .75);
		background-color: #72b1db;
		text-decoration: none;
	}
	.main-navigation {
		border-bottom: 1px solid #333;
		border-top: 1px solid #333;
	}
	code {
		background: #72b1db;
		color: #121212;
		padding: 2px;
		border-radius: 3px;
	}
	img,
	code,
	kbd,
	pre,
	samp,
	blockquote {
		-webkit-filter: grayscale(1);
		filter: grayscale(1);
	}
}

Automatic Dark Mode for WordPress

Update: The Twenty Twenty-One by WordPress comes with color mode switcher. The feature is opt-in and supported in most operating systems, including Android, iOS, macOS, Windows 10, as well as most Linux distributions. If you have Dark Mode enabled, your site will be shown to visitors using a light or dark color scheme, respecting their operating system’s preferences.

So if you’re new to tweaking CSS, you don’t have to follow my guide. You could just install the latest version of Twenty Twenty-One.

But, if you are determined, continue reading this blog post.

Now that prefers-color-scheme is available for modern web browsers, you can use it to enable an automatic dark mode for WordPress websites. It is a CSS media feature used to detect if the user has requested the system to use a light or dark color theme.

Meaning, you can define a dedicated style for each color scheme. And the browser will display the specific color scheme of the website according to the user’s system settings.

The recommended way to use it

@media (prefers-color-scheme: dark) {
body  {
background-color: #121212;color: #fafafa;}}
@media (prefers-color-scheme: light)  {
body {
background-color: #fafafa;color: #121212;}}

Refer to https://developer.mozilla.org/

But I use something straightforward like this

@media (prefers-color-scheme: dark) {
body {
background-color: #121212;color: #fafafa;}}

I prefer this approach since I’m confident with my default color combination.  Take a look at the styling I use for dark mode.

@media (prefers-color-scheme: dark) 
{
body, .page-hero {
background-color: #121212;
}
.entry-content, .entry-summary, h1, h2, h3, h4, .main-title, .main-title a, .main-title a:hover, .main-title a:visited, .wp-caption .wp-caption-text, br, .entry-title a, .entry-title a:visited {
color: hsla(0,0%,100%,.75);
}
top, .generate-back-to-top {
color: hsla(0,0%,100%,.75);
background-color: #525252;
text-decoration:none;
}
top, .generate-back-to-top:hover {
color: hsla(0,0%,100%,.75);
background-color: #72b1db;
text-decoration:none;
}
*.lgc-grid-50:hover {
background: #72b1db;
color: hsla(0,0%,100%,.75);
}
}

I use the GeneratePress framework for WordPress.

How to Implement Dark Mode for WordPress Websites

STEP 1: Understand and take a note of your default style.css or color options. It varies according to the WordPress theme you’re using. Make sure you don’t leave out tiny details such as the color combination for hyperlinks, menu elements, footer, code, blockquote, etc.

STEP 2: Adjust colors. You can add the prefers-color-scheme CSS media feature within style.css or to the additional CSS section of WordPress. Which is accessible via Dashboard → Appearance → Customize → Additional CSS.

BEST PRACTICE: It’s recommended to place @media (prefers-color-scheme: dark) {} right beneath the current set of additional CSS.

Keep in mind that dark theme isn’t just about replacing colors. Don’t use high contrast colors for paragraphs. Adhere to WebAIM guidelines and Google best practices. Good luck!

Tip Me:

Support if you’d like by referring my resume or donating through PayPal or Alipay.

Success: ThinkPad T530 Hackintosh Setup

I know you badly need the ThinkPad T530 EFI folder or Clover configuration file ASAP. Can we start with a backstory though?

Update: I’ve published a new guide to install macOS Catalina on ThinkPad T530.

Back at my ThinkPad T530. I love this beast of a machine. It’s easily capable of handling eGPU (GTX 9604G & 750Ti), and MacOS for work. The device performs similar to a mid-2015 MacBook Pro. Also, note that I don’t prefer Catalina at the moment, so my EFI folder is only applicable to the latest build of Mojave.

So here we go. Don’t forget to fork or star my GitHub repo, it’s your call.

My ThinkPad T530′ Specs: i7 3740QM, 16GB Memory, 256GB SSD + 256GB SSD + 1TB HDD, NVIDIA NVS 5400M (N/A for Hackintosh)

Mighil.com's T530
ThinkPad T530 Boot Screen ~ Clover Bootloader

The Launchpad

ThinkPad T530 Hackintosh Mojave Launchpad
Yeah, iMessage aka Message is working.

The Display Resolution Settings

ThinkPad T530 Hackintosh Display Settings
ThinkPad T530 Hackintosh Display Settings

What Doesn’t Work?

  1. Inbuilt WiFi card.
  2. MiniDP
  3. Fingerprint reader
  4. Card reader.

#README

  • Proceed with caution.
  • EFI folder is N/A for Opencore bootloader. Go ahead though, if you know what you’re doing.
  • EFI-swap recommended. I haven’t tested these settings against the latest version of Clover.
  • The EFI folder is applicable for Vanilla approach and SSD hot-swap (just replace/paste EFI folder – not recommended though.)

Dude, what’s an SSD hot-swap?

It’s a half-arsed practice. This involves installing macOS Mojave on a real MacBook Pro and moving its SSD to the T530 after editing the EFI folder. It’s wise to choose a machine similar to ThinkPad T530 in terms of CPU and screen resolution, eg: mid-2012 MacBook Pro.

Download The EFI folder for ThinkPad T530

Use the BIOS settings as mentioned below.

Disable dGPU: The process is quite simple. Go to BIOS Setup -> Config -> Display and set the Graphics Device as “Integrated Graphics.” Also, disable the OS Detection for NVIDIA Optimus. Make sure it looks like the attached image below. Then, select Save & Exit.

ThinkPad T530 BIOS Display Settings for Hackintosh

Select UEFI Only: Go to BIOS Settings → Startup, select UEFI only.

Disable CSM Support: Do this if the USB doesn’t boot initially. Go to BIOS Settings → Startup, disable CSM support.

T530 BIOS Startup Settings for Hackintosh

ThinkPad T530 macOS Mojave – Vanilla Installation Guide(s)

It doesn’t matter if you own a real Mac or not. I’ll share the installation guide for both macOS and Windows.

How to create a bootable macOS Catalina 10.15 USB install drive? (on macOS)

Step 1: Refer to this guide from 9to5mac

Step 2: Download and install Clover to USB.  Refer to this article for clarity.

Step 3: Install Clover Configurator, and mount the EFI partition. Then replace the EFI folder with the one on my repo.

How to create a bootable macOS Catalina 10.15 USB install drive? (on Windows)

Step 1: Install Transmac on a Windows machine. It has a 15-day trial period and works flawlessly flashing DMG files to USB.

Step 2: Download the macOS 10.14.X with clover dmg file from here or other sources you come across Google SERP.

Step 3: Download the EFI folder in my GitHub repo.

Step 4: Download Clover Configurator for macOS (latest version).

Step 5: Connect a 16 GB USB flash drive.

Step 6: Open Transmac. In the left pane, right-click the USB Drive and select Format Disk for Mac

Again in the left pane, right-click the USB Drive and select Restore with Disk Image. Then select the DMG file I mentioned in (2). The flashing process will take a few minutes depending on the size of .dmg and speed/port of the USB drive.

Step 7: Install DiskGenius.

Step 8: Locate the USB drive in DiskGenius. Delete the EFI folder and replace it with the new EFI folder. Refer to this part of a YouTube video for clarity.

Step 9: Plug the USB drive into the ThinkPad T530 and boot from USB.

Step 10: Format the disk drive to APFS, install macOS Mojave and restart the system.

Step 11: Connect the Hackintosh system to the Internet via LAN cable, USB tethering or a Mac-compatible external WiFi adapter.

Step 12: Download & install Clover Configurator on MacOS. Open EFI partition and copy -> paste the EFI folder once more.

You may use Karabiner-Elements if the keyboard mappings (command and option) are acting up.

ThinkPad T530 Hackintosh Settings for Karabiner Elements
ThinkPad T530 Hackintosh Settings for Karabiner Elements

All the best!