Categories
Work

Setting up a remote MySQL database with Laravel 5

Using a tutorial on DigitalOcean I successfully migrated a project that was running on a single droplet onto two droplets, a database server (running MySQL 5.7) and a web server ( running PHP 7.2). I’m happy with the outcome but there were a few hurdles I thought I would make a note on.

First, Laravel 5 uses The PHP data objects extension (PDO) to connect to MySQL. In the aforementioned tutorial, MySQL was set up to accept only secure connections. This can be handled in Laravel by adding an options attribute to the database configuration containing some PDO constants. These constants point to the keys that I copied over from the database server after running sudo mysql_ssl_rsa_setup --uid=mysql.

'mysql' => [
    ...
    'options'   => [
        PDO::MYSQL_ATTR_SSL_KEY  => '/path/to/client-key.pem',
        PDO::MYSQL_ATTR_SSL_CERT => '/path/to/client-cert.pem',
        PDO::MYSQL_ATTR_SSL_CA   => '/path/to/ca.pem',
        PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false
    ],
    ...
]

I had to utilize PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false because the database server was refusing a connection. This constant was introduced to overcome a known bug in PHP.

Second, I was experiencing major lag when connecting to the database server. I thought utilizing private IP addresses, instead of public IP addresses, might fix the problem but I did not notice any improvement. Ultimately, I discovered DNS host name lookups was causing my problem.

If you have a very slow DNS and many hosts, you might be able to improve performance either by disabling DNS lookups with --skip-name-resolveMySQL

Since I’m using IP addresses, it made sense to go ahead and disable it in mysql.conf.d as depicted below.

[mysqld]
skip-name-resolve

After learning those additional steps, I have a working remote MySQL set up. On to the next task!

Categories
Disability

Airbnb’s commitment to accessibility and what it means for people with disabilities

Waiting for new technologies to include the disabled community is like waiting for a great PlayStation or Xbox game to be ported to PC. At some point you give up until years later when you are delightfully surprised and grateful for something you thought would never happen. That’s what it’s been like waiting for online marketplaces that offer the “sharing economy” to include accessible short-term lodging.

The problem up until now wasn’t that there were not any accessible short-term lodging options in these marketplaces. The problem was determining which ones were accessible and which were not. A disabled person cannot book their vacation’s accommodations based on hope that it will all work out; it rarely does. Enter Airbnb to the rescue.

I learned about Airbnb in its early years, mid 2010, but was disappointed to find that it was not possible to determine if the place was wheelchair accessible.  The excitement over discovering the hospitality service quickly faded. Today, I discovered that has recently changed.

On March 15, 2018, Airbnb announced new features and accessibility filters for people with disabilities. The discovery of these new features and filters breeds a sort of freedom. The kind of freedom one experiences when they regain mobility using a wheelchair for the first time after an injury. The kind of freedom when one gets adaptive hand controls and gets their license back. The kind of freedom money provides in this world.

This new option for travelers with disabilities opens the door to lower-cost options and unique experiences. Two characteristics that are usually mutually exclusive. With that said, I’m excited to see how Airbnb plays into my next accessible vacation.

Categories
Uncategorized

Flat illustration of an apple to keep the doodle crave at bay

Reigniting the joy of drawing from when I was younger, I realized I needed to get back to basics. This flat illustration of an apple was drawn in Adobe Illustrator using a photo from Google images as reference

I was inspired by the video, Any Idiot Can Learn to Draw, where Mattias Pilhede noted that reference material is important until repetition creates muscle memory. Perhaps that last part is less important for a quadriplegic. The important part is about letting go of our preconceptions about what something is.

This is called symbol drawing. It means you need to let go of what you see in your head when someone tells you to draw a hand, an eye, or a human being. Instead draw what you see with your own eyes.  Next time you draw an eye, try to let go of all preconceived ideas of what an eye looks like.

Not knowing what something looks like adds to the predisposition that you can’t draw. It’s all about perspective. An important aspect of drawing. Reference material helps you gain new perspective and expand your ability to draw.

Categories
Illustration

Weekend doodle #1 using the shape tool with circles

My focus was to improve my understanding of the shape tool and use only circles with equal axes.

About my doodles

Weekend doodles are my attempt to improve my illustration skills both on the creative front and the technical side of Adobe Illustrator. All doodles are created on the computer start to finish.

Categories
Illustration

First tablet/pen doodle

Categories
Life

Fan Pier, Boston

Categories
Illustration Work

Designing My Logo

I spent the last few days playing with logo concepts in Adobe Illustrator; in lieu of writing on the blog. I came up with several concepts that gradually led to a logo I’m very happy with. I’ll briefly walk you through the major logo concepts I created.

It’s important to understand that I didn’t just come up with these ideas out of thin air. Each step and idea led me to the next.

The first ideas you’ll see revolve around another personal domain of mine where Lewis was the only part of the domain name that was a personal identifier. Designing a logo for this first domain, my online identity, showed me that branding myself under the domain wasn’t the right path.

early-concepts

My approach above was to utilize the first letter of my last name in the design. I ultimately moved past these concepts because I felt my identity was lacking. It also convinced me that I needed a new domain.

After I purchased this domain, I started playing with my initials. The next image shows a logo concept using basic squares. Once I could see the possibilities, I refined the concept so that I could visualize it better.

second-third-concepts

Once I was able to visualize the idea above, I started toying with the D because I felt it was too boxy. Once I rounded the D below, I realized it might look good using negative space.

final-concepts

I watched a fair bit of TV when I was younger and one of my favorite channels was USA. I think I like the results of my logo conquest because it reminds me of the USA logo. More importantly, it represents me. You can see the final version below.

markdlewis_com-logo

My next task for this website is to create a header using the new logo. Hope you like it. Let me know what you think in the comment section below.

Categories
Work

The Worst Client in the World

The worst client in the world is yourself. When I take on personal projects, this website for example, I find myself to be the worst client. I’m not easy to impress.

I would like to design a logo for this website. I have no idea what I want. When I find something that I think might work, I’ll love it for a week or two and then discover another approach that I fall in love with. That’s when you know you haven’t found the right approach yet.

Working for yourself, when you are the client, is the hardest job in the world. Deadliest Catch has nothing on me; I even ride on a steel horse.

I will share my workflow and the thought process behind each idea.

Categories
Illustration Work

My Workflow in Adobe Illustrator

One of my first creative interests was drawing. I would look at Disney characters in books and then try to draw them myself. I wasn’t great, but I wasn’t bad either. I actually came across some of the characters I drew not too long ago and was impressed by my younger self. I also really enjoyed it.

I still like to express my creativity today. Not having the use of my hands makes drawing less fun with a paper and pencil. Nowadays, I enjoy opening up Adobe Illustrator. I always see advice on the Internet about getting your ideas down on paper with a pencil first. It’s a boring argument for me.

Starting your design in Adobe Illustrator isn’t easier, but my choices are limited. One trick that I have been doing is a trick that I Just saw mentioned by Aaron Draplin in his Skillshare video Aaron Draplin on Working Efficiently and Illustrator – Vectors Are Free. A short video with great advice.

The idea is that you duplicate your work after each change. It gives a visual reference to previous ideas and allows you to go back and start again from a previous iteration. He does a good job of showing this approach in the video.

For me, I have found that this approach helps replace the, “jot it down with paper and pencil first,” advice preached by so many gurus.

Categories
Work

Clutter & Chaos

I’m always surprised by how good it feels to clean and de-clutter. I’m also surprised at how easily it is for chaos to take over and clutter everything back up. It’s a constant battle, but one well worth fighting.

I cleaned up my computer’s desktop today and found that I did not need 95% of what I kept. Having that clean desktop in the background directly impacts my productivity positively.

Like my computer desktop, I also like to keep my physical desktop clean. It too translates to better productivity. Without clutter, my mind is less distracted and I’m more easily able to focus on what I’m doing.

My wife on the other hand might argue that a space should have a lot of personality. Unfortunately, with regards to desks, this makes the space vulnerable to clutter and chaos.

When in doubt, keep it simple and clean to avoid inviting chaos.