Generated by All in One SEO v5.0.0.1, this is an llms.txt file, used by LLMs to index the site. # Trev's code hints, tips and notes Information I've collected over time relating to all aspects of writing and testing code ## Sitemaps - [XML Sitemap](https://code.trev.id.au/sitemap.xml): Contains all public & indexable URLs for this website. ## Posts - [Understanding pointers in the GO language](https://code.trev.id.au/understanding-pointers-in-the-go-language/) - Go, also known as Golang, is a statically typed, compiled programming language designed at Google. Known for its simplicity, efficiency, and strong support for concurrent programming, Go has become a popular choice for many developers. One of the key features of Go, borrowed from languages like C and C++, is the use of pointers. Understanding - [Using AI to generate code - who owns the code?](https://code.trev.id.au/using-ai-to-generate-code-who-owns-the-code/) - There is a potential catch with using AI to generate your code. The good news as a developer, ChatGPT and the OpenAI systems clearly state that you own the Intelectual Property. But what about others? I did check Google's AI and it claimed Google owned the IP. Here is the question I asked: When I - [Raspberry Pi 4 with extra UARTs](https://code.trev.id.au/raspberry-pi-4-with-extra-uarts/) - The Raspberry Pi 4 introduced a number of extra UART's for serial connections to various other systems. This short note provides the configuration I use as standard with RPi's that need extra Serial Ports. /boot/firmware/config.txt or used to be /boot/config.txt contents: # For more options and information see # http://rptl.io/configtxt # Some settings may impact - [WebCam on Raspberry Pi 4](https://code.trev.id.au/webcam-on-raspberry-pi-4/) - Setting up a WebCam using USB on a Raspberry Pi 4 turns out to be quite easy. This setup that involves building the application MJPG Streamer will stream the webcam to a web browser that you can access from anywhere you want it to be accessed from. The main homepage for this application is at - [Centos 7 remove MariaDB and replace with MySQL](https://code.trev.id.au/centos-7-remove-mariadb-replace-mysql/) - Why A number of reasons, but the one that was the trigger for me was: MariaDB does not have JSON data type MySQL version 5.7 does have JSON data type. System info The server I tested this process on has the following details: uname -a: Linux s14.iotau.io 3.10.0-862.3.3.el7.x86_64 #1 SMP Fri Jun 15 04:15:27 UTC 2018 - [CentOS 7 add swap](https://code.trev.id.au/centos-7-add-swap/) - Adding swap to a CentOS 7 AWS virtual machine This is the steps for adding swap space to an CentOS 7 server. dd if=/dev/zero of=/swapfile count=2048 bs=1MiB chmod 600 /swapfile chown root. /swapfile mkswap /swapfile swapon /swapfile echo "/swapfile swap swap sw 0 0" >> /etc/fstab Check to make sure it created correctly swapon -s - [You don't have permission to access /awstats/awstats.pl on this server](https://code.trev.id.au/you-dont-have-permission-to-access-awstats-awstats-pl-on-this-server/) - Installing AWStats 7 via yum on CentOS 7 with Apache 2.4 and resolving the error "You don't have permission to access /awstats/awstats.pl on this server" Step 1: Minimum prerequisites yum install epel-release yum install httpd systemctl enable httpd systemctl start httpd Step 2: Install AWStats The following (at the time of this post) installed version - [Monitor the connection to your Internet Service Provider (ISP)](https://code.trev.id.au/monitor-the-connection-to-your-internet-service-provider-isp/) - In Australia we are forced to use the NBN as the Internet Carrier. They have a specification that the service is functioning as intended if there are less than 4 outages in a given calendar day. This python script will provide you with timestamped log file when the service is operating and when it is ## Pages - [Sample Page](https://code.trev.id.au/sample-page/) - This is an example page. It's different from a blog post because it will stay in one place and will show up in your site navigation (in most themes). Most people start with an About page that introduces them to potential site visitors. It might say something like this: Hi there! I'm a bike messenger ## Categories - [centos](https://code.trev.id.au/category/centos/) - [python](https://code.trev.id.au/category/python/) - [network](https://code.trev.id.au/category/network/) - [monitor](https://code.trev.id.au/category/monitor/) - [Dev Environment](https://code.trev.id.au/category/dev-environment/) - [AI](https://code.trev.id.au/category/ai/) - [GO/Golang](https://code.trev.id.au/category/go-golang/) ## Tags - [centos](https://code.trev.id.au/tag/centos/) - [postfix](https://code.trev.id.au/tag/postfix/) - [mariadb](https://code.trev.id.au/tag/mariadb/) - [mysql](https://code.trev.id.au/tag/mysql/) - [remove mariadb](https://code.trev.id.au/tag/remove-mariadb/) - [libmysqlclient.so.18](https://code.trev.id.au/tag/libmysqlclient-so-18/) - [mysql 5.7](https://code.trev.id.au/tag/mysql-5-7/) - [JSON](https://code.trev.id.au/tag/json/) - [datatype](https://code.trev.id.au/tag/datatype/) - [centos7](https://code.trev.id.au/tag/centos7/) - [swap](https://code.trev.id.au/tag/swap/) - [AWStats](https://code.trev.id.au/tag/awstats/) - [Apache](https://code.trev.id.au/tag/apache/) - [httpd](https://code.trev.id.au/tag/httpd/) - [permission](https://code.trev.id.au/tag/permission/) - [access](https://code.trev.id.au/tag/access/) - [awstats.pl](https://code.trev.id.au/tag/awstats-pl/) - [server](https://code.trev.id.au/tag/server/) - [usb](https://code.trev.id.au/tag/usb/) - [rpi](https://code.trev.id.au/tag/rpi/) - [raspberry pi](https://code.trev.id.au/tag/raspberry-pi/) - [raspberry](https://code.trev.id.au/tag/raspberry/) - [webcam](https://code.trev.id.au/tag/webcam/) - [web cam](https://code.trev.id.au/tag/web-cam/) - [stream](https://code.trev.id.au/tag/stream/) - [streaming](https://code.trev.id.au/tag/streaming/) - [video](https://code.trev.id.au/tag/video/) - [go](https://code.trev.id.au/tag/go/) - [golang](https://code.trev.id.au/tag/golang/) - [programming](https://code.trev.id.au/tag/programming/) - [pointers](https://code.trev.id.au/tag/pointers/) - [struct](https://code.trev.id.au/tag/struct/) - [slice](https://code.trev.id.au/tag/slice/) - [memory](https://code.trev.id.au/tag/memory/) - [ai](https://code.trev.id.au/tag/ai/) - [ip ownership](https://code.trev.id.au/tag/ip-ownership/) - [code](https://code.trev.id.au/tag/code/) - [who owns](https://code.trev.id.au/tag/who-owns/)