Categories
Fixing Stuff Laravel Php Storm Samuel

Fixing Laravel Valet Error

Sooooo we needed to jump our local environment from PHP 7.4 to PHP 8.1 in order to work on a different project.

We started by running the command:

Valet use php@8.1

That provided the following error:

Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.1.0". You are running 7.4.27. in /Users/sam/.composer/vendor/composer/platform_check.php on line 25

To fix this issue we ran:

brew link php

This command resulted in:

brew link php
Unlinking /usr/local/Cellar/php@7.4/7.4.27.reinstall... 25 symlinks removed.
Linking /usr/local/Cellar/php/8.1.2.reinstall... 24 symlinks created.

From there we could run “valet use php 8.2” and our new project was happy. This post was also super helpful, it provides solutions for a few other versions oh PHP so if anyone else out there is stuck you can try the link below:

https://dev.to/arielmejiadev/switch-to-older-php-versions-with-laravel-valet-33ph

Categories
Fixing Stuff Samuel

Video Editing

We needed to open a .AVI file on our mac computer. This video showed perfectly how to do it: https://www.youtube.com/watch?v=Q0-MAlLkL8A

We then needed to zoom in on a particular spot of the video, and this showed us how to do that: https://www.youtube.com/watch?v=f-Uaz4NyOXU

Categories
Laravel Samuel

Setting up Forge & Envoyer

These are shorthand notes for setting up Forge & Envoyer

Forge:

The first thing we need to do is create the account on Forge. Since we are using Envoyer we need to update the root path, we should also select use Isolation and then type in our domain name. The screen should look like this

Just add our actual domain and then hit add

From there, its time to activate SSL. The domain must be pointed to forge for this to work, so make sure the A record of the domain name is pointing to the forge machine. Click “let’s Encrypt” then type click install.

Now its time to jump over to Envoyer to finish deploying the site:

Envoyer:

  • Hit the Add new project button.
  • Type Live – Site Name
  • Copy username and repo name
  • Copy branch name
  • Click Save project -> then click into the project
  • Click the Server tab, then click Add server
  • Type the Name
  • Copy public IP address from Forge & Enter
  • Connect with port 22
  • connect as the isolated username
  • Select the PHP version we used on Forge
  • Copy the project root path from Forge commands page
  • Leave Blank the check box for reload FPM after deployments
  • Save server, then copy SSH key from Envoyer and add to forge for the isolated user -> test connection
  • Click Manage Environment, copy the .ENV contents into screen and hit save

Setup Deployment Hooks for NPM Install & Run Prod, as well as Clear & Update Cache. The code in these files should look like:

cd {{release}}

npm ci
npm run prod


cd {{release}}

php artisan cache:clear
php artisan view:clear
php artisan config:clear

php artisan config:cache
php artisan route:cache
php artisan view:cache

Finally drag/drop the deployment hooks so that they run before the new release is activated, it will look like this

Categories
Samuel Thoughts

The Daily Routine

This post is me taking a stab at outlining a daily routine that feels really good to me right now. To help my mind out, I’m just going to walk through the day describing it, so I can remember what should be in the day. Then at the end I’ll summarize it for myself, and print that out to keep it handy in case I ever find myself early in the morning forgetting what to do – but have to be careful with that part, because if I’m forcing myself to do a routine that I don’t enjoy or doesn’t feel natural, that’s not good. When that happens for too many days in a row then it’s time to adjust the routine. To do that, just look for the flame. It’s possible you might need to take a puff of the pax in the early morning to find the flame. But that’s also for sure not a requirement. Really just depends how well I can calm my mind and focus. Regardless, couple puffs of the pax and I will have basically 100% control of my mind and I can point myself in whatever direction feels right, and basically I can quickly see/feel the flame floating over an idea, kinda how in Zelda the little flame floated over Linxx, its a lot like that and whatever idea that flame is floating over, that activity will feel 100% natural to go do. So basically change things up if I’m ever forcing going through the motions of my routine for too many days in a row – I’m not sure how many days really, but I know it when I see it/feel it.

Waking up: no alarm just telling myself in my mind to wake up at 7:04 a.m. ish before going to sleep last night. That usually works like 90% of the time, and I mean I feel like if I do end up sleeping longer that’s what my body needed anyway. Worst case Ellen will wake me up in time for morning coffee club.

Put on some gym clothes, find my nice running shoes that I love, put Airpods in – it’s life changing to put on noise canceling headphones, and play an album from an artist I love, while also mixing any random songs that come into my head into the song que. That really improves the start to my day, it wakes me up so well!

Next thing usually head into the kitchen, drink water with electrolytes added in, dance around a bit in the living room – not necessarily dancing to the music. Sometimes just do the dance that the titan’s do when they enter the football stadium in remember the titans, or maybe do the Mcconaughey chest bump, or maybe practice self defense moves, or stretch/yoga – really just do whatever movement feels good. Once done with the water, head out and walk or run the infinity loop.

The infinity loop is a place about 100 yards from my house. There is a pond with a couple nice water fountains. Running half of the loop takes exactly 2:56 seconds, that’s my personal record to date at least. Most of the time, walk it though. If I’m out there early enough, the Sun is just coming up over the trees on the east side, and walking on that first curve, walking into the early morning Sun that is warm but not too hot – warms me up so nicely, and feels so nice. It’s especially enjoyable listing to the right song for that day in that moment. With the right song on, all of the leaves and grass are sharper, the world just feels a bit magical or maybe dreamlike is the best description. The right song just kinda changes over time, but lately it’s been where I am, by Maggie Rodgers.

The intro beat just jolts life into me. It wakes my mind up for some reason, it pumps me up basically. Then the line,

I’ve found a reason to wake up, coffee in my cup – start a new day!

That line makes me think about Nara. I think about how that line fits so well. It’s like Nara creates a little jolt in my mind – ok I need to get serious here, she is really depending on me. And then also it’s such a cool thought to think about how happy she makes Ellen, Me, Gina, Kent, Mary, & Shannon – also my parents as well but they have so many nieces/nephews – I wonder if the 2nd kid will cause as much join for all of Ellen’s family? Fingers crossed!

It all works out in the end, wherever you go – thats where I am, boulders turn into sand, wherever you go that’s where I am

That line makes me feel 10 feet tall and invincible. I feel that everything will work for me today, no matter what I try. I think about Al, Andrew, Brian Pohl, Enrique & Micah – wherever we go, boulders turn into sand, it all works out in the end. Most of these guys, we have wanted to work togather for the past 11+ years, we have tried to do it several different times and had some success but ultimately failed to realize our full vision for various reasons. But it all works out in the end, and I think this is the part where it starts to work out. We were missing a couple important puzzle pieces that we now have in the group. We have the business model we need, we have the crew that we need, we are getting the development path mapped out really well – and it doesn’t look like there are any fatal technical hurdles we can’t cross, we are about 70% of the way towards launching our first test site & we have made really significant progress on the total system! We have a big list of clients lined up on a waitlist to build for, and we have a salesmen in the group who is literally chomping at the bit to be turned loose and start selling the system.

Once I’m done with the walk, do hangs + pullups or dips on the outdoor pullup bar then it’s feels soooo nice to jump onto the rowing machine and row 5k, then do 20 minutes of yoga (two 10 minute videos, the hips and hamstring ones that I love). Also feels good even with just one stretch video.

From there feels great to hop in the shower, take my electric toothbrush and water flosser, put the shower water on super cold, it feels so nice because I’m sweating like crazy from the rower, put hot water in the water flosser – then brush and floss my teeth. The hot water runs down the front of my body and feels super nice in contrast to the cold water. It’s important to get my whole head under the cold water, that feels way different, and to stick my face fully into the shower stream holding my breath. Really feels good to do that in the morning, wakes me up a bit more maybe. Then once finished with brushing/flossing – turn the water onto normal hot temperature, and use the weird green rubber small bubbly thing Ellen bought, put soap on it and scrub my whole body. It feels really nice on my skin to do that. Don’t put on any shampoo or conditioner. When playing hockey will shampoo hair after every game, otherwise would smell horrible hahah – but when not playing hockey like right now in the summer, it could be multiple months before I shampoo my hear. And it feels great, my hair honestly does not need shampoo (maybe my hair/scalp is weird?)

Jump out of the shower, wipe the glass door down – try to think and reflect/ enjoy the memory of building that shower. It’s so fun to think about running all the water lines with my Dad, or sodering the shower valves, or taking apart the shower cartridge when it leaked during the pressure test, and realizing the part was defective and getting manufacture to send new one for free, or cutting & hanging the waterproof shower board with Enrique, or waterproofing it with the overkill Schluter Kerdi membrane, and the Ardex 8+9 paint on membrane. The shower seriously should not leak for it’s whole life. Also take notice of the small defects, the tile in the upper right that is not flush with the tiles around it, or the shower trim, or the small little slump near the drain that makes the water take a little longer to drain than if it was perfectly flush. I really learned a lot making this shower, could 100% make a nearly perfect shower next time. Regardless of the small defects, its super cool this shower now exists in my world every day! Also remember back to using that freaking Dry cut tile saw, or that really neat tile cutter from Italy – researching and finding those tools helped improve the end result sooo much!

Once done with the shower, set the bathroom vent to run for 2 hours on the timer – think back to running all of the electrical lines with uncle Steve! That was so much fun + it really helps keep moisture out of the shower, should never have any mould – So glad we wired those timer switches in!

Put clothes on for the day, usually just gym shorts. Typically don’t put on any socks, sometimes it feels nice to just have bare feet on the wood/ground.

In an ideal world, the time will now be about 8:15 or 8:20. Go pour myself a coffee from the fridge, and sit down on the porch drinking with coffee club. Usually that is Ellen, Shannon, Mom & Dad. It’s something we have just recently started, and its really nice! It gives a little commitment to start the day – it’s no big deal if I miss it, and I mean everyone misses from time to time – but it is a nice little activity to look forward to every morning, and its outside. And I like that it’s with our parents/Aunt. So that is the best case, but if I slept in – which is totally fine to do, gotta do what feels right for the body, then do this different iteration.

2nd version: So if I’ve slept in, then coffee club will be the first thing I’m doing in the day, more or less. I’ll have workout clothes and my favorite running shoes on. And will join morning coffee club, but I wont stay as long. If its the first thing, then I’ll only stay for about 15 minutes. If I’ve already finished my workout and shower, I’ll typically stay for 45 minutes or more. I just have a goal to stop and be working by 10:00 a.m. It’s really nice to sit and chill with everyone, and we also kinda game plan around about the day.

From there, honestly I kinda just feel like the day is free to do what I want to. Maybe this needs more thought, and the day needs to be more planned out. But I basically just work from 10:00 a.m. – 5 or 6 p.m. There are breaks in the day. Lunch around 1 ish (which technically a lot of time that is the first time I’m eating any food, so its really more like breakfast). Then sometimes a nap around 2:30 ish for about 20 minutes. I don’t really set a timer anymore, just sleep and end up waking up 10 – 30 minutes later and feel a lot better! Usually feel pretty refreshed

To summarize the daily routine then:

Wake up when body feels like it. Ideal is 7:04 a.m. – latest is 8:15. Ellen waking me up then if I’m not already up works really well, she is up by 8:15 99% of the time.

If up at 7:05, put exercise clothes and my favorite runnings shoes, put on noise canceling headphones, drink electrolyte water & dance/move around, put on Maggie Rodgers “This is Maggie Rodgers Spotify”. Let it play love you for a long time, Light on, and then when “That’s where I am” comes on as the 3rd track, try to time it so that I’m walking around that first bend of the infinity loop when that song comes on. If I don’t time it perfect, just cheat it and start the song over when I get there haha. After walking the loop run for a PR if feel like it. Come home, hangs + pullups on the outdoor bar -> workout – consult my Workout Log for planned exercise, but if it feels right to do something different then do that, like if I feel really overly tired or stiff, do yoga/stretching instead of lifting weights or rowing. But try to stick to the plan, don’t just bitch out, but don’t push yourself too overly hard (it’s not productive to try and get a PR every time! Restraining myself will actually do a better job, get it out of your head that you should always be pushing 100% of the time!). Don’t forget to do J-curl’s on the triangle foam pad things to as part of stretching after workout.

Shower, teeth detail, clothes on – start the day!

Option #2: If not up at at 7:05, start the day with coffee club. Stay till around 8:45 and then go through the same exercise, stretch, shower process. No matter what, I end up staring work around 10:00 a.m. – which feels right.

Categories
Samuel Thoughts

Starting Line

I know I’m supposed to be a part of a really big and impactful company. If I’m 100% honest with myself, I feel like I’m supposed to be big part of creating that company. And that is exactly what is happening. This is something that I’m supposed to do – that voice of the universe tells me that all the time. I know I don’t have to listen to it, I don’t have to do it, I don’t owe the world anything. I don’t have to life a certain lifestyle. But I have to acknowledge that the world would be a better place if we could bend reality a little bit with the business model of this company. It’s like a big improvement on capitalism – maybe it would push us closer as a society towards having an even more fair economic system. I think capitalism is much better than any alternative so far in history, when there is a group of people as big and diverse as there are in the US. In smaller groups of people with less diversity, that group can agree on more things and more compassionate forms of government seem to work ok sometimes.

The main flaw in the capitalist system is that not everyone starts on the same starting line. Some people start laps ahead, and it is correct to use a sport analogy here. Capitalism is a giant game, and everyone plays the game of capitalism – no matter what – we are all forced to play the game. Some people stick their head in the sand and don’t acknowledge they are playing, most people don’t even end up learning many of the rules, they just get up to the plate and watch 3 fastballs come right down the middle and someone yells your out and they walk back to the bench fuming mad about how unfair the game is (they have no idea why they even struck out up at the plate). Some people get beat down by starting so far back that it feels 100% impossible to make any progress, which is totally legit – that would be amazingly hard! Anytime I see someone who has pulled themselves and their family out of poverty I get so happy, and I’m majorly impressed with that person and the effort and stubbornness they have. I really admin anyone who has done that.

If we can get everyone to start at the same starting line, which would absolutely take generations, but if we can do that – that would be really amazing. Our country would be soooo much better off! I think we can help to do that a little bit with this business model, if we stay true to it. It’s very easy to say what we will do with money before we have that big pile of money sitting there – I’m as close to 100% confidence as I could be that we will stick true though.

And then after that, if we have enough resources to focus on the charity aspect, like if this business model can also fund the charity goals we have, we could could really make an impact. It’s hard to know how much of an impact, but I honestly have the confidence of someone who is new to an activity – so over confidence for sure haha, but thats fine because I feel like we could make a massive impact, and even if we end up only making a smaller impact, it doesn’t matter – we will be bending the arc of society in the right direction and someone else will come along behind us and keep things moving until we get to where society allows for everyone to start on the same starting line.

Categories
Laravel Samuel

Migrate Refresh & Seed With Envoyer

We have been test driving Envoyer and ran into a bit of a stumbling block this week. We have a staging site that we setup to auto deploy with Envoyer. As part of our auto deploy we wanted to run

php artisan migrate:fresh --force --seed

To start we added that code to the Envoyer deployment hook section but it kept spitting out this error when it executed

Could not open input file: artisan

So we realized ok we must be in the wrong location on the server when Envoyer executes this command. It took a little bit of trial and error but we got it working with this:

cd ~/home-directory/current

php artisan migrate:fresh --force --seed

**Replace home-directory above with your real path, so for us we got this by SSHing into the server, and then navigating to the public web directory. If you are using forge this will be super easy as it will be one folder typically named with the URL of your site