Category web developer

Laravel mix image processing

Before Laravel 5(ish), people used gulp to minimize/refresh images. It just came with it and was easy to implement. Now with Laravel Mix, you have to install a few npm packages in order to have the image compression that gulp…

Regex for time format

This will be quick and dirty. I was looking for a regex that handles checking an input time in this kind of format: hh:mm(am or pm). So I wanted to accept the following: 06:00am 6:00am 12:00pm But not accept: 6:00…

jQuery IE Detection

Ask any web developer and 99.99% of them will say they hate IE. IE is always behind on adapting new features. Whether it's new CSS or new HTML tags, it's always been a pain in the butt.  For many, many years, there was a way to add an IE only CSS style sheet. You could even target the version. Since the launch of IE 10 (I think it was 10--I could be off), they stopped allowing this. So how do you target IE layout issues?

SCP (copy) folder/file from server to local

Anyone who has tried to update their local box or moved sites to a different server will notice that it's just not updating the database that is required. In my most recent scenarios, I'm trying to pull a fresh copy of a staging to my local and I'm missing all the uploads so it still looks weird.

Laravel 5.4 migrations & max key length

I’ve recently switched to a Laravel 5.4 project. After trying to run migrations, I kept getting this darn error:  [PDOException] SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes It made no…

PHP CLI PHP Path

Two in one day! These posts are mainly helping me remember things down the road. Like the Local host one. I have re-visited that post so freakin' often.

Orderby if null

I'm posting about this today because I feel like this is a very not well known little mySql knowledge and it really saved me. I've got an employee table that has a first name, last name AND nickname.

Laravel’s Eloquent and firstOrNew

Hey everyone! This is yet another web dev post and this is gonna be quick and dirty.. It’s regarding Laravel and the Eloquent’s firstOrNew. firstOrNew is like firstOrCreate, but instead of creating an instance in the database, it just retrieves…

SSH and Putty color schemes

I've been using Putty for SSH for over a year now. I really haven't changed the default settings since using it. After having to live in SSH the last couple of weeks, I got seriously tired of the black background and dark blue colors. SO annoying. I tried to do a lot of research on how to change it via SSH and profiles and .dircolors. It just wasn't working. I could get it to work temporarily when I sourced a file once but it never stuck. Tried it through Putty as well, but again, it never worked or the color scheme was replaced when I logged out and logged in. I was finally able to figure out what buttons to push and in what order thanks to one ServerFault thread that kind of shed light on it.

SSH and aliases

I've had one heck of a week at work. I was given a fresh server and was told to install PHP, mysql, GIT, and everything on it that's required for my application so my app could function and be secure. I had to do this via SSH. One thing that I'm not very good at. Thank god I am surrounded by guys who rock at it and have more SSH experience than me. One thing I quickly learned: Aliases are freakin' awesome.