<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>davidhallin.com</title><link>https://davidhallin.com/</link><description>Recent content on davidhallin.com</description><generator>Hugo</generator><language>en-US</language><copyright>© David Hallin</copyright><lastBuildDate>Fri, 20 Feb 2026 22:17:28 -0700</lastBuildDate><atom:link href="https://davidhallin.com/index.xml" rel="self" type="application/rss+xml"/><item><title>working as a senior laravel developer in 2026</title><link>https://davidhallin.com/blog/laravel-developer-in-2026/</link><pubDate>Fri, 20 Feb 2026 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/laravel-developer-in-2026/</guid><description>&lt;p&gt;I haven’t learned this much, this fast since I first began using Laravel.&lt;/p&gt;
&lt;p&gt;I’ve been working professionally as a Laravel developer for a long time, but with the rapid advancement of AI, it’s getting harder to ignore how much it’s changing the way I approach my work.&lt;/p&gt;
&lt;p&gt;It isn&amp;rsquo;t just writing code faster, it&amp;rsquo;s taking a different approach to it altogether.&lt;/p&gt;
&lt;p&gt;Tools that have been around for years — like git worktrees — suddenly seem useful in AI workflows. New ideas like vibe-coding and multi-agent orchestration are forcing me to rethink how I structure projects entirely.&lt;/p&gt;</description></item><item><title>using regular expressions (REGEX) with mysql queries</title><link>https://davidhallin.com/blog/using-regex-with-mysql-queries/</link><pubDate>Wed, 31 Aug 2022 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/using-regex-with-mysql-queries/</guid><description>&lt;p&gt;In my work, I frequently end up having to do a lot of data analysis. This usually involves taking multiple sources of data like spreadsheets JSON or XML files and pulling them into a database.&lt;/p&gt;
&lt;p&gt;This data is often grouped together in unusable ways, and needs to be broken up in order to be usable for analysis.&lt;/p&gt;
&lt;p&gt;Depending on what needs to happen, I&amp;rsquo;ll either write up a quick php script to iterate through, or I&amp;rsquo;ll go right to MySQL and break it apart.&lt;/p&gt;</description></item><item><title>how to run a script when you open terminal</title><link>https://davidhallin.com/blog/how-to-run-a-script-when-you-open-terminal/</link><pubDate>Fri, 22 Jul 2022 09:23:28 -0400</pubDate><guid>https://davidhallin.com/blog/how-to-run-a-script-when-you-open-terminal/</guid><description>&lt;p&gt;Over the past couple years, I&amp;rsquo;ve been a heavy linux user.&lt;/p&gt;
&lt;p&gt;I often prefer to use CLI productivity tools like &lt;a href="https://davidhallin.com/projects/timr"&gt;timr&lt;/a&gt; and &lt;a href="https://davidhallin.com/projects/bash-mission-log"&gt;bash-mission-log&lt;/a&gt; instead of web apps, both because they are more privacy focused (I know exactly where the data is, and if it&amp;rsquo;s backed up etc.), and it&amp;rsquo;s always in my face because I always have a terminal window open.&lt;/p&gt;
&lt;p&gt;The issue is that sometimes, you&amp;rsquo;re in a rush, and you forget to check these CLI tools to see what is in there.&lt;/p&gt;</description></item><item><title>timr</title><link>https://davidhallin.com/projects/timr/</link><pubDate>Thu, 21 Jul 2022 09:39:05 -0400</pubDate><guid>https://davidhallin.com/projects/timr/</guid><description>&lt;h1 id="why"&gt;why?&lt;/h1&gt;
&lt;p&gt;I wanted to track the time I was spending on some of my projects. I looked at services like Toggl, but I never remember to open the app.&lt;/p&gt;
&lt;p&gt;I figured if I had something accessible from command line, it&amp;rsquo;d be easier because I basically always have at least a terminal window open.&lt;/p&gt;
&lt;h2 id="commands--usage"&gt;commands / usage&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;list projects&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;# Output a list of projects in your database&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;php timr project:list
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;em&gt;sample output&lt;/em&gt;
&lt;img src="https://davidhallin.com/images/timr/project-list.png"&gt;&lt;/p&gt;</description></item><item><title>making timr</title><link>https://davidhallin.com/blog/making-timr/</link><pubDate>Thu, 21 Jul 2022 09:38:56 -0400</pubDate><guid>https://davidhallin.com/blog/making-timr/</guid><description>&lt;p&gt;I almost always have a few projects on the go at a t ime at iApotheca, and then I also usuually have a few side projects I work on as well.&lt;/p&gt;
&lt;p&gt;As a developer, I relate strongly to theories like this:&lt;/p&gt;
&lt;center&gt;&lt;img src="https://imgs.xkcd.com/comics/automation.png"/&gt;
&lt;p&gt;&lt;a href="https://xkcd.com/1319"&gt;xkcd&amp;rsquo;s Automation&lt;/a&gt;&lt;/p&gt;
&lt;/center&gt;
&lt;p&gt;&lt;br /&gt;&lt;br /&gt;
Of course, if you want to improve something, you must measure it.&lt;/p&gt;
&lt;p&gt;So I&amp;rsquo;ve spent a great deal of time trying to track and optimize my time of the years.&lt;/p&gt;</description></item><item><title>bash-mission-log</title><link>https://davidhallin.com/projects/bash-mission-log/</link><pubDate>Tue, 19 Jul 2022 00:00:00 +0000</pubDate><guid>https://davidhallin.com/projects/bash-mission-log/</guid><description>&lt;p&gt;This is a todo list written entirely in bash&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;saves to text file, so internet isn&amp;rsquo;t required, and your data stays locally on your device.&lt;/li&gt;
&lt;li&gt;entirely open source, modify to suit your needs very easily&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here is a quick peek at what it can do&lt;/p&gt;
&lt;img src="https://github.com/hallindavid/bash-mission-log/blob/main/preview.gif?raw=true" /&gt;
&lt;p&gt;Check out the source code on Github&lt;/p&gt;</description></item><item><title>back to the pixel</title><link>https://davidhallin.com/blog/back-to-pixel/</link><pubDate>Sat, 04 Sep 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/back-to-pixel/</guid><description>&lt;h1 id="observations"&gt;observations&lt;/h1&gt;
&lt;br /&gt;
**I lasted 2 weeks before switching back to my pixel**
&lt;p&gt;The process was interesting&amp;hellip; there were 2 things that ultimately yanked me back to my pixel.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;camera&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;First is the camera - the flip phone doesn&amp;rsquo;t have a camera that&amp;rsquo;s worth talking about. Since I&amp;rsquo;ve had a smart phone for&amp;hellip; I guess a bit over a decade now, there are a few deep habits that I use my camera for, things like&lt;/p&gt;</description></item><item><title>upgrading to a "smart-er" phone</title><link>https://davidhallin.com/blog/upgrading-to-a-smart-er-phone/</link><pubDate>Wed, 04 Aug 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/upgrading-to-a-smart-er-phone/</guid><description>&lt;p&gt;check out my new rig (atleast for a while).&lt;/p&gt;
&lt;center&gt;&lt;img src="https://davidhallin.com/images/new-phone/new-phone-1.jpg" width="60%" /&gt;&lt;/center&gt;
&lt;br /&gt;
&lt;h3 id="reasoning"&gt;reasoning&lt;/h3&gt;
&lt;p&gt;I am not going to drag this out to be a post a day because I seriously hope I don&amp;rsquo;t have something new to say about this process daily. This post is basically the reasoning, and the first few days with this decision.&lt;/p&gt;
&lt;p&gt;I got my first smart phone in 2009. It was an iPhone 3G. I bought it in a shop on campus at University of Waterloo. I made it back to my computer for a quick load of some music, and then it survived the greyhound trip to Peterborough before I dropped it and smashed the screen.&lt;/p&gt;</description></item><item><title>bash mission log</title><link>https://davidhallin.com/blog/bash-mission-log/</link><pubDate>Thu, 29 Jul 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/bash-mission-log/</guid><description>&lt;h2 id="some-backgroundrequirements-for-this-project"&gt;some background/requirements for this project&lt;/h2&gt;
&lt;p&gt;I have a mac, as well as 2 linux machines, and I switch between them fairly regularly depending on where I&amp;rsquo;m working, and what I&amp;rsquo;m working on.&lt;/p&gt;
&lt;p&gt;When I make a list of my daily goals, I often neglect/forget to look back at my journal and remind myself of my other goals for the day.&lt;/p&gt;
&lt;p&gt;But, because I open terminal so much to run scripts, or to compile etc, I realized I had an opportunity here to make it so I get my daily goals flashed in my face as often as possible.&lt;/p&gt;</description></item><item><title>learning flutter after using tall stack</title><link>https://davidhallin.com/blog/learning-flutter-after-using-tall-stack/</link><pubDate>Mon, 22 Mar 2021 05:18:31 -0400</pubDate><guid>https://davidhallin.com/blog/learning-flutter-after-using-tall-stack/</guid><description>&lt;p&gt;Over the last little while, I&amp;rsquo;ve noticed more and more development frameworks moving towards component based layouts.&lt;/p&gt;
&lt;p&gt;A few years ago I became familiar with the concept by learning Vue.js, and since then I&amp;rsquo;ve played with a few other frameworks like React, Redwood, and others that use similar sort of structures.&lt;/p&gt;
&lt;p&gt;Now, primarily I&amp;rsquo;m a web developer, so when I moved to Tailwind CSS from Bootstrap it was pretty neat to see components becoming a way to organize your code, albeit a little different types of components from the other components mentioned so far.&lt;/p&gt;</description></item><item><title>🖊️ my new rule for writing dev blogs</title><link>https://davidhallin.com/blog/my-new-rule-for-writing-dev-blogs/</link><pubDate>Wed, 17 Mar 2021 19:51:36 -0400</pubDate><guid>https://davidhallin.com/blog/my-new-rule-for-writing-dev-blogs/</guid><description>&lt;p&gt;Personally, I don&amp;rsquo;t find it compelling reading dev blog posts that follow these patterns&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&amp;ldquo;I had a problem, so I asked a question, and this person had an answer that was &amp;hellip;.&amp;rdquo;&lt;/li&gt;
&lt;li&gt;&amp;ldquo;I saw something on twitter, and thought it looked interesting so i followed the link and this is what I found &amp;hellip;&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But I find myself accidentally writing them all the time.&lt;/p&gt;
&lt;p&gt;I often take notes using bullet points, and when I flush out the idea a bit more, sometimes there&amp;rsquo;s not a lot of content.&lt;/p&gt;</description></item><item><title>creating a worklog</title><link>https://davidhallin.com/blog/creating-a-worklog/</link><pubDate>Tue, 09 Mar 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/creating-a-worklog/</guid><description>&lt;h2 id="purpose"&gt;purpose&lt;/h2&gt;
&lt;p&gt;One of the biggest problems that face developers today is estimating the time required to complete a task.&lt;br&gt;
This is a safe statement to make because there are so many systems you&amp;rsquo;ve probably heard about which attempt to solve this problem directly.&lt;/p&gt;
&lt;p&gt;While working in scrum, developers are not good at estimating timelines, but are good at saying which of two tasks are &lt;em&gt;harder&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;One of the Basecamp ideologies is that you have a cycle, and the work for that cycle is downwards flexible - meaning if
it can&amp;rsquo;t get done in a cycle, maybe it just isn&amp;rsquo;t worth doing, or maybe you do a smaller version of it that satisfies fewer requirements etc.&lt;/p&gt;</description></item><item><title>setting a punch clock system</title><link>https://davidhallin.com/worklog/setting-up-a-punch-clock/</link><pubDate>Tue, 09 Mar 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/worklog/setting-up-a-punch-clock/</guid><description>&lt;h1 id="intro"&gt;intro&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;m working on a project right now for a company. They would like to add a punch clock to an internal use application I
wrote, which will be used by their employees to submit their time sheets.&lt;/p&gt;
&lt;hr&gt;
&lt;br /&gt;
# reqs
* Employees must be able to punch in and out easily
* Employees should be able to add/edit/delete their own (and only their own) punches within the last 14 days
* Admin users should be able to add/edit/delete any employees punches, indefinitely
* Admin users should be able to report on employee punches, with date parameters
* Admin users should be able to export the report into a CSV file
&lt;hr&gt;
&lt;br /&gt;
# steps
This is a fairly small addon to the application - so I think we can get away with having just a few small components.
&lt;h3 id="backendplan"&gt;BACKEND//PLAN&lt;/h3&gt;
&lt;p&gt;We already have a user, which comes built in with Laravel. In the past, we added an &lt;code&gt;is_admin&lt;/code&gt; boolean field.&lt;/p&gt;</description></item><item><title>Switching this site to Hugo</title><link>https://davidhallin.com/blog/moving-my-blog-to-hugo/</link><pubDate>Mon, 08 Mar 2021 06:43:17 -0500</pubDate><guid>https://davidhallin.com/blog/moving-my-blog-to-hugo/</guid><description>&lt;h1 id="tldr"&gt;TLDR&lt;/h1&gt;
&lt;p&gt;I am switching my blog from &lt;a href="https://jigsaw.tighten.co/"&gt;Jigsaw&lt;/a&gt; to &lt;a href="https://gohugo.io"&gt;Hugo&lt;/a&gt;
so I can learn a bit more about webpack, bundlers, postcss, purgecss etc.&lt;/p&gt;
&lt;h1 id="longer-version"&gt;Longer version&lt;/h1&gt;
&lt;p&gt;Let me start by saying, I think &lt;a href="https://jigsaw.tighten.co/"&gt;Jigsaw&lt;/a&gt; is a fantastic static site generator,
if you&amp;rsquo;re a Laravel developer, you&amp;rsquo;ll feel right at home using it.&lt;/p&gt;
&lt;p&gt;TailwindCSS version 1 is baked into the Jigsaw blog scaffolding, and when I began updating it to version 2, I noticed how
much magic was going on under the hood that I didn&amp;rsquo;t understand.&lt;/p&gt;</description></item><item><title>Hugo Start</title><link>https://davidhallin.com/projects/hugo-start/</link><pubDate>Mon, 08 Mar 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/projects/hugo-start/</guid><description>&lt;p&gt;Just a quick release for this one.&lt;/p&gt;
&lt;p&gt;If you are interested in building a static site with Hugo, but don&amp;rsquo;t want to use a theme, and would like to use tailwind,
but with PurgeCSS so you get the ultra-small css files, then check this out.&lt;/p&gt;</description></item><item><title>a re-usable, sharable, committable Honeybadger post-deployment script</title><link>https://davidhallin.com/blog/honeybadger-post-deployment-script/</link><pubDate>Tue, 02 Mar 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/honeybadger-post-deployment-script/</guid><description>&lt;p&gt;Quick link to the GIST: &lt;a href="https://gist.github.com/hallindavid/5225d76646f2f7b6fde9da30af140198"&gt;View Gist on Github&lt;/a&gt;&lt;/p&gt;
&lt;h1 id="some-background-info"&gt;Some background info&lt;/h1&gt;
&lt;p&gt;I use &lt;a href="https://www.honeybadger.io/"&gt;Honeybadger&lt;/a&gt; for some of my applications, and today, I started pushing deployments to Honeybadger, but I wanted a file I was comfy committing to the repositiory.&lt;/p&gt;
&lt;p&gt;I also didn&amp;rsquo;t want each person who does a manual deployment to have to set it up on their device - it should just run.&lt;/p&gt;
&lt;p&gt;So I wrote this little script and thought it may help others out&lt;/p&gt;</description></item><item><title>Alpine Transitions Previewer</title><link>https://davidhallin.com/projects/alpine-transitions-preview/</link><pubDate>Wed, 20 Jan 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/projects/alpine-transitions-preview/</guid><description>&lt;h2 id="alpine-transitions-previewer"&gt;Alpine Transitions Previewer&lt;/h2&gt;
&lt;p&gt;If you use Alpine.js and Tailwindcss, this can fit in really nicely to your design process, but if you also have a &lt;a href="https://tailwindui.com" target="_blank"&gt;TailwindUI&lt;/a&gt; license, there is a bit more value.&lt;/p&gt;
&lt;p&gt;alpine-transitions-preview is an open-source (MIT) one-page Alpine.js/tailwindcss application which is designed to perform primarily two functions.
it is not affiliated or supported by alpine.js or tailwindcss&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It allows you to preview your Alpine.js transitions so you can preview &amp;amp; tweak them easily before moving them to your application. (see below)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src="https://davidhallin.com/images/alpine-transitions/alpine-transitions.gif" class="mx-auto my-4 w-3/4"/&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>New opensource project- Alpine Transitions Previewer</title><link>https://davidhallin.com/blog/alpine-transitions-previewer/</link><pubDate>Wed, 20 Jan 2021 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/alpine-transitions-previewer/</guid><description>&lt;p&gt;This is an open-source Alpine.js &amp;amp; TailwindCSS mini-web app application which allows you to preview/tweak your Alpine.js transitions in real time before copying them to your project&lt;/p&gt;
&lt;p&gt;Here are the relevant links:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://hallindavid.github.io/alpine-transition-preview/" target="_blank" class="py-4 px-6 my-4 bg-gray-900 text-white hover:text-gray-400 text-2xl"&gt;Github Pages Deployment&lt;/a&gt;
&lt;a href="https://github.com/hallindavid/alpine-transition-preview" target="_blank" class="py-4 my-4 px-6 bg-gray-900 text-white hover:text-gray-400 text-2xl"&gt;&lt;i class="fab fa-github"&gt;&lt;/i&gt; Git Repo&lt;/a&gt;
&lt;a href="https://davidhallin.com/projects/alpine-transitions-preview" class="py-4 px-6 my-4 bg-gray-900 text-white hover:text-gray-400 text-2xl"&gt;Project Page&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Testing Upsert vs update case statements in Laravel &amp; MySql</title><link>https://davidhallin.com/blog/testing-upsert-vs-update-case/</link><pubDate>Thu, 10 Dec 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/testing-upsert-vs-update-case/</guid><description>&lt;p&gt;First off - if you&amp;rsquo;ve not read the post &lt;a href="https://davidhallin.com/blog/using-upsert-in-laravel-8/"&gt;using Model::Upsert in laravel 8&lt;/a&gt;, check that out before you read this one. It&amp;rsquo;s kind of the start of this experiment.&lt;/p&gt;
&lt;p&gt;One of the comments that came up in conversation about this post was, rather than using the insert into, and on duplicate failure, why don&amp;rsquo;t you a cased update query like the following&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-mysql" data-lang="mysql"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;update&lt;/span&gt; items
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;set&lt;/span&gt; sort_order &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;CASE&lt;/span&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; 						&lt;span style="color:#66d9ef"&gt;when&lt;/span&gt; id &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [some_id_here] &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;						&lt;span style="color:#66d9ef"&gt;when&lt;/span&gt; id &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [some_id_here] &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;						&lt;span style="color:#66d9ef"&gt;when&lt;/span&gt; id &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [some_id_here] &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;3&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;						&lt;span style="color:#66d9ef"&gt;when&lt;/span&gt; id &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [some_id_here] &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;4&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;						&lt;span style="color:#66d9ef"&gt;when&lt;/span&gt; id &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [some_id_here] &lt;span style="color:#66d9ef"&gt;then&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;5&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;					END
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;where&lt;/span&gt; ids &lt;span style="color:#66d9ef"&gt;in&lt;/span&gt; ([all_your_ids_here])
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;which makes a lot of sense. So I thought that this is actually something that&amp;rsquo;s worth testing, and if it&amp;rsquo;s more efficient, there are probably a lot of people who have sort orders on models in their apps, so if it is a big improvement, then maybe it would be worth putting in the time to making a PR on the laravel framework.&lt;/p&gt;</description></item><item><title>using Model::Upsert in laravel 8</title><link>https://davidhallin.com/blog/using-upsert-in-laravel-8/</link><pubDate>Thu, 10 Dec 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/using-upsert-in-laravel-8/</guid><description>&lt;p&gt;Recently - I asked this question on the &lt;a href="https://laracasts.com/discuss/channels/general-discussion/question-whats-the-most-efficient-way-to-update-a-database-with-new-sort-orders?page=1#reply=672246"&gt;laracasts discussion board&lt;/a&gt; and I got an answer that surpassed my expectations.&lt;/p&gt;
&lt;h3 id="tldr"&gt;TLDR&lt;/h3&gt;
&lt;p&gt;You can bulk update the sort order of items in laravel using the &lt;code&gt;Upsert&lt;/code&gt; function (only in Laravel 8)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$ordered_array &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	[
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		&lt;span style="color:#e6db74"&gt;&amp;#39;id&amp;#39;&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		&lt;span style="color:#e6db74"&gt;&amp;#39;sort_order&amp;#39;&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;1&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	],
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	[
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		&lt;span style="color:#e6db74"&gt;&amp;#39;id&amp;#39;&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;7&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;		&lt;span style="color:#e6db74"&gt;&amp;#39;sort_order&amp;#39;&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&amp;gt;&lt;/span&gt;&lt;span style="color:#ae81ff"&gt;2&lt;/span&gt;,
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	],
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;	&lt;span style="color:#f92672"&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Item&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;upsert&lt;/span&gt;($ordered_array, [&lt;span style="color:#e6db74"&gt;&amp;#39;id&amp;#39;&lt;/span&gt;], [&lt;span style="color:#e6db74"&gt;&amp;#39;sort_order&amp;#39;&lt;/span&gt;]);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;There are a few hiccups/errors that I ran into while using it, which I go into below.&lt;/p&gt;</description></item><item><title>the weather zsh terminal function</title><link>https://davidhallin.com/blog/weather-zsh-function/</link><pubDate>Wed, 02 Dec 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/weather-zsh-function/</guid><description>&lt;p&gt;While I was kind of digging through my configuration files to make the post &lt;a href="https://davidhallin.com/blog/what-i-use-2020"&gt;what i use&lt;/a&gt;, I went down a bit of a rabbit hole for my zsh configuration.&lt;/p&gt;
&lt;p&gt;I had a bunch of aliases, functions, and plugins in my configuration that I didn&amp;rsquo;t use anymore, and didn&amp;rsquo;t need really, so I started to go through them and began looking into which ones were still useful vs which ones I could remove from my .zshrc file.&lt;/p&gt;</description></item><item><title>what i use</title><link>https://davidhallin.com/blog/what-i-use-2020/</link><pubDate>Wed, 02 Dec 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/what-i-use-2020/</guid><description>&lt;p&gt;This page is inspired by some other developer&amp;rsquo;s &amp;ldquo;my setup&amp;rdquo; pages.&lt;/p&gt;
&lt;h2 id="ides"&gt;IDEs&lt;/h2&gt;
&lt;p&gt;So I largely do 2 types of programming, PHP and Go.&lt;/p&gt;
&lt;p&gt;For most of my PHP work I use &lt;a href="https://www.jetbrains.com/phpstorm/"&gt;PhpStorm&lt;/a&gt; and for most of my Go work I use &lt;a href="https://www.jetbrains.com/go/"&gt;GoLand&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;These are both made by JetBrains so they have an annual subscription associated with them, but the code completion and package imports make these things pretty awesome.&lt;/p&gt;
&lt;p&gt;I use a pretty generic dark theme, and the FiraCode font for both of them. The only real customization I&amp;rsquo;ve done is moving the project panel to the right-hand side which I saw in &lt;a href="https://calebporzio.com/my-vs-code-setup-2"&gt;Caleb Porzio&amp;rsquo;s VS Code Setup&lt;/a&gt;, and I think it fit&amp;rsquo;s my needs better.&lt;/p&gt;</description></item><item><title>Introduction to Youtube Channel</title><link>https://davidhallin.com/blog/introduction-to-youtube-channel/</link><pubDate>Wed, 14 Oct 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/introduction-to-youtube-channel/</guid><description>&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;So I&amp;rsquo;m going to start a youtube channel just showing how I work, and what I do. Hopefully people like it.&lt;/p&gt;
&lt;p&gt;Here is the channel introduction, and I&amp;rsquo;ll work on adding more and more content to it over time.&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/Ut8oWOLcAYw" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen&gt;&lt;/iframe&gt;</description></item><item><title>New Update to Open Source Repository - Manny</title><link>https://davidhallin.com/blog/update-to-manny/</link><pubDate>Thu, 24 Sep 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/update-to-manny/</guid><description>&lt;p&gt;If you haven&amp;rsquo;t heard of Manny, it&amp;rsquo;s an open source package I created in March of 2020.&lt;/p&gt;
&lt;p&gt;Repo: &lt;a href="https://github.com/hallindavid/manny"&gt;github.com/hallindavid/manny&lt;/a&gt;&lt;br /&gt;
Blog post explaining what it is: &lt;a href="https://davidhallin.com/blog/livewire-masks-with-manny"&gt;Livewire Masks With Manny&lt;/a&gt;&lt;br /&gt;
Project page: &lt;a href="https://davidhallin.com/projects/manny"&gt;Manny&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I made a PR with 2 changes that popped up in a project I was working on.&lt;/p&gt;
&lt;p&gt;####Updated Mask to not add on additional characters after we&amp;rsquo;ve run out of characters.&lt;/p&gt;
&lt;p&gt;The mask function is typically used like this&lt;/p&gt;</description></item><item><title>Easy Tailwindcss Buttons</title><link>https://davidhallin.com/blog/easy-tailwind-buttons/</link><pubDate>Mon, 10 Aug 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/easy-tailwind-buttons/</guid><description>&lt;p&gt;If you&amp;rsquo;ve not heard of &lt;a href="https://tailwindcss.com/"&gt;TailwindCSS&lt;/a&gt;, you&amp;rsquo;re missing out.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a utility framework - super light weight, easy to learn, and absolutely awesome.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve been using Tailwind for all my recent projects, and most of my projects are data-driven web applications, with buttons as such.&lt;/p&gt;
&lt;p&gt;Now if you&amp;rsquo;ve worked with Bootstrap, you&amp;rsquo;re probably used to creating buttons like this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;&lt;span style="color:#f92672"&gt;button&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;class&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;btn btn-primary&amp;#34;&lt;/span&gt;&amp;gt;Primary&amp;lt;/&lt;span style="color:#f92672"&gt;button&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and out would pop a button like this:&lt;/p&gt;
&lt;img src="https://davidhallin.com/images/post-11/bootstrap-primary-button.png" /&gt;
&lt;p&gt;This is pretty straight-forward, and I liked being able to remember that if I needed a button, I just had to remember a couple of quick classes to make it how ever I want.&lt;/p&gt;</description></item><item><title>Javascript confirm before calling wire:click in Laravel Livewire</title><link>https://davidhallin.com/blog/confirming-actions-with-laravel-livewire/</link><pubDate>Sat, 08 Aug 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/confirming-actions-with-laravel-livewire/</guid><description>&lt;p&gt;First off - I should say - this is taken from &lt;a href="https://github.com/livewire/livewire/issues/366"&gt;this issue conversation on github&lt;/a&gt; - particularly from &lt;a href="https://github.com/fra000"&gt;fra000&lt;/a&gt;&amp;rsquo;s comment on November 14th, 2019&lt;/p&gt;
&lt;p&gt;When building any sort of database-driven app, I&amp;rsquo;ll want to have a Javascript Confirmation before actually performing an action for things like deleting something, or modifying something which performs a significant change.&lt;/p&gt;
&lt;p&gt;With Livewire, you call the PHP function easily with something like this&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-html" data-lang="html"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&amp;lt;&lt;span style="color:#f92672"&gt;button&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;wire:click&lt;/span&gt;&lt;span style="color:#f92672"&gt;=&lt;/span&gt;&lt;span style="color:#e6db74"&gt;&amp;#34;delete_object&amp;#34;&lt;/span&gt;&amp;gt;DELETE!&amp;lt;/&lt;span style="color:#f92672"&gt;button&lt;/span&gt;&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;But that will call the delete code right away, so rather than doing that, we want to have something that prompts the user to say &amp;ldquo;Are you sure?&amp;rdquo; or something along those lines.&lt;/p&gt;</description></item><item><title>Handling null values in an 'order by' query with Laravel Eloquent (Laravel Beginner, mysql + postgres compatible)</title><link>https://davidhallin.com/blog/laravel-handling-null-in-order-by-query/</link><pubDate>Tue, 02 Jun 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/laravel-handling-null-in-order-by-query/</guid><description>&lt;p&gt;In Laravel, there is a precedent to use a nullable datetime/timestamp field similar to a boolean value, for example things like the field &lt;code&gt;deleted_at&lt;/code&gt; which is automatically added to your eloquent models when you use soft_deletes.&lt;/p&gt;
&lt;p&gt;When you&amp;rsquo;re working with that within that frame, sometimes you&amp;rsquo;re going to want handle these date times in different ways.&lt;/p&gt;
&lt;p&gt;Say for instance, the field &lt;code&gt;email_verified_at&lt;/code&gt; in the &lt;code&gt;User&lt;/code&gt; model which is pretty default/standard in a Laravel installation.&lt;/p&gt;</description></item><item><title>Testing the Existance of Laravel Models</title><link>https://davidhallin.com/blog/testing-existance-of-laravel-models/</link><pubDate>Thu, 02 Apr 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/testing-existance-of-laravel-models/</guid><description>&lt;p&gt;This is something I had to google so many times when I got started with Laravel, so I hope others find it helpful.&lt;/p&gt;
&lt;p&gt;In Codeigniter, there isn&amp;rsquo;t really any ORM, so if you&amp;rsquo;re looking to check if something exists in your database, you&amp;rsquo;d check out the number of rows returned eg.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$postExists &lt;span style="color:#f92672"&gt;=&lt;/span&gt; ( $this&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;db&lt;/span&gt;&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;query&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#34; Select COUNT(*) as CNT 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; from posts 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#e6db74"&gt; where user_id = ?&amp;#34;&lt;/span&gt;, &lt;span style="color:#66d9ef"&gt;array&lt;/span&gt;(&lt;span style="color:#ae81ff"&gt;10&lt;/span&gt;))&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;row&lt;/span&gt;()&lt;span style="color:#f92672"&gt;-&amp;gt;&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;CNT&lt;/span&gt; &lt;span style="color:#f92672"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;if&lt;/span&gt; ($postExists) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;//proceed with code
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or with query codeigniter query builder&lt;/p&gt;</description></item><item><title>Masking Livewire inputs with manny</title><link>https://davidhallin.com/blog/livewire-masks-with-manny/</link><pubDate>Mon, 30 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/livewire-masks-with-manny/</guid><description>&lt;p&gt;This post expects you to be comfy with Laravel development, and a bit of Livewire as well - although I do go through setting up livewire.&lt;/p&gt;
&lt;h3 id="creating-the-project"&gt;Creating the Project&lt;/h3&gt;
&lt;p&gt;So let&amp;rsquo;s start off by creating our project and stepping into it.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-sh" data-lang="sh"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;laravel new livewiremask
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;cd livewiremask
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="pull-in-scaffolding-and-livewire"&gt;Pull in scaffolding and livewire&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s pull in Livewire and also pull in the ui front-end scaffolding - just so we don&amp;rsquo;t have to build much in terms of a theme.&lt;/p&gt;</description></item><item><title>The importance of being a part of a dev community</title><link>https://davidhallin.com/blog/its-important-to-be-part-of-a-dev-community/</link><pubDate>Mon, 30 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/its-important-to-be-part-of-a-dev-community/</guid><description>&lt;p&gt;** Note - this is a non-technical post. If you&amp;rsquo;re here for the techno-goodies, this is safe to skip. **&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t mean &amp;ldquo;part of a dev community&amp;rdquo; in a weird cliquey way - when I say being part of a dev community I mean being in a position where you&amp;rsquo;re constantly seeing different people&amp;rsquo;s ideas/thoughts/processes as a method of learning.&lt;/p&gt;
&lt;p&gt;About a year ago, I started taking a hard look at my web development work flow. It had become extremely repetitive and boring. Some of the libraries I was using were so old that I wasn&amp;rsquo;t able to update to 5.6&amp;hellip; which for reference came out in 2014&amp;hellip;&lt;/p&gt;</description></item><item><title>Manny</title><link>https://davidhallin.com/projects/manny/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/projects/manny/</guid><description>&lt;h1 id="what-is-it"&gt;What is it?&lt;/h1&gt;
&lt;p&gt;a string manipulation (this is where the name Manny comes from) package for PHP.&lt;/p&gt;
&lt;p&gt;Here are a few examples of what you can do.&lt;/p&gt;
&lt;h3 id="stripper"&gt;Stripper&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$string &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#e6db74"&gt;&amp;#39;With only 5-10 hours of development, Dave built Manny, saving him atleast 10 seconds per day!&amp;#39;&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$config &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [&lt;span style="color:#e6db74"&gt;&amp;#39;num&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;alpha&amp;#39;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#39;space&amp;#39;&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Manny&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;stripper&lt;/span&gt;($string,$config); 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//Returns: &amp;#39;With only 510 hours of development Dave built Manny saving him atleast 10 seconds per day&amp;#39;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$alt_config &lt;span style="color:#f92672"&gt;=&lt;/span&gt; [&lt;span style="color:#e6db74"&gt;&amp;#39;num&amp;#39;&lt;/span&gt;];
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Manny&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;stripper&lt;/span&gt;($string,$alt_config); 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//Returns: &amp;#39;51010&amp;#39;;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="mask"&gt;Mask&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//US Social Security Number
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Manny&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;mask&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#34;987654321&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;111-11-1111&amp;#34;&lt;/span&gt;); &lt;span style="color:#75715e"&gt;//returns &amp;#34;987-65-4321&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//US Zip-code
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Manny&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;mask&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#34;The whitehouse zip code is: 20500&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;11111&amp;#34;&lt;/span&gt;); &lt;span style="color:#75715e"&gt;//returns &amp;#34;20500&amp;#34;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//Canada Postal Code
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Manny&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;mask&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#34;K1M1M4&amp;#34;&lt;/span&gt;, &lt;span style="color:#e6db74"&gt;&amp;#34;A1A 1A1&amp;#34;&lt;/span&gt;); &lt;span style="color:#75715e"&gt;//
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//outputs 987-65-4321
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id="phone"&gt;Phone&lt;/h3&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-php" data-lang="php"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#a6e22e"&gt;Manny&lt;/span&gt;&lt;span style="color:#f92672"&gt;::&lt;/span&gt;&lt;span style="color:#a6e22e"&gt;phone&lt;/span&gt;(&lt;span style="color:#e6db74"&gt;&amp;#34;8008008000&amp;#34;&lt;/span&gt;); 
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;//outputs 800-800-8000
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Hope you enjoy!&lt;/p&gt;</description></item><item><title>My first open source package</title><link>https://davidhallin.com/blog/my-first-open-source-package/</link><pubDate>Sun, 29 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/my-first-open-source-package/</guid><description>&lt;p&gt;So the other day I was working with &lt;a href="https://calebporzio.com/"&gt;Caleb Porzio&lt;/a&gt;&amp;rsquo;s &lt;a href="https://laravel-livewire.com/"&gt;Livewire&lt;/a&gt; package, and I ran into a unique situation - atleast for me.&lt;/p&gt;
&lt;p&gt;In my normal php builds, when you fill out a form like this&lt;/p&gt;
&lt;img src="https://davidhallin.com/images/first-open-source-package/sample-form.png" /&gt;
&lt;p&gt;You would use some javascript library to mask the input on the phone number field like &lt;a href="https://nosir.github.io/cleave.js/"&gt;Cleave&lt;/a&gt;. Then when the user would submit the form, I&amp;rsquo;d remove all formatting characters with regex&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;$cleansed_phone = preg_replace(&amp;#39;/[^0-9]/&amp;#39;, &amp;#39;&amp;#39;, $posted_phone);
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and format into the desired format - like E.164 if using it for SMS, or if it was a more CRM-like application, storing it like &lt;code&gt;888-888-8888&lt;/code&gt; so that people can easily search for it.&lt;/p&gt;</description></item><item><title>Deploying a static site to a repo subtree and hosting it for free on github pages</title><link>https://davidhallin.com/blog/deploying-a-static-site-to-github-pages/</link><pubDate>Sat, 28 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/deploying-a-static-site-to-github-pages/</guid><description>&lt;p&gt;Well - for anyone interested in free hosting for a static website using a service like github pages - that&amp;rsquo;s what this post is about.&lt;/p&gt;
&lt;p&gt;I mentioned in my &lt;a href="https://davidhallin.com/blog/first-post"&gt;First Post&lt;/a&gt; that I whipped up this site in about an hour with a Static Site Generator called Jigsaw, and deployed it to github pages.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://jigsaw.tighten.co/"&gt;Jigsaw&lt;/a&gt; comes with fantastic &lt;a href="https://jigsaw.tighten.co/docs/installation/"&gt;documentation&lt;/a&gt; so is generally pretty easy generate the static files, but there is a bit of a catch when using free git repo static hosting if you want to keep it all in one repository.&lt;/p&gt;</description></item><item><title>How to use Sublime Text Snippets and improve your workflow</title><link>https://davidhallin.com/blog/sublime-snippets-location/</link><pubDate>Thu, 26 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/sublime-snippets-location/</guid><description>&lt;h2 id="what-is-a-snippet"&gt;What is a snippet?&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;ve never played with Sublime Text, it&amp;rsquo;s a fantastic editor and feels so much faster than most of the other editors out there today. It does cost some money up front, but there is no monthly/annual subscription that you need. One of I think it&amp;rsquo;s most powerful features is snippets.&lt;/p&gt;
&lt;p&gt;When I first started using snippets, the way I understood them was like a multi-copy paste function. Instead of having just one thing copied at a time, you could have a bunch. So when there is a repeatable piece of code, you make a snippet and then just pump them out, but the power of snippets in Sublime Text runs deeper than that. The super-feature is the tabbed selections in a snippet.&lt;/p&gt;</description></item><item><title>BootstrapVueFormBuilder</title><link>https://davidhallin.com/blog/bootstrap-vue-form-builder/</link><pubDate>Wed, 25 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/bootstrap-vue-form-builder/</guid><description>&lt;h3 id="what-is-bootstrapvueformbuilder"&gt;What is BootstrapVueFormBuilder?&lt;/h3&gt;
&lt;div class="mx-auto text-center"&gt;
 &lt;img src="https://davidhallin.com/images/post-2/quick-scaffold.gif" class="mx-auto my-4"/&gt;&lt;br /&gt;
 &lt;a href="https://bootstrapvueformbuilder.com" target="_blank" class="py-4 px-6 my-4 bg-gray-900 text-white hover:text-gray-400 text-2xl"&gt;Website&lt;/a&gt;
 &lt;a href="https://github.com/hallindavid/bootstrapvueformbuilder" target="_blank" class="py-4 my-4 px-6 bg-gray-900 text-white hover:text-gray-400 text-2xl"&gt;&lt;i class="fab fa-github"&gt;&lt;/i&gt; Git Repo&lt;/a&gt;
&lt;/div&gt;
&lt;p&gt;Throughout my career, a huge portion of my regular work comes from creating forms for people. People always need forms.&lt;/p&gt;
&lt;p&gt;The regular progression in my situation is this.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;I spend a bunch of time building a form&lt;/li&gt;
&lt;li&gt;The customer likes the form, then tries it&lt;/li&gt;
&lt;li&gt;The customer asks for changes to the form because they missed a field, or had an extra field they didn&amp;rsquo;t need&lt;/li&gt;
&lt;li&gt;Adding / removing those fields doesn&amp;rsquo;t work in the nice grid layout that I built&lt;/li&gt;
&lt;li&gt;Build new Grid layout for fields&lt;/li&gt;
&lt;li&gt;Ensure responsive&lt;/li&gt;
&lt;li&gt;Fix validation because you were being sloppy when rapidly doing the &lt;code&gt;cmd+x&lt;/code&gt; + &lt;code&gt;cmd+v&lt;/code&gt; all over the place and broke it&lt;/li&gt;
&lt;/ol&gt;
&lt;iframe class="mx-auto" src="https://giphy.com/embed/GTTxe2PWPftOU" width="480" height="352" frameBorder="0" class="giphy-embed" allowFullScreen&gt;&lt;/iframe&gt;&lt;p class="text-center"&gt;&lt;a href="https://giphy.com/gifs/computer-pics-smash-GTTxe2PWPftOU"&gt;via GIPHY&lt;/a&gt;&lt;/p&gt;</description></item><item><title>First Post</title><link>https://davidhallin.com/blog/first-post/</link><pubDate>Wed, 25 Mar 2020 00:00:00 +0000</pubDate><guid>https://davidhallin.com/blog/first-post/</guid><description>&lt;p&gt;Well - I just used Jigsaw to build this site. I started at 6:30 AM, and at the time of writing, it&amp;rsquo;s 7:28 AM on March 25th, 2020.&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;re already comfortable with Laravel, &lt;a href="https://jigsaw.tighten.co"&gt;Jigsaw&lt;/a&gt; is by far the easiest static-site generation tool I&amp;rsquo;ve played with so far - I&amp;rsquo;ve tried a few like Gatsby, and Nuxt, and I think they are awesome, but if you&amp;rsquo;re a PHP dev at heart, Jigsaw is goign to be an easier go for you.&lt;/p&gt;</description></item><item><title>about</title><link>https://davidhallin.com/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://davidhallin.com/about/</guid><description>&lt;p&gt;I&amp;rsquo;ve spent most of my career trying to understand how things fit together. Not just the code — the people, the problems, the business. I think the best software comes from developers who care about all of it.&lt;/p&gt;
&lt;h2 id="how-i-got-here"&gt;how I got here&lt;/h2&gt;
&lt;p&gt;I started out as a database administrator. For about five years I designed schemas, tuned queries, produced reports, and kept data flowing in healthcare and education systems. It was great work, and it heavily shaped how I approach my work today, but after a while I had some ideas that I wanted to build from the ground up.&lt;/p&gt;</description></item><item><title>uses</title><link>https://davidhallin.com/uses/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://davidhallin.com/uses/</guid><description>&lt;p&gt;Here&amp;rsquo;s what I&amp;rsquo;m currently using day-to-day. I&amp;rsquo;ll try to keep this up to date as things change.&lt;/p&gt;
&lt;h2 id="languages--frameworks"&gt;languages &amp;amp; frameworks&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://laravel.com/"&gt;Laravel&lt;/a&gt;&lt;/strong&gt; — my primary backend framework. I use it daily at Lumion and for personal projects. It&amp;rsquo;s the foundation of almost everything I build.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://livewire.laravel.com/"&gt;Livewire&lt;/a&gt; + &lt;a href="https://filamentphp.com/"&gt;Filament&lt;/a&gt;&lt;/strong&gt; — for building admin panels and interactive UIs within Laravel without reaching for a full SPA.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://go.dev/"&gt;Go&lt;/a&gt;&lt;/strong&gt; — I reach for this when I need performance or when the problem is math-heavy. I&amp;rsquo;ve written some neat pieces in it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://tailwindcss.com/"&gt;TailwindCSS&lt;/a&gt;&lt;/strong&gt; — I style everything with Tailwind at this point. Can&amp;rsquo;t imagine going back.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://alpinejs.dev/"&gt;Alpine.js&lt;/a&gt;&lt;/strong&gt; — lightweight interactivity without the overhead of a full JS framework.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://gohugo.io/"&gt;Hugo&lt;/a&gt;&lt;/strong&gt; — powers this site. Fast, simple, gets out of the way.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;Previously: Codeigniter, jQuery, Bootstrap, Sass, vanilla PHP&lt;/em&gt;&lt;/p&gt;</description></item></channel></rss>