code Fixing Elementor Popups with JavaScript Elementor is a free WordPress plugin that enhances your website to allow graphical drag and drop editing of websites and it's free. It is full of nice and helpful snippets with an especially powerful one being the ability add in Popups. This can give your website focus areas
code JavaScript Onetime Script with Delay Needed to have some JavaScript to do a onetime execution process after content is in the Document Object Model (DOM) and created. Hook into the load event https://developer.mozilla.org/en-US/docs/Web/API/Window/load_event Add an event listener to the window that is looking for the
code Chat GPT - ...Thoughts... I have some quick thoughts that about chat bots built on large language models. TLDR; They produce words in a reasonable pattern matched process, they do not understand or form any value or levels of truth to it and that is the stumbling block that is hitting people now and
code PHP cURL Request/Response JSON Debugging an integrators code that was written in PHP and came up with this test snippet. I'm using php cURL as it is the simplest to convert and compare with the command line interface of cURL <?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL
code Windows Features Open an administrator level PowerShell console Get-WindowsOptionalFeature -Online | where FeatureName -like 'IIS-*' | where State -eq "Enabled" Output FeatureName : IIS-WebServerRole State : Enabled FeatureName : IIS-WebServer State : Enabled FeatureName : IIS-CommonHttpFeatures State : Enabled FeatureName : IIS-HttpErrors State : Enabled FeatureName : IIS-ApplicationDevelopment State : Enabled FeatureName : IIS-Security State : Enabled FeatureName :
code Advent of Code - 2022 Can I complete Advent of Code 2022 in python this year? Last years entry and how far I got * 2022 - Python solutions I finished!! A little later than 25th, but I did catch Covid for the week of 18th - 25th.
code Windows Subsystem for Linux 2 I am running manticore search and redis within my Ubuntu 22 on top of Windows Subsystem for Linux 2 (WSL2) this allows me to connect my Windows development environment (Internet Information Services - IIS) to use linuxy development tools that don't change and match the Amazon Web Services
code Insert With Common Table Expression - MySql In the case you have a MySql table filled with default Lookup ids for each user in your system to a messsage id. In this case you are looking to fill in the many to many relationships of bridging table from a User table to the Message table. For simplicity
code And this is what the Devil does - JavaScript JavaScript our Lord and master and it's broken as fuck math because of the desire to treat all numbers as floating point. I know exactly why Brendan Eich did this. It's easier to build a single number type at the instruction level because I took a
code Improving Software: Automated Testing Building testing after the code is written and deployed is hard and expensive, so why? Feedback This is the goal of all testing to get direct results from inputs and does it match the expected outputs Reduce Change risk and remove problems Improve Understanding of internal code structure Team Effort
code Mobile Application Justification Native App - Flutter * Exposes current and new API for users * Validation of capabilities * Sample implementation (if open sourced) * Consistent experience for implementators * Enforces separation of responsibilities Benefits * Users get native application performance * Notifications are now prioritized * Background * Immediate Application * Grants API capabilities dictating form and consistency is kept * Native
code MySql - Delete all with foreign keys You want to delete a record in a MySql database but it has foreign keys and gives you the error code 1217 Generate all the applicable delete statements with the following query. Example I would like to delete the last record from the TheTable Statement SELECT Id From TheTable Order
code Stages of Rust Learning Rust stages * This is cool 🆒 * I am protected from mistakes 👑 * Why can't I do this borrow checker? 🤔 * Now there is a chain of fixes I must make 🧾 * Help please 😭 * Go back to Python and JavaScript 😸
code Disagree and commit Cult terms Have people used this term in your work lately? Disagree and commit It's a cult phrase and it is actively making me mad because this is what it means to me. * Disagree and submit (to what others say) * Disagree and ignore (the fuckup that is coming
code Fetch using Cross Site Request Forgery (CSRF) Need to post a request to service side method using fetch and CSRF. First tried the option of using credentials as this is secured and token authenticated. That didn't work so I need to use the MVC expected token authenticator header in this case of the Cross Site
code Mobile hacks: CSS, JavaScript Request is to center a div content within a widget (embedded html+javascript+css) into a large website. From this to this on mobile devices JavaScript The JavaScript injected code would need to be placed in a <script></script> block. Suggested the JavaScript injection as CSS
code Terminal Setup Windows Install * oh-my-posh * posh-git * Windows Terminal Powershell Set the profile.ps1 notepad $PROFILE Import-Module PSReadLine Import-Module -Name Terminal-Icons Set-PoshPrompt -Theme paradox Set-PSReadLineOption -PredictionSource History Set-PSReadLineOption -PredictionViewStyle ListView Set-PSReadLineOption -EditMode Windows Setting themes, fonts and icons in Windows TerminalI’ve been using Windows Terminal more and more over the past couple
code Google maps replace markers Sometimes you don't have the control or the ability to make direct changes to the served content of a webpage and especially a google maps. Google maps expects you to keep track of your markers as you place them on your map div, but if you are modifying
code Nginx Upgrade Gotchas Looking at my server configuration and saw that my Nginx version was 1.18.x which was release approximately April 2020 and that corresponds to probably when I was last editing my nginx reverse proxy start of Covid 19 restrictions etc. Time to upgrade to latest and greatest, what could
code Even numbers: SQL Problem: Print out the even numbers between 1 and 10 inclusive Normally you would a simple for/while loop and check for modulus, division but let's do it with SQL and recursive Common Table Expressions [https://www.essentialsql.com/introduction-common-table-expressions-ctes/] CTE MySql [https://www.mysql.com/] WITH RECURSIVE
code Autonomy: gitignore Git ignores .gitignore with .gitignore in .gitignore | Hacker NewsHacker News [https://news.ycombinator.com/item?id=31420268]First: No But it's not because you can do things like this or .gitignore with "*" Second: It's about autonomy These people should use forks of repos. Bam
code MySql JSON Search Array Search with JSON in a case insensitive manner across array values Create a table like so create table test.users ( id int auto_increment primary key, identifiers json null ); Fill the table with some sample data insert into users (identifiers) values ('{"names": ["Johnny", "John&
code Redis Pipeline Commands Wanted to send a set of commands to redis from the command line and the following techniques work. Working on the slot 1 database of redis here as specified by the -n 1 parameter. With sample commands to flush the cache and then exit. You can chain the commands to