get IP address from terminal OSX
When troubleshooting network issues or configuring devices, knowing your IP address can be essential. Whether you're connected via Wi-Fi, Ethernet, or tethering through a mobile provider, macOS offers powerful built-in tools to quickly identify your IP address. Here's a practical guide tailored to Australian users with step-by-step instructions.
date formatter
Working on formatting the date in Xcode, and you come across the situation where you need to check or test the date format. NSDateFormatter is a great site to check your date format string. I wanted to transform the 2019-08-15 10:34:49+1000 to Aug 15, 12:34 AM.
Number decimal places
Adding a floating decimal point for n number of places is quite easy to achieve. The key to understand is the receive an outcome of a fraction the numbers need to be Double. So Int numbers will result in a whole number product. By way of example:
- 80 / 3 = 26
We know that this result is incorrect. To get the correct outcome the equation needs to be as follows:
Failed to find a certificate matching the domain in SNI extension
Adding ejabbed MYSQL schema to your database
The starting point is to read through and follow the notes outlined on the ejabberd site regarding adding database schema. The purpose of this documentation is to clarify where the files were located for me.
The schema files can be found in ejabberd priv directory. To find the priv directory, use the find command
Install Spyc library
Using shell access you the site you want to add the Spyc library. Then go to the libraries directory and add the following commands:
mkdir spyc cd spyc wget https://github.com/mustangostang/spyc/blob/master/Spyc.php
To verify that Spyc is active, go to the status area of admin (admin/reports/status)
Installing erlang
To add Erlang repository that also includes the public key for verifying signed package, use the following shell commands:
wget https://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpmrpm -Uvh erlang-solutions-1.0-1.noarch.rpm
Install Erland
yum install erlang
Check that Erland has been installed enter the command (case sensitive)
Updating MYSQL 5.5 -> 5.7
To add ejabberd and run MYSQL to the server I needed to update the server version of mysql from 5.5 to 5.7. Fortunately, there are great instructions on the Plesk support page regarding how to achieve this outcome.
Updating ejabberd
Overview
To update ejabberd you need to remove it, then re-install with the latest version. However, do check for database changes before initiating this process from the ejabberd documentation site (https://docs.ejabberd.im/admin/upgrade/).
Adding a Custom Font to Your App
For detailed notes regarding how to add custom fonts to your iOS app see Apple's custom font notes.