Categories
Fixing Stuff Mac Samuel

Getting Local ENV Setup To Run Old Site

First issue:

Library not loaded: /usr/local/opt/openldap/lib/libldap-2.5.0.dylib
  Referenced from: /usr/local/Cellar/php@7.3/7.3.33/bin/php

To fix this we ran:

Just do this:

brew tap shivammathur/php
brew link --overwrite --force php

done....
brew unlink php@8.1
brew link php@7.4 
brew services restart --all
composer global update
valet use php@7.4
    *this should confirm that valet is set to use php 7.4

***If we want to go farther back and use PHP7.3 or older, we have to do the following:

brew tap shivammathur/php
brew install shivammathur/php/php@7.3
brew unlink php@7.4
brew link php@7.3  
brew services restart --all
composer global update
valet use php@7.3  
     *this should confirm that valet is set to use php 7.3

***If you pull up a PHP info page in the browser and its still showing as using PHP 8.1, you can use this command to force the change***

valet use php@7.3 --force
Categories
Fixing Stuff Laravel Mac Samuel

Fixing Dev Environment After Monterey Update

Ok so had a very strange issue come up after upgrading my Macbook to macOS Monterey. To start with I was getting this error anytime I typed php -v on the command line:

zsh: command not found: php

Which obviously that is strange because php is 100% installed on my system. To Fix this we ran:

brew upgrade php

composer global update valet use php@8.1

Everything ran correctly and I now had php 8.1 installed. When I typed php -v it returned my version of php on the command line as it should, but then we ran into a new issue. I pulled up the site I had been working on before this Monterey debacle and got this error message:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.26. in /Users/sam/repos/local-eats-laravel/vendor/composer/platform_check.php on line 24

Ummmm…. what the fuck, over? I’ve got 8.1 installed, it returns from the command line… but my web browser is still stuck using this old outdated php 7.4 (that’s strange) up until this point Valet had always properly taken care of syncing both versions of php. So now we went on the hunt to fix this issue, turns out – easy fix. Just run:

rm ~/.config/valet/valet.sock
valet restart 

This removed a configuration file for Laravel Valet – that I guess was stuck using the old php 7.4 for some reason….. once valet restarted it picked up on the php 8.1 change and were good to go

Categories
Fixing Stuff Laravel Samuel

Fixing NPM Run Watch Error

Today we are getting this error on a Laravel site:

To fix this issue we are going to do the following:

  • delete the node_modules folder
  • delete package-lock.json file
  • run: npm install
  • open the .env file and make sure our environments line up with the script we are trying to run- IE make sure “npm watch” is set to work with the environment we are currently on. In this case “npm dev” was set to local and “npm watch” was set to staging.
  • Run: npm run dev locally to confirm it works.
  • Run: npm run watch on the staging site to confirm it works

Now we need to add a migration to get a portion of the site working with a new DB column, for this we will run:

  • php artisan make:migration create_payment_status_column
  • inside of the migration file we will add:
class CreatePaymentStatusColumn extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('companies', function (Blueprint $table) {
            $table->enum('payment_status',['trail', 'active', 'inactive'])->default('trail');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        $table->dropColumn('payment_status');
    }
}
Categories
Fixing Stuff Phase Two Samuel Sisters House

Tips For Tiling A Shower

These expands upon my earlier post laying out a full shopping list for tiling a shower .

Tiling A Tub Surround:

Start By Setting your lazer level up on a jack pole like this one:

Set the lazer up so that the line is slightly below the first tile
Set the lazer up so that the line is slightly below the first tile

Start with the back wall so that your grout joints are not visible from outside the shower. Take the First tile and use the lazer to mark it for cutting:

Flip the tile upside down so you are marking the bottom of the tile. Mark on either end where along the lazer line.

Next transfer the line to the front of the tile:

Take a tile pen and mark on the sides and then use a T square to draw a full line on the front of the tile

Cut the tile along the line:

Helpful tips & Tricks:

Categories
Fixing Stuff Samuel Thoughts

Everyone’s Political Views Are Hypocritical

This is just a small sample list but it covers most people:

“the government should be limited and as small as possible”

“oh well except when a women wants to choose what goes on in her own body, then the government should step in there”

“the prohibition on drugs is racists and does not work, prohibitions never work”

“we need to outlaw guns! No one should be able to buy automatic weapons, just put a prohibition on them and gun violence will stop”

“our government needs to lower spending and not run deficits. We must cut expenses and balance the budget “

“We should have a blank check for military spending and fighting overseas. No cost is too high to keep our boys safe.”

  • the not as obvious hypocrisy here is two part. 1 people saying we need to cut the social safety net here in the US, while also saying we need to send citizens off to war and risk their lives. And in the next breath saying not cost is too high to keep those boys safe during war. It’s just idiotic. It’s too expensive to help US citizens out when they are living in the US, but let’s stir up a bunch of wars and waste unimaginable amounts of $ blowing things up, which literally adds 0 to the planet. Objectively building a bomb and then blowing it up and potentially also killing people with it ads at best 0 value to the world, and at worst a very net negative. We do live in a violent world, and to some degree we have to balance the fact that people will do violence to us unless we are prepared to defend ourselves. There is also a huge gab between having a military to protect ourselves, and having a military that polices the entire world and really if we are honest kills a lot of people and stirs up a lot of trouble. I will admit there is credence to the thought that if the US did not police the world there would be more violence, but at the end of the day I think we could even continue to police the world and do it in a way that was much less about the US exploiting other countries for our gain, and more about the US trying to make the world a better place. We have definitely leaned too far to the side exploiting and it really sucks because we don’t have to be that way. It does feel like it would be extremely hard to stop though. Most of our countries problems would be easy to solve, except that a large part of our population watches tons of misinformation on the news and reads tons of misinformation online. It really would be challenging to effect much change in our current environment.

“if you don’t wear a mask then a private business has the right to refuse to serve you. It’s just like no shoes, no shirt, no service.”

“oh well a private business can’t refuse service to someone on religious grounds, they need to serve everyone equally at all times”

  • the not as obvious hypocrisy here is that people are telling the religious person that their views are wrong and should be suppressed. And to be total fair I obviously see the difference between refusing someone for a safety reason, vs refusing someone for a religious reason. But I’m not religious. Religious people could very well think disobeying their god/religion is dangerous to them. And at the end of the day no one can definitively say whats real and whats not real when it comes to big picture stuff like religion. It is without a doubt 100% possible that religious people could be correct, there could be a god and they could be living the way that god wants humans to live. I find that highly unlikely, but its possible all the same.

Categories
Fixing Stuff Phase Two Samuel Sisters House

Working With My Dad

Do something that feels like play to you but looks like work to others

@naval

Thought about that quote often the past few days working on this old building with my dad, scraping caulking and re-painting these old 1904 model window frames. This kind of work is so enjoyable to me it doesn’t feel like work at all, more like a fun hobby. Add working with my dad into the mix and it’s really something special. Didn’t always have a great relationship with my dad. But he was always there and always showing me what to do, and sometimes what not to do, but still teaching me all the same. Really glad I got to work with him on this building remodel and hopefully get to keep working with him on projects for a long, long time!

Bare Wood
Bare Wood
Concrete Caulking Sill and Window Fame
Primed
Painted