List Code

Total Items found in Code is 1035.
This is a collection of various code tests and descriptions on how to use them. Primarily HTML, CSS, Javascript and PHP.
linux
php error feed errors: XML or PCRE extensions not loaded!

1. Install/Enable the PHP XML Extension:   Linux (Debian/Ubuntu): Open your terminal and run:   Code   ..

3:53 am, August 31, 2025
linux
linux
check nginx access logs for bots

3:50 am, August 28, 2025
linux
check connetions in linux every 10 seconds loop

just add this to a sh file and it will show the connections every 10 seconds. e.g. ./checkconns.sh354351325313303390386350365300364282263208271408338320

3:41 am, August 28, 2025
sqlite
load a random item from sqlite table

7:16 am, August 27, 2025
php
PHP FIX Fatal error: Uncaught Error: Call to undefined function curl_init()

Caused by Missing Curl Extention. sudo apt-get install php-curl restart nginx sudo service nginx restart    

1:01 am, August 25, 2025
linux
Fatal error: Uncaught Error: Call to undefined function mb_strlen()

this wasted an hour!!! grr sudo apt install php7.4-mbstring causes an error for php lite admin where it just displays blank  

4:03 am, August 24, 2025
php
a reusable function that extracts the Gemini API functionality

Here's a reusable function that extracts the Gemini API functionality:The function generateWithGemini() accepts: $prompt - The text prompt to send to the API $apiKey - Your Gemini API key $model ..

1:41 pm, August 21, 2025
sqlite
SQLite - load a game from games, that has not been processed - AI

Im just going add some of these here as they might be useful in the future. Request: Can you write a sqlite query to select the latest game from this table using insdate as the datetime structure ..

12:43 am, August 20, 2025
linux
blocking ip range with ufw

You can block an entire IP range using CIDR (Classless Inter-Domain Routing) notation with ufw. To block all addresses under 57.141.2.x, you'd specify the network as 57.141.2.0/24.1     ..

6:42 am, August 19, 2025
linux
check and block connections script

a safe diagnostic script that helps you check and analyze the connections.    ⚠️ Why Automatic Blocking is a Bad Idea   You could lock yourself out: An automated script ..

6:18 am, August 19, 2025
linux
block ip address ranges on ubuntu linux with UFW

  sudo ufw deny from 203.0.113.0/24

5:31 am, August 18, 2025
html
Content Editable

content editable tags with also making the style sheet editable as well as block if i dont target the style by an ID then it just makes all style tags on the page as display block which is a bit anno..

12:23 am, August 4, 2025
video
matrix test video no sound mp4

Link https://i.imgur.com/uotAQao.mp4 Preview

2:42 am, July 29, 2025
css
CSS 4 box custom grid row - New Version - July 2025

I fixed this one a little bit so that the boxes actually fit within the element width, as before they were kinda sticking out abit too much. Old Version.

4:34 am, July 28, 2025
css
override the hero image background on this page

this is just cos im lazy and want to override the image here ^^^

11:44 pm, July 25, 2025
css
Striped Background Gradients in CSS + HTML

Testing out Stacked Linear Gradient background to create striped gradients in CSS and HTML. 

7:23 am, July 23, 2025
minecraft
css
Changing the Background in CSS

  Some of the properties of using a CSS background on a div, how to set the background color, opacity and also using an image as a background with CSS. ⌚Timestamps🏹 0:15 CSS Backgroun..

4:38 am, July 17, 2025
linux
list all network connections linux

list all of the network connections netstat -a list a summary of the connections ss --summary list connections with count netstat -an|grep ESTABLISHED  

7:51 am, June 25, 2025
blocking
blocking all ips in a range

block all ips in a range // The IP prefixes you want to block. Add a dot at the end.$ip_block = ['47.79.']; foreach ($ip_block as $ip_block_val) {  // Check if the user's IP address begins ..

7:50 am, June 25, 2025
html
sticky table headers

nice looking tables that have sticky headers, credits in link below. seems to be all css as well, nice! commented out the global stuff

11:51 pm, June 12, 2025
js
modal no libs just js and css

modal with no js libs just css html and a bit of js... yay?

11:48 pm, June 12, 2025
css
Using accent-color to change check box color

So apparently accent color is a new(ish) property or maybe its just new to me. You can use this to change or select things like the background color on input check boxes. You can see in the exampl..

1:45 am, April 30, 2025
css
Making an image responsive using css using background cover

the following css will make an image display 100% its size and keep its aspect ratio if the screen size or element size gets smaller than the containing image. you should be able to drag the edge of t..

12:08 pm, March 17, 2025
slick
change slick slides to adaptive height

just a code snippit at the moment need to add a working example here

2:18 am, March 14, 2025
javascript
Locate a DIV and CLASS and create an IMAGE element using JAVASCRIPT

I had this weird request the other day, well today to replace an image thumbnail that was generated by an aspx script, but the link was from youtube and the list was not auto loading the thumbnail.&nb..

11:29 pm, March 2, 2025
wordpress
wp simple blocks plugin

Just saving this here for later testing: This is just AI generated crap that does not work, ignore it... ;)   Absolutely, let’s start fresh with a simple WordPress plugin that loads a si..

6:38 am, February 27, 2025
html
🔗How to add a Link in HTML?

How to add a link in your HTML and other random things about html links! 

10:36 pm, February 18, 2025
react
Create a React App with Vite and TypeScript on Windows

This assumes that you already have the latest node installed, i had some issues as i had an old version installed and had to manually delete it.  You can check the version of node by typing node..

2:53 am, February 6, 2025
modal
custom modal nice and easy

a nice and simple modal custom made

6:09 am, January 31, 2025
javascript
reload window automatically with javascript

script to reload the window automatically the same as pressing the reload button on the browser so there may still be cache issues when reloading this you can change the 5000 to another value to chan..

5:02 am, January 31, 2025
html
CSSnowflakes simple snowflakes non-JS snowflakes for your website

i like this one as its a nice and simple copy and paste effect that just covers the whole site and does not get in the way of other things like some other scripts i have come across. 

1:03 am, December 10, 2024
html
snowflakes falling body effects

12:59 am, December 10, 2024
html
HTML how to add an IMAGE! Quick HTML Tutorial

Just doing a bit of a series on HTML basics, i will list them here as i add them. We upload an image to imgur, and i show how to get the image link and insert it into html to show it! Super basic a..

1:20 am, November 15, 2024
html
HTML How to CENTRE Text Easy! - Quick HTML and CSS Tutorial

How to center text in html, there is a few options i discuss here and probably more that i missed out.  Codepen: https://codepen.io/kruxor/pen/poMOVYe

5:58 am, November 12, 2024
animation
css
flex to align pagination in list format

using flex to turn a unordered pagination list into a horizontal list

5:44 am, October 22, 2024
windows
disable recall on windows 11

Apparently this can recall what you type??...  Open up the Terminal (as Admin) and type in this command  WIN+X Dism /Online /Get-Featureinfo /Featurename:Recall

10:46 pm, October 15, 2024
wordpress
Wordpress Use the settings API

2:14 am, September 27, 2024
wordpress
fonts
Quick Embed - Google Font - DM Sans

DM Sans font quick embed and css class

3:27 am, September 4, 2024
linux
show all connections on linux command line

the ss command will show all connections

4:09 am, June 28, 2024
php
php redirect

quick and simple php redirect to a url

12:42 am, June 28, 2024
react
React - Use State to Toggle an Element

Mastering React State: Toggling Elements with Confidence React's state management system is a powerful tool for building dynamic and interactive user interfaces. One common use case involves to..

12:33 am, June 12, 2024
react
Bind 'this' to a Class Method

Binding 'this' to Class Methods in React React class components allow you to define custom methods alongside managing state and props. These methods often need to access component properties li..

11:52 pm, June 11, 2024
wordpress
Disable the ACF Warning message in wordpress dashboard

add code to functions.php

2:43 am, June 11, 2024
react
Welcome

This is my test area for webdev. I keep a collection of code here, mostly for my reference. Also if i find a good link, i usually add it here and then forget about it. more...

You could also follow me on twitter. I have a couple of youtube channels if you want to see some video related content. RuneScape 3, Minecraft and also a coding channel here Web Dev.

If you found something useful or like my work, you can buy me a coffee here. Mmm Coffee. ☕

❤️👩‍💻🎮

🪦 2000 - 16 Oct 2022 - Boots
Random Quote
“We ought to take outdoor walks in order that the mind may be strengthened and refreshed by the open air and much breathing.".
Seneca
Random CSS Property

caret-color

The caret-color CSS property sets the color of the insertion caret, the visible marker where the next character typed will be inserted. This is sometimes referred to as the text input cursor. The caret appears in elements such as <input> or those with the contenteditable attribute. The caret is typically a thin vertical line that flashes to help make it more noticeable. By default, it is black, but its color can be altered with this property.
caret-color css reference