Override your method with $event, and then add your parameters after that
So if you are like me, you tend to forget some of the litter nuances of frameworks. Especially if you’re writing a multiple languages. In 5 minutes, you might touch python for your backend, PHP for your website, view for your front end, and then be knee-deep in MySQL queries.
As I was working on a piece of one of my Vue Components, I was trying to get an :on-click event to handle multiple parameters. However, for some reason I could only get the value paraments of the <v-select> to appear in one of my methods that I was calling on the event. …
If you are anything like me, and have common sense in the workplace, you don’t want to waste your time watching videos that re-iterate what you have already learned AND apply on a daily basis in the workplace. Below are the steps to skip through those videos.
let boring = document.querySelector('video');
boring.currentTime = boring.duration
That’s it! The video will automatically fast forward to the end and you can move to the next video/exercise.
Enjoy! Now get back to coding something great!!
I tried searching through a HD that I have for a particular file. However, using the Search in Window Explorer is slow. And using Powershell was even worse. The following code made me want to go be a farmer in the hills…
ls DIRECTORY_LOCATION_HERE | Select-String "Blah"
So I turned to my favorite snake, Python!!!
Below is the code I wrote to find all files that included my search term. Enjoy.
Happy Coding! And if you haven’t already done so, make sure to subscribe to Code Kings publication on Medium for other tips and tricks.
This is a quick guide on how to successfully share a local drive inside your VM running on Virtualbox.
For a project that I am currently working on, I am creating a chat application within a single page Vue application with a Laravel backend, and then I ran into this problem.
I ran into an issue where as I would have users disconnect and reconnect to the chat instance (aka the Echo listeners), they would hear the same event multiple times. So if a user typed “Hello” and they had entered/exited the chat box 4x. They would get:
This is because you have one global Pusher Echo instance running on your main part of your app. Simply disconnect() and then re-instantiate the Echo object. It will destroy the instantiated listeners. Then simply re-attach your listeners and you are good. In my case, I simply created a new Echo instance that I could destroy and re-create as needed for my chat application.
While I was sitting here at work trying to do some C# work on Ellie Mae’s Encompass Platform, I thought I’d share a quick post about how to modify a registry key in Powershell. You can also use the regedit tool if you’d like, but I prefer to live in terminals & consoles :).
Open up Powershell in Administrator mode.
On a normal Windows installation you can go to
However, if you are unsure what drive or dir your HKLM is, you can use the command to view all your connected drives in Powershell:
You’ll get an output similar to…
I was sitting at a co-working space and I wanted to get my VM on the local network. However, I wasn’t sure what IPs were available on the network, so I wanted to make sure which ip’s were available, or at least not being used at this present time. I went to use my ol’ trust Nmap program to scan the network and got this error
dnet: Failed to open device eth0
My Npcap was out of date.
If you are using Win 10, make sure to download the latest version of Nmap and Npcap. Should be good after that. I ran mine via Powershell.
When I try to ping my local laravel valet site with Postman API Explorer, I get this error:
When you use laravel valet’s secure option ( to auto generate a secure https connection), it creates it’s own SSL cert for your local environment. However I suspect that Postman doesn’t have a CA that can authenticate that newly created SSL cert, therefore it fails
Although, this is a “solution”, I would perfer to call this more of a workaround, as it’s more of a temporary fix that will affect other sites you use with Postman, so remember to change back the follow setting after use.
Again, make sure to re-enable this for your other sites, otherwise you won’t be validating proper SSL connections with other sites.
I found myself running into a problem with my Laravel Valet when running Vue.js devtools. To install the Vue.js devtools I ran:
yarn run my_script_name_in_my_package_json_file
It wouldn’t render Vue and I got this error when trying to run
valet secure my_site_namedyld: Library not loaded: /usr/local/opt/icu4c/lib/libicuio.64.dylib
Referenced from: /usr/local/bin/php
Reason: image not found
Upon doing some research I found this has something to do with brew not using the proper dependencies for the icuio64 library. Here is a quick script to reinstall the apps that use icuio64 as a dependencies
brew uses --installed icu4c | xargs brew reinstall
Once that script is completed, you might have to manual remove the reinstall package from the “Cellar” of the Brew installation. It will give you instructions on how to do that in the terminal. …
Change the DB config to see the MySQL box name (like devboxsql) in your hostname, can’t use localhost, since, well, technically it’s not on the localhost of your php container.