Dreb Bits

Author: bicidreb

The Year 2020 We Remember

I know 2020 was a very tough year for everybody, and others might even fought more battles (not just the pandemic). Despite all these, I wanted to believe there are silver linings on situation like this and let’s try our best to continue with our life bringing any lessons and experience.

As a way to personally look back last year, I put together this year-end recap with me going over some of the highlights of my 2020.

  • WordCamp Asia 2020 – even though the event got cancelled, there were still a couple of attendees that pushed through flying to Bangkok including fellow organizers. It was fun and memorable meeting them.
  • Pandemic hits, town in lockdown – this is between March to may where our town had to impose an enhanced community quarantine or strict lockdown. This is the beginning of businesses dying particularly in our city and particularly in tourism and entertainment industry. People staying at home including us.
  • I quit at my 5yrs full time job – this was a decision that I didn’t take lightly as I absolutely enjoyed the time in this company, and I believe I’ve grown so much since I joined there. The reasons mainly were — taking a few months break / sabbatical after 5years of work, and pursuing a business that I could run myself which is something that I have been planning to do.
  • Getting Bits Circle up and running – at first I initially wanted to focus to be an agency specializing in WordPress based in the South East Asia (SEA) region, but I am starting to move something into offering products such as SAAS instead, while still helping businesses/individuals build a strong online platform with WordPress.
  • Getting better at cooking – staying at home allowed me to have more time (hence practice) at cooking. However, my partner’s cooking is way better.
  • Papa’s Chronic Kidney Disease – we thought being in a time with pandemic was the worst in 2020 but just when we enter the “-ber” months, my father got ill and diagnosed with CKD stage 5. It was exhausting (in many ways) for my family particularly going in and out of the hospital, and not to mention being admitted/transferred to more than one hospital. But thankfully we made it through, and my father is doing hemodialysis now.
Turning 29

Unboxed in 2020

While we’re at the topic of 2020, I wanted to also remember what I “unboxed” or acquired last year that are meaningful to me or in my work.

Work

  • iPad Air 4th generation – this is totally worth buying especially after I learned how to use iPad as an extended display connecting to my Macbook, a feature Apple calls Sidecar. This is now my 3rd display alongside a Dell monitor.
  • Logitech HD Pro webcam C920
  • Magic Mouse
  • Leather desk mat – I have a small desk right now and I love it that they have a perfect size.
  • WD 1TB NVMe Internal SSD – this is extremely useful as I moved all my development sites here to save space in my Macbook Pro. I use this case.

Home

  • 4-speed Tower fan with remote – I don’t know but it feels like a new world to use a remote for a electric fan despite its electric nature.
  • Aukey car phone holder – I like this!
  • Samsung Series 8 Crystal UHD 55inch Android TV – bought this for my parents for the holiday, and the cost is just a little over my 49inch 4K Sony Smart TV in my apartment. This is hot as there were a couple of people took home this TV before we did. I would say this is an all-around android TV including being used for events as it has great photo + background music feature. We used this TV to flash my niece’s birthday banner while playing kid’s birthday song on loop! If I have a dedicated living room, I would definitely consider buying this, too.
Home Office Setup 2020

I think that’s it. Onwards and upwards to better things in 2021.

Hardening drebbits.com

Apache to Nginx

An Attempt HTTP2
Since I am in upgrading :allthethings: mood, I decided to also use the latest technology in the http world. I stumbled into this guide by deliciousbrain plus other guides for hosting WordPress yourself.

White screen of Death
To enable http2, I needed to upgrade nginx. After upgrading from 1.6.x to 1.10.x, I was greeted with a white screen of death in my WordPress install. Here’s what fixed it:

location ~ \.php$ {
    include /path/to/fastcgi_params;
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
}

The last piece I needed was the fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;

Let’s Encrypt!

After several attempts to install let’s encrypt, I finally made it after migrating over Nginx + PHP-FPM stack.

Jetpack Issues

If you ever read this post and you happen to have a suggestion in mind, please drop a comment down below 👇🏻

Twenty Six

I just turned 26 last June 5. As far as I can remember, it’s my first time celebrating with two cakes. I’ve always been thankful of my family and to a couple of friends that celebrated with me. I reflected about my life thus far and—although I still feel, always will be, there’s a long and winding road ahead of me—I’m positive it’s going to be exciting, worth the pain, time and effort. But there are already so much to be thankful for especially how my career at 10up allows me to explore and accomplish things that I haven’t imagined before.

A Brief Reunion with WooCommerce

For the past weeks I got the chance to work with WooCommerce (WC) again. Although the plugin has grown so much, including it’s seamless integration with Stripe, I just noticed one (small) thing. Orders shouldn’t be under WC in the admin menu.

Current menu structure is this:

 

In my mind it should introduce order as it’s own parent menu and separate all WC configuration related items:

I wouldn’t mind few menus popping out there when WC is installed. It’s all about the accessibility of managing my eCommerce store anyway.

First Day of Training

My first day of 🏸 (Badminton)  training, and boy, i feel like i have a body of 50year old me without so much physical activities. I’m a bit frustrated as my body couldn’t catch up with my mind.

I thought I knew the basics of the footworks but it’s way more strenous than I imagined, or maybe because of the lack of adrenaline-induced activities for years. This is the real deal and isn’t just a simple Google search.

At the end of the practice, I’ve observed some say ‘sorry’ excessively (I do sometimes) where in fact we are in practice and failures are expected. I guess it is because we thought we’re expected to perfect everything. This unconsious idea of being perfect. Otherwise someone will be disappointed, but it’s just all in our head. We’re so good at overthinking. I for one.

DDI x WordPress Davao

To kickoff my year, our local WordPress group was invited to give a talk-workshop to #teamDDI folks at Davao Digital Influencers Inc. It’s a half day event choke-full of user-facing WordPress know-hows directed to those who aspire to blog with WordPress. There will be a blog post coming up in the official WordPress Davao blog.

Here’s my slide to my talk Supercharge Your Blog with WordPress:

(adding the slides URL here soon)

References

Here are the things I mentioned in the talk that reference to plugins and sites:

Fishy Christmas Day

I started this just last year wherein I decided to cook something new during the holiday season. Last year, I tried Escabeche (Ez-ka-be-che a.k.a sweet & sour) with fried Tilapia for Christmas & grilled beef steak on New Year. I thought I did great with Escabeche with no previous experience. But I grilled the steak terribly. In retrospect, I should’ve blog about it when the frustration was still fresh; jot down which contributed to my failure and how to improve next time.

Sweet & Sour Fish Fillet

This Christmas I tried, well, sweet & sour 🐟 (fish) fillet. One trivia about me is I like fish dishes. How did that end? My parents, which are our judges, approved of my dish. Actually, I forced them to speak the truth but they insisted it was good!  I disclosed the lack of salt in the sauce but it was supplemented by the salty crispy mix wrapped around the fish.

🐟

Yet Another Co-working Space?

Since last year, I’ve been itching to fly out somewhere. This time, it’s not about finding my self or escaping from a mistake (yeah, just like the rest of the human race, I ran off before from some very bad decision). But I’ve been looking for a workplace where it could offer me the convenient space to work with an affordable rates for freelancers. I wasn’t able to find one so I started doing a bit of traveling.

Fast-forward and a couple of times I’ve been in and out of the city, I couldn’t still find a space I want to spend my day in and out.  There are a couple of co-working spaces here in Davao and most of them just sprouted recently. But I see a couple of issues from yet another co-worker‘s point of view.

  • Spaces setup aren’t spacious. If it is, it’ll cost you much-much more.
  • Most co-working prices are for SME (small-medium enterprise) folks.
  • Fully-booked spaces.
  • If some exist that I’m not aware of, they don’t market enough. If they don’t market enough, they simply don’t need me/no room for me.
  • Missing a bit of interior flavor and mixed work-and-play.
  • Missing some digital nomad needs.

CYY_6614
A co-working space in Manila. Spacious isn’t it?
Photo from Warehouse Eight

You might ask why not work from home. I got 3 answers for now:

  1. I was working from a studio apartment where I sleep, work, eat (and …sleep again?) all in the same very room. And our house (which where I’m currently staying) isn’t conducive for daily-brain-squeezing-yet-fun-tasks I deal in work.
  2. I always like working with people around—it inspires me when I see them working hard esp. when at one point I see myself slacking/procrastinating, and there’s more to it.
  3. High speed and reliable internet is pretty expensive here. Can be justified when shared with same paid individuals.

I’m here in my room at my parent’s house and it’s been months since I’m back and it’s been months since I’ve been checking out (cheap) flight bookings because of the same drive.

But..

There’s no escaping this time. I’m gonna let myself face it with whatever I have. I don’t want to go home again thinking I’ve got nowhere else to go to work conveniently.

Welcome to WordPress

One of our local WordPress group members asked how to begin and where to start learning WordPress. I thought it was just a simple question. But somehow I looked around and as someone who has a bit of experience with this platform, where would I direct those who are starting out?

If you have a bit of budget for trainings:

My personal bookmarks:

Lastly…

And by the way, welcome to WordPress ❤

Purge Varnish Cache on Save

In case, someone out there trying to figure out how to purge varnish (3.x) cache in your WordPress site when updating a post/page — I’ve dealt with it this week and it’s pretty easy to accomplish it.

Now that we’re talking about purging the cache, I presumed you have varnish configured and all your setup works. To start off, if there’s no definition of purging in your vcl file, you might want to add them — https://www.varnish-cache.org/docs/3.0/tutorial/purging.html. Remember to sudo service varnish restart after modifying the file so the changes will take effect.

Now in your ever lovely WordPress:


/** * Purge Varnish cache on save * * @param int $post_id Post ID. */ function awesome_save_post( $post_id ) { wp_remote_request( esc_url( get_permalink( $post_id ) ), array( 'method' => 'PURGE' ) ); // Or store the response if you'd like to verify it further. } add_action( 'save_post', 'awesome_save_post' );

You can pop that in in your code if you only need to invalidate cache for content. For a verbose invalidation such as commenting or deleting an item and when changing themes, checkout Varnish HTTP Purge that is readily available in WordPress plugin repo.