Luke Bouch
Home Archive Photos Replies Also on Micro.blog
  • Experiment: Work Schedule

    After reading this post from Mike Crittenden on experimenting on myself, I decided to run my own experiment this past week.

    I asked my boss if it would be ok if I started work at 7am instead of my usually 8am and then take an extra hour off for lunch. This gave me an hour and I half off for lunch and it was super nice! Not only did it give me a break from siting at a desk all day but it also gave me a chance to get a few things done.

    I’m going to talk to my boss and if he is ok with it, I think I’m going to make this my new schedule.

    → 11:12 PM, Nov 5
  • Choosing the Long Line

    Something interesting happened the other day. I was going through the Chick-fil-a drive-through and there had two lanes. One of the lines had a significant line while the other one had no cars in it. The way it wraps around the building, I could not tell if their where people working both lanes or just the one. And so I wondered, is this second lane open, and if so, why were was no one in that lane. It took me a moment to try to decide what line I should enter.

    It was fascinating, because I chose to enter the line of cars in lane one as opposed to taking the risk of entering lane two and it turning out to be closed. I later approached the area where you place you order and realized both lanes were in fact open. Yet, in fear that I would end up in a lane that was closed, I opted to join the long line and play it safe.

    Just and interesting observation. I’m sure their have been plenty of people that have studied this.

    → 10:35 PM, Oct 15
  • Migrating from Laravel's Token Guard to Sanctum

    In an application I was working on today, I had to migrate from Laravel token authentication to Sanctum. The process went relatively smoothly but just in case someone else has trouble, I thought I would layout the migration process.

    Installing Sanctum

    I’m going to direct you to the official documentation for instructions on installing Sanctum. It’s very straight forward and should be easy for anyone follow.

    Migrating Api Keys

    In this application, we had a ApiUser model to distinguish between regular users and other applications that talk to our api. While Sanctum uses a second table to store the access tokens (personal_access_tokens), with the Laravel token authentication guard, we were storing the token directly on the ApiUser model itself. We did not want to invalidate all of the api keys we already had in the database so migrating them all over to Sanctum’s personal_access_tokens table was essential.

    Following the documentation, I added the HasApiTokens trait to the model I was going to be associating the tokens with. This provides all of the necessary methods and relationships in order to both create tokens for the model and to authenticate the incoming request against the model.

    To migrate the tokens from the old table to the new one was a little bit tricky and I had to do some digging in the source code of Sanctum in order to come up with a solution. You see, we were storing our tokens in plain text in the database, but Sanctum hashes the token before storing them. This meant it was not just as simple as coping the tokens from one table to the next.

    I first tried using the createToken() method the HasApiTokens trait provides. The problem with this is was, it generates the token for you and does not allow you to actually specify you own string to use as the token (which is what I needed to do in order to migrate the old tokens over).

    I was able to dive into the source code for createToken() and realized all it was doing was creating a PersonalAccessToken with a randomly generated string and saving it to the model. I copied and pasted this function and with a little modification, was able to create this migration that would work.

    return new class extends Migration
    {
        public function up()
        {
            ApiUser::all()->each(function (ApiUser $apiUser) {
                $plainTextToken = $apiUser->api_token;
    
                $apiUser->tokens()->create([
                    ‘name’ => ‘Migrated Token’,
                    ‘token’ => hash(‘sha256’, $plainTextToken),
                    ‘abilities’ => [‘*’],
                    ‘expires_at’ => null,
                ]);
            });
        }
    };
    

    Changing the Authentication Middleware

    I had to then instruct Laravel to use Sanctum as opposed to the token guard for authentication to our api. I did a search for ->middleware([‘auth:api’]) and replaced all instances of auth:api with auth:sanctum.

    Updating Tests

    With the all of the tokens successfully migrated over to the personal_access_tokens table and our api.php routes file updated to use the new middleware, the last thing to do was to update all of our tests that were manually passing a bearer token in the authorization header with every request to using this snippet that I found and modified from the documentation: Sanctum::actingAs(ApiUser::factory()->create(), [‘*’]);.

    Conclusion

    In conclusion, migrating to Laravel Sanctum is not as hard as I expect it would be. It’s fairly straight forward with the hardest part being the migration of old api tokens.

    I hope this article will be helpful to you as a guide for the process of migrating to Sanctum.

    → 12:01 PM, Oct 13
  • Overlanding Expo East 2022

    This weekend, I went camping with some friends and my dad and brother. We went to Overland Expo and here are some photos I got from it.

    → 9:05 PM, Oct 9
  • Replacing the Heater Core on my 2001 Jeep Cherokee XJ

    I have had the sneaky suspicion that my heater core on my Jeep has been leaking for a little while now and have been waiting for a good time to replace it. With a camping trip coming up, I finally decided to tackle it. I had read online that it would take roughly 5-10 hours to complete so on Saturday evening, I began the process of completely taking the dash apart.

    It took me Saturday night, most of the day Sunday, and the past several evenings after work to get the job done. And boy was it a big job! I would say I have ~15hrs into it but that also includes flushing out the entire coolant system.

    I’m super glad to have finally have heat that does not result in all the windshield fogging up.

    Oh… and it rain all weekend while I was working outside.

    On a side note, I went ahead and decided to replace the thermostat because I wanted to remove the housing to properly flush out the engine. These Jeep’s take a 180 degree thermostat but it is not uncommon for people to unintentionally, or without knowing better, replace them with a 195 degree and that was the case with my Jeep. Not to mention, some how a o-ring was suck in the thermostat.

    With a freshly flushed coolant system and a new thermostat, the Jeep is staying nice and cool.

    → 9:09 PM, Oct 5
  • Trip to Illinois: Day 03-07

    I was planning on publishing a post for each day of my trip but I have given up on that. Overall, the trip was amazing and I really enjoyed getting to know the people at Wilber.

    → 8:26 PM, Sep 20
  • Trip to Illinois: Day 02

    → 10:51 PM, Sep 16
  • Trip To Illinois: Day 01

    → 7:39 PM, Sep 12
  • L.O.Y.O.

    L.O.Y.O. - Live only you once.

    → 1:47 PM, Aug 17
  • Purchasing a 2001 Jeep Cherokee

    I have been wanting to sell my truck and purchase a Jeep for a while. The lack of four wheel drive has been driving me crazy every time it snows. Not that I have anywhere I need to be; I just want to get out and drive in the snow. My brother purchased a Cherokee XJ last week and it was the motivation I needed to finally decide to make the switch.

    I found a 2000 Jeep Cherokee on Facebook marketplace on Saturday that looked like it was in good condition but was overheating. I thought it was something I could fix myself so my dad, a friend, and I made the hour and a half drive to go look at it.

    When I got there, I quickly realized the Jeep needed way more work than I was willing to put into it. There were several issues in addition to the overheating issue.

    On the way home, I thought I might as well look to see if there was any other Jeeps listed in the area. I found one that was listed back at home, but after contacting the guy, I learned that it was at his girlfriend’s house, which was on the way home. We went to look at it, knowing that it was overpriced.

    When we got there, the starter had gone bad on it and so I was not able to hear it run. After looking at it carefully, my dad and I were able to negotiate them down from $5,500 to $3,500! I tried not to show my excitement and eagerly paid her. That night, at 9pm, I started working on replacing the battery and starter. I got it fixed in just over an hour.

    Over the past few days, I have been doing some light off roading and having a blast! Here are a few photos.

    → 9:16 PM, Aug 9
  • Father-Son Camping Trip 2022

    I got back yesterday from our 17th annual Father-Son camping trip. We all had a lot of fun!

    → 2:08 PM, Jul 17
  • First Day at My New Job

    The power went out this morning so I had to go to Panera to work. It was my first day at my new job. It was a great day!

    → 9:14 PM, May 16
  • First Web Development Job

    I want to share what The LORD has done in my life over the last few days.

    For the past few months, I have been struggling to know where to go with my career. I taught myself Laravel and the TALL stack and I was doing some freelance work. My mom kept suggesting that I get a job working for someone who could mentor me.

    We were discussing my options (going to school, freelancing, or applying for a junior web developer job) on Thursday night after I got back from my job at the church. These conversations were a regular occurrence. We prayed about it that night.

    On Friday around 1 pm, I got a text from my cousin. It was a screenshot of an email he had gotten from Jacob Bennett. It read

    Hey,

    Was looking to talk to your brother Luke but haven’t been able to find a way to get in touch with him. It’s regarding a possible position to work in Laravel at our company https://wilbergroup.com in Illinois, remote position of course. I’ve been watching some of the things he’s been working on, https://sublimeblogs.com/ for example and think he would make a great junior developer! Haven’t had any luck finding him but stumbled across your email and thought maybe you could either forward this to him or send me his email so I can contact him directly.

    Thanks for any help!

    Jake Bennett

    I immediately called my cousin and asked him to forward me the email. I email Jake and told him I was interested and gave him my phone number. He called me a little while later. He asked me a few questions and I walked him through Sublime Blogs.

    Jake said he had been trying to get in contact with me for the past 10 days but he could not find any contact information. (That is something I will need to add to my website.)

    I had an interview with him and his supervisor on Monday. It was a hour and a half and it went very well. They asked me a lot of personal questions and not very many technical ones.

    Later that day, Jake texted me and we setup a time that afternoon for the technical interview. He sent me some of the PHP classes he had written and asked me to read through it and explain what the code did.

    That evening I had an offer in my inbox. This is what my parents and I had been praying about and so I immediately accepted, with the understanding I would need to wrap up other projects.

    It is amazing how God works! The best part about this job is that my supervisors are Christians. I get to work under like-minded people. I’m very excited to start part-time on the 16th and then move to full-time next month.

    It so encouraging when God answers your prayers so clearly!

    → 9:18 AM, May 11
  • Modern Times Summed Up

    “🤔 Modern times summed up in 25 seconds from the Arther PBS show. https://youtu.be/iHrZRJR4igQ” - Zorn

    → 9:35 AM, Apr 27
  • I got tired of stuggling learning VueJS and Nuxt, so I decided to build out my new blog in Jigsaw. It is almost done and I will be moving away from Micro.blog in favor of my new headless cms I’m working on (Sublime blogs).

    I have nothing against Micro.blog but I’m a control freek and I want complete control over the frontend using my static site generator of choice. I’m also trying to cut down on costs.

    → 7:19 PM, Apr 25
  • Today I started working on the marketing site/landing page for Sublime Blogs. I used tailwindui for the navigation and hero section and it turned out pretty good in my opinion. The marketing may need some work but it is a start.

    → 9:20 PM, Apr 24
  • I just spent about four hours working on Sublime Blogs and using the API to build out my blog with NuxtJS. I have been primarily focusing on building out the API. It is coming together well so far.

    → 3:08 PM, Apr 22
  • After purchasing Tailwindui, I went to town redesigning Sublime Blogs. I’m very happy with how things are coming together!

    → 7:11 PM, Apr 20
  • I’m about 2 months out from being able to ship Sublime Blogs. I’m excited 😃

    I still need to work on pricing though 🤔 How does $2/month per site sound? Maybe that includes a certain amount of storage for photos?

    → 8:34 AM, Apr 20
  • I started researching Agile and Scrum project management. I’m hoping to start implementing it with some of my client and personal projects.

    → 9:14 PM, Apr 18
  • My brother just got his motorcycle license so my dad, brother, and I went for a ride. That was a lot of fun!

    → 9:07 PM, Apr 17
  • I sold my Honda Nighthawk today. Now I’m down to one bike and a truck.

    → 9:18 PM, Apr 16
  • I want to be good at designing user interfaces, but sadly no matter how hard I try, it never ends up looking the way I want it to. So… I purchased Tailwindui. We will see if it helps.

    Now to redesign Sublime Blogs.

    → 10:20 PM, Apr 15
  • I have a strong appreciation for great UI. I find that the apps I enjoy using are also the ones that stick (like Things 3, Notion, etc.) If the UI is mediocre, I probably won’t adopt it into my workflow.

    I guess that just sets the bar a little higher more my own apps 😬

    → 4:34 PM, Apr 13
  • I downloaded the beta of 1Password 8 for iOS. The UI is amazing!

    → 4:29 PM, Apr 13
  • Time to do taxes 😞. One of the disadvantages of being self-employed is you get to watch all you money leave you all at once… every April.

    → 4:52 PM, Apr 12
  • I upgraded TPP from Laravel 8 to Laravel 9! It took about an hour to go through and update all of my dependencies, update the PHP version on the server, and change the GitHub CI/CD action to run PHP 8.1.

    This was my first time every upgrading Laravel. It was not too hard. Great job Taylor and the Laravel team!

    → 5:09 PM, Apr 9
  • I’m back working on a project (TPP) I was told to take a break on a few months ago. It’s a web app built with Laravel, AlpineJS, Livewire, and Tailwindcss. It is actually the first real web app I ever built.

    Prior to TPP, I had only just begun learning PHP and trying to build a web app (Open Outreach) in vanilla PHP. I did not even know frameworks were a thing. I just had a php file for every page and would manually query the database with SQL. To say the least, Open Outreach did not get very far.

    I made some mistakes on TPP but I’m a much better developer now and it’s fun ripping out old components and rebuilding things. I have already improved things drastically in just a few hours.

    Currently working on redesigning the whole UI. I will keep posting update periodically.

    → 9:47 PM, Apr 8
  • I spent the longest time trying to get Laravel Nova to work. Finally figured out my dumb mistake. I had setup a policy for the model I was trying to create a resource for and I had set the viewAny function to return false. Now I have it set to check for the viewNova gate. All fixed now 👍

    → 9:19 PM, Apr 7
  • Today I purchased an unlimited license to Laravel Nova because it’s currently $100 off. I have never used it until today and it’s convenient for creating quick admin dashboards.

    → 9:31 PM, Apr 6
  • I finally got my new clutch installed in my BMW f650gs. I’m enjoying riding it!

    → 10:25 PM, Apr 2
  • I need to decide on a pricing model for Sublime Blogs. I think most features are going to be free and only image hosting will cost. Do I charge per user or per site?

    → 6:53 PM, Mar 31
  • Sublime Blogs is up and running! I still have a lot more to do but the basics are there and I’m able to start testing things. Now I need to be able to have the option to import from Wordpress.

    → 3:08 PM, Mar 30
  • I fixed the bug I found on the post edit page on Sublime Blogs. It was kinda a dumb mistake. Now everything is working!

    → 8:18 AM, Mar 29
  • Last night I deployed Sublime Blogs to production to test everything out as it stands. The markdown editor completely broke so I got it working locally. Still no luck on production. I’m not getting any error codes or logs either. I will take a look at it tomorrow and see if I can figure out the issue.

    → 5:13 PM, Mar 27
  • Oh I forgot about subscription billing. I will need to build that out for Sublime Blogs.

    → 9:22 PM, Mar 26
  • I have almost all the main components for Sublime Blogs done. I’m working on authorization right now and then I need to pull together some basic documentation and build out the marketing website. I hope to launch a public beta by the end of April.

    → 5:11 PM, Mar 26
  • Today I worked on getting image uploads to work on Sublime Blogs. It took me a while to figure it out but now it is working!

    → 10:06 PM, Mar 25
  • Today I had I job that required I go spelunking… well sort of. I had to crawl underneath the sacturay of a church that was built in 1905! It was very tight and the enterance was a long way away from where we needed to go.

    → 4:48 PM, Mar 25
  • Today on Sublime Blogs I wrapped up the functionality to switch the site you are working on and started building out the API. Here you can see the edit page for a site where you can create API access tokens.

    → 10:43 PM, Mar 24
  • Over the past several months, I have been trying to decide whether or not to cancel my Google Workspaces subscription. I use it for my business email and I’m grandfathered in to an unlimited storage plan for only $12/month.

    I used to use it as my main form of storage for all the client work I did but I have since decided I don’t want all my data in the hands of Google, especially not the only copy I have, so I purchased a Synology NAS. Now comes the part where I have to migrate 2TB of data from Google Drive to my NAS. Fun 😞

    I won’t really by using much storage on Google Drive but I don’t like the thought of giving up my grandfathered in plan.

    I don’t share as much data with clients anymore (now I’m doing mostly web developer and that is all on GitHub) so I could just throw any files I need to share on an S3 bucket. Maybe even throw that behind CloudFlare for caching.

    → 8:27 AM, Mar 24
  • Sublime Blogs is coming along well. EasyMDE has been working amazing so far!

    → 6:16 PM, Mar 23
  • Migrating from Ulysses to Bear

    I have been using Ulysses since I started this blog for writing my blog posts before publishing them to Micro.blog. I have decide to migrate to using Bear.app instead. I think it is going to work better for me as it will also replace Apple Notes for me as well.

    Now I need to to create a Siri Shortcut to be able to automatically post a Bear note to Micro.blog.

    → 5:13 PM, Mar 23
  • I set up CloudFlare to cache a site and in the process broke my internet controlled garage door opener. I don’t recall ever blogging about my custom garage door opener, but I should soon. Basically, I can open and close the garage door with a Siri Shortcut or control it from through a webpage.

    I had to restart a server and grey cloud the subdomain I have it setup on. It’s fixed now!

    → 10:42 PM, Mar 22
  • I want to build a house out of an old school bus (commonly referred to as a skoolie). I have been doing some research and I found the idea of converting a diesel school bus to run on waste vegetable oil from restaurants (which you can do with a Diesel engine). One more thing to add to my skoolie wishlist.

    → 10:37 PM, Mar 22
  • I think I will use Digital Ocean spaces for image hosting on Sublime Blogs. I wonder how much bandwidth and storage each site will use 🤔. That is going to be hard to estimate.

    → 9:24 PM, Mar 21
  • I have been making progress on Sublime Blogs. It has been going rather smoothly. It’s always that way whenever I start a new project. Sort of deceitful… it gets much harder down the road. Currently, I’m just setting up everything, defining the database schema, and creating the basic dashboard.

    It took me a while to finally decided on a javascript text editor to use on the front-end. I have three major requirements. It has to support markdown, allow image uploading, and be open source, so I can tweak and customize as needed without having to worry about licensing.

    Easy Markdown Editor, or EasyMDE for short, fulfilled all three of those requirements and as a bonus, has a great UI. It’s a fork of SimpleMDE with a few added features. After a few hours of work, I was able to get the editor to send its content, on update, back to whatever Livewire component it is embedded in. It may not be the most elegant… but it works.

    → 8:56 PM, Mar 21
  • Here we are again… days since my last blog post. I really need to get better at blogging more often. I think I’m going to challenge myself to blog at least once a day. It may be something interesting… it may not. But I will at least post about something every day.

    → 8:29 PM, Mar 21
  • I guess that is how 7-Eleven restocks 🤔 …through the front door? Looks awkward for customers.

    “How can I help you, sir? Oh! Yeah… just ignore the giant semi truck out in front. “

    → 3:48 PM, Mar 18
  • Inspired by Sublime Ads (a SaaS Vincent Ritter is developing), Sublime Blogs is a new project I’m working on. It is a Headless CMS designed specifically to add a blog to any frontend static site generator.

    After doing a lot of research, I’m yet to find a cheap and simple solution to move my blog over to Netlify. I’m very particular about my tech stack, and I want to be able to use the tooling I’m familiar with (Jigsaw and Tailwindcss) while still being able to post blog posts easily from my phone.

    I decided to solve my problem by building Sublime Blogs. More information coming soon…

    → 9:41 PM, Mar 15
  • I’m working on a new SaaS (software as a service) inspired by Vincent Ritter’s Sublime Ads. I will blog about it as I work out the details.

    → 6:33 PM, Mar 14
  • It seems like I go through phases of posting frequently, and then it feels like nothing interesting happens for a while and I neglect to write anything.

    I have been working on a few projects that some may find interesting. I have outlined them below.

    Vue JS

    I have been working on learning Vue JS. For those of you that are not familiar with Vue, it’s very similar to React (a piece of technology built and used by Facebook (now Meta)1).

    I’m enjoying using it so far. I have the tendency to jump in head first instead of working through tutorials, so progress on the app I’m working on is a bit slow. I will post more about it soon.

    BMW f650gs

    I have been working on replacing the clutch in my 2001 BMW f650gs. It’s a bit tricky and the stack height on the new one I think is a little too tall. Hopefully it works.

    I know there are more projects, but honestly, I started writing out this post several days ago, and now I forgot what I was going to say. Oops 😬


    1. Is it proper to nest parentheses inside one another or is that just something I picked up web development? 🤔 ↩︎

    → 7:50 PM, Mar 11
  • I went for a ride this morning. It is remarkable weather today. I rode 21 curves, and as the name implies, has 21 curves. It was a little wet out but still a lot of fun.

    → 9:47 AM, Mar 6
  • I put new tires on my 1999 Honda Nighthawk 750. I did it by hand, and It was not too hard.

    → 9:45 AM, Mar 6
  • “Redirecting…” is not a very helpful title 🤔

    Or description for that matter 😂

    → 2:51 PM, Feb 25
  • Someone accidentally escaped the <br> HTML element 😂

    It’s good to know even a $100 billion company makes mistakes.

    → 2:50 PM, Feb 25
  • I know there were at least 10 dumb mistakes that were made to get to this point. I got stuck in the very wet and leafy ground out at my cousin’s house. He came and rescued the day (or, by that point, night) and helped me get out.

    → 8:31 PM, Feb 21
  • I have been fairly busy lately, and I have fallen behind on a few things. Including the Swift and SwiftUI course I have been working on.

    I have been trying to decide whether to move forward with it or not. It takes quite a bit of time dedication (about 1hr a day) and I’m a long ways of from behind able to actually profit from the time spent.

    I’m thinking I’m better off focusing on the web for now. I started dabbling in Vue JS and I have a cool project that would make a good PWA.

    Furthermore, I also don’t feel like getting into the whole Apple vs. developers issues right now. At the same time, though, I want to be able to at least have some control over my iOS devices by being able to write my own apps. The web is remarkable and powerful, but there are just some things you can’t do without a native app.

    I restarted my Laracasts subscription, which is a fantastic resource for learning web development, so I want to devote more time to increasing my knowledge of Laravel and related technologies. Since I’m paying for it, I might as well take full advantage of it. Plus, I know enough about Laravel and Livewire to actually take on some small projects. It makes sense to dedicate time to something I can build a career out of now, rather than working on learning something I know very little about.

    I started writing this post thinking I had already made up my mind… but now I’m back to not being sure what I want to do now 😂

    We will see.

    → 8:27 PM, Feb 21
  • ⬛⬛🟩⬛🟩

    🟩⬛🟩⬛🟩

    🟩⬛🟩⬛🟩

    🟩🟩🟩⬛🟩

    🟩🟩🟩🟩🟩

    Wordle 243 5/6

    → 8:21 PM, Feb 17
  • I finished day #12 of 100 Days of Swift UI. I’m a little behind ☹️ but I’m still making progress.

    → 5:20 PM, Feb 12
  • I’m not sure how this trend has started, but now every company with a newsletter thinks it’s their job to tell everyone how to live out their daily life.

    Like look at this email I received the other day from Feit Electric.

    They make smart home devices, for Pete’s sake. I know it is just for marketing reasons, but every company does not need to be everything. Just continue making light bulbs. And if you can, make a really good light bulb.

    → 5:10 PM, Feb 12
  • → 11:25 PM, Jan 27
  • I just finished Day #05 of 100 Days of Swift UI. Today was all about if and switch statements and the oh so helpful and elegant ternary operator.

    → 10:49 PM, Jan 26
  • We are having a great time skiing!

    

    → 11:04 AM, Jan 26
  • I finished Day #04 of 100 Days of Swift UI. Today was all about type annotation.

    → 3:20 PM, Jan 25
  • Yesterday I finished Day #02 of 100 Days of Swift UI, and today I finished Day #03. As much as I love PHP and JavaScript, I’m really enjoying Swift. It is interesting to learn a compiled language verses the interpreted languages I’m familiar with.

    → 8:55 PM, Jan 24
  • I just finished Day #01 of 100 Days of SwiftUI. I’m enjoying it so far.

    → 3:53 PM, Jan 22
  • I went back to Chris Green Lake around sunset to try to capture a few photos. They did not turn out as good as I was expecting, but it was fun and I can add them to my collection.

    → 3:17 PM, Jan 21
  • Here is a photo I got today at the lake. I just missed sunset. I might try to go back tomorrow after work and get a photo as the sun is going down.

    → 9:21 PM, Jan 19
  • RSS
  • JSON Feed