Categories
Development Samuel WordPress

WordPress with Tailwind

This is the first post in a potential series of posts about using WordPress with Tailwind CSS. To start with there is a really great looking repo we can clone down to get us started:

Categories
Fixing Stuff Laravel Samuel

Fixing mix-manifest Error

If you are working in WordPress and see the error message:

Warning: file_get_contents(/file-path/build/mix-manifest.json): failed to open stream: No such file or directory

You can fix this error message with the steps below:

From the root of your project open up the command line and type:

npm install

npm run dev

This will create the build file and the mix-manifest file, and your error should go away.

If you are working in Laravel and see the error message:

The mix manifest does not exist. View:/var/www/html/site-name/resources/views/layouts/app.blad.php

You can fix this with the exact same steps that are listed above 🙂

Categories
Samuel Thoughts

Life Is Good

I was writing another post and ended up clicking back into a few other links on my blog and reading a couple articles where I was pretty down. I just wanted to write this one on here, so that my future self can find it someday and smile.

Life is so great right now, I’m enjoying living at the sister’s house complex so much. Things with Ellen and I are excellent, we are really in the groove. My immediate relatives are all doing really well, and almost all of my close friends are doing great too! Beyond my actual circle of control there are some kinda crazy and potentially worrying developments, but I’m a huge believer in keeping my thoughts within my own circle of control.

I am not a politician, I am not someone who enjoys fighting for all kinds of causes. I’m a someone who enjoys being a good person to everyone I encounter. Controlling what I can actually control. I feel this ends up making a much bigger difference actually improving other peoples lives as well, so it’s a win win.

I personally feel happier and more relaxed, and I’m actually doing more to improve other peoples lives than the people who read every news article and social media post and write screaming posts of their own online, or scream and shout at strangers about their ideas. People are all different, but you can be nice to every person you see. Only on the very rare occasion would you ever have to be mean to someone else, and thats only if they are threatening your life, the life of someone you love, or the life of another person you have determined is just an innocent bystander. In those extremely rare cases it’s fine to be mean and violent with another person. But those are about the only circumstances I can think of where that is ok.

Every other time, be nice to people. Help them out. Tip waiters large tips. Help Stangers when they ask. Always help your friends and family any chance you get. You can live a great and meaningful life following this way.

Categories
Samuel Thoughts

My Mom

My Mom is such a badass, and I really don’t stop enough to appreciate the influence she has had on me. This is just 1 story in a long line of badassity. 

Her father passed away a few years ago.  Before passing he spoke with her and her brother at length about what he wanted to do with his assets.  Due to an error by the company that managed his account, his assets were going to be dispersed incorrectly, totally against his wishes.  In addition to that, her older brother, the executor of her dads will, was just going to disperse the money even though he knew it wasn’t what his dad wanted. He was just going to cave because it was the easy path, and for some reason he does not have a badass bone in his body. Her brother plays live like Patrick Berglud played hockey, extremely soft.

Not my mom tho, instead of just rolling over and accepting it, she sued to stop the disbursement, even though this meant that she would almost surely get less $ because she would have to hire lawyers and prove that the company was in fact negligent with their handling of the will and the inventory they kept of her dads assets. All the while her brother the executor was fine with signing off on the whole thing, leaving my mom to go it totally alone, even though he lives in the state where the entire court case had to be handled, and my mom lives 4 states way.

It’s one thing to know a company is guilty, and a whole other thing to actually win in a lawsuit against that big company’s high powered lawyers. But she goes ahead and does it, the process takes more than 3 years and she just sticks with it, doesn’t back down.  She just found out that the investment company is calling a mediation, and is willing to settle plus pay her attorney fee because they know they are so at fault it’s not even worth their time to fully take the case to trial. 

Such a great example of doing the right thing, even when it might not be beneficial to yourself.  Also a great example of when you stay true to what you know is really right even if it’s not convenient for you, when you do that the universe can often reward you for it. Not every time.  Maybe not even most times.  But when you do the right, and honest thing and then the right and honest outcome happens, there is a deep sense of satisfaction with that. A deep sense of pride, I’m really proud of my mom for doing it.  I really have been so lucky to have gotten to learn, and get to continue learning, from my Mom. She has show me so many lessons of how to be a good person and how to live a honest meaningful life.

Life is so many ways is such a giant lottery. I’d like to thing that no matter what situation I was born into I would have fought my way to success. But my parents really put me in such a great position to succeed. I definitely hit the parents jackpot.

Categories
Samuel Thoughts

Whats On The Other Side Of Dunning Kruger Effect?

Sitting down to think about intelligence, and where you personally fit in the scale of human intelligence in the world is a really intersting thought.

For me this starts with my mind instantly going “ok sooooooo many people are wayyyyyy smarter than I am!”.

And then I slowly start to reason with myself “well ok I mean yes there is a huge swath of the world population that I would be more intelligent than” **

Ok so were at the real stopping point now, for me I realize “there are definitely tons of people smarter than me in the world. But realistically there is also a large amount of people that I am more intelligent than, or at the very least more street smart and book smart than”.

But then the real questions is how do you know where you fit? Am I right in the middle, 49% of people are smarter than me, and 49% of people are dumber than me? How would anyone actually figure this out? I’m aware of IQ tests but I’ve never taken one as they seem completely flawed. How would a hand written paper test truly tell the overall intelligence of a person?

What if the persons emotional intelligence is off the chart and they can build amazing advertisements than resonate with most people because they really know how to read people? Or on the flip side of that equation, what if the person is just amazingly knock your socks off good at Math, but they don’t have the emotional intelligence to interact well with other people? Who is more intelligent in that scenario? Sure raw horsepower intelligence the brilliant math mathematician scores higher. But who will live a more meaningful life?

The person who knows how to read and interact with people will most likely in my view end up leading the more enjoyable and “successful” life. I put the term successful in quotes because it’s such a loaded term, the definition changes for everyone. I do think however that we could agree upon a foundational definition of successful. One core pilliar of life seems to be about happiness.

How much happiness you can bring yourself, and how much happiness you can bring to other people that you love. Another core pillar, which really could probably be combined with happiness is “you must do some good in the world, add something of value to someone other than yourself”.

This differs for everyone, some people extended this circle all the way out to include entire countries, or even the entire population of the world. Other people keep their circle close and try to better their lives, their families lives, and the lives of all their friends and loved ones. In my mind there really is no moral high ground between those two scenarios. The person who wants to help the entire world, that is the way they get joy in their life. That is their calling, so really they are just helping everyone else because it makes them feel good, it stirs their soul. The same things goes for the person helping the people in their immediate circle.

This is also an argument to some degree of quality over quantity. If you dig in and find the proper way to leverage your intelligence and skills to improve your life and the life of people in your close circle of the world, you will most likely have a pretty big impact on those people and really improve their life.

It’s massively hard to try and improve the lives of strangers. It is also often the case seemingly in our society that the people who scream and shout that things are not fair and the government should provide more, those people are not successful. They are getting crushed by the weight of the capitalism “game”. They have not figured out how to play the game, because it is a sad but very true reality – you can take a rich person and make them poor and they will be rich again in 5 years. You can take a poor person and make them rich and they will “most likely” be poor again in 5 years.

So many people know so little about playing this game of capitalism that they scream and shout that the entire game needs to change. One very important caveat is that not everyone starts at the same starting line. If you are born white, and a man, in the US or any major developed country you will need the least amount of effort to win the game. White men are basically starting from the ladies tee’s in golf, it’s important to acknowledge that because we absolutely should be trying to even up that starting line. But beyond that, once the race starts and a person is around 12 years old and starting to form their own thoughts and opinions, that is when you really start taking over the wheel for yourself. And certainly by the time you move out of your parents house you are directly affecting the trajectory of your life with each decision you make.

Do you mistakenly have a child before you are financially stable and cause the rest of your life to be needlessly challenging? If someone wants to have a kid early in life by all means go for it! Just also do it while acknowledging that it is going to be so much harder for you, you are basically choosing to run a race on one leg against everyone else. If on the other hand you choose to get a job and save as much of your income as possible, and then put that income into something like a Vanguard index fund – you are setting your life up to be so much easier/happier/more rewarding and fun. You will also accumulate a surplus of resources that you can share with others and help try to boost them up the ladder of life.

Ok so we definitely rambled off of the main topic a bit there hahaha but the main question I had revolving around in my mind when I started writing this was: how would someone know where they stand in terms of intelligence of the entire population on earth? It seems to be a question that I do not have an answer for in my mind, maybe one will come to me in the future and I can write it down on this blog 🙂

** One thing that really skews this is how amazingly lucky my life has been. I was born in the USA, have 2 loving parents and close family. Went to public school that was at least decent, and then went to a college that was solid as well. But honestly it does feel like school never really had much to do with intelligence and or knowledge. I definitely learned things in school, but more social interactions than actual hard knowledge. I’ve figured out the vast majority of skills on my own or at least doing them my own way”.

Categories
Laravel Samuel

Another Laravel 5.5 -> 6.0 Upgrade

First Error:

When trying to save information on the user profile page, we are getting an error if any of the fields are left blank.

Fix:

In App -> Http -> Kernel.php line 22 we will comment out this:

       /* comment this out because its causing errors anytime someone submits a form with an empty value
        \Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
       end comment */

Second Error:

Once on Laravel 6.0 we needed to jump our version of php because the site would not load with our old version of php 7.2 running. We asked valet to use @php7.4 which caused this error message:

Brew was unable to install [php@7.4]

To Fix:

brew update
brew upgrade php
composer global update
valet install
valet use php@7.4
composer global update

*note if the latest version of valet did not come installed with support for php 7.4 (it did, but if it didn’t) then we could have edited this file:

code ~/.composer/vendor/laravel/valet/cli/Valet/Brew.php

class Brew
{
    const SUPPORTED_PHP_VERSIONS = [
        'php',
        'php@7.4',
        'php@7.3',
        'php@7.2',
        'php@7.1',
        'php@7.0',
        'php@5.6',
        'php73',
        'php72',
        'php71',
        'php70',
        'php56'
    ];

*just add php 7.4 to the top of the list, or whatever version of php you need valet to support.

First Error On Staging Site:

When trying to submit a form we get this error message of “undefined index:secret”

Fix:

Double check that the file config -> services.php has the SparkPost varialbes setup correctly, they should be:

 'sparkpost' => [
        'secret' => env('SPARKPOST_SECRET'),

        // optional guzzle specific configuration
        'guzzle' => [
            'verify' => true,
            'decode_content' => true,

    ],

    'options' => [
    // configure endpoint, if not default
    'endpoint' => env('SPARKPOST_ENDPOINT'),

    // optional Sparkpost API options go here
    'return_path' => 'SendingEmail@verifieddomain.com',
    'options' => [
        'open_tracking' => false,
        'click_tracking' => false,
        'transactional' => true,
    ],
   ],
  ],

*You can also see the full list of install tips and config tips for the package here: https://github.com/vemcogroup/laravel-sparkpost-driver