By marcom on Thursday, March 16, 2023
Snowy mountains

To clone a GitHub repository with a different user:

  1. Open your terminal or command prompt and navigate to the directory where you want to clone the repository.

  2. If your GitHub username is "username", simply run:

    $ git clone https://username@github.com/example/repo.git

     

  3. Enter your GitHub password when prompted

By marcom on Sunday, March 12, 2023
Amazon packages

Publishing a PHP library to Packagist.org is a straightforward process that involves a few simple steps. An existing Github repository that is public is required (although private is also available) in order to submit to Packagist.

By marcom on Tuesday, February 14, 2023
grayscale photography of person holding coin or token

In Drupal 9, you can create custom tokens using the Token API for your custom module. The Token API provides a central API for modules to use to provide tokens. Tokens are placed into text by using the [type:token] syntax, where type is the machine-readable name of the token type, and token is the machine-readable name of the token within the type.

By marcom on Monday, March 13, 2023
Linux (Ubuntu) bash terminal in Windows subsystem for Linux (WSL)

You can check the version of SSH (Secure Shell) on an Ubuntu server by running the following command in the terminal:

$ ssh -V

This will display the version of the SSH client installed on your system. If you want to check the version of the SSH server, you can connect to the server using SSH and run the same command.

Alternatively, you can check the version of the OpenSSH package installed on your Ubuntu server by running the following command:

By marcom on Tuesday, March 7, 2023
Pinned locations on map of globe.

This issue persists on Ionic 6 and React Leftlet 4. To solve it, call the resize event when the page has finished rendering and animating.

By marcom on Friday, March 10, 2023
Early morning hike near Apache Junction AZ

When you encounter a 404 error not found in your Ionic PWA build for Angular or React, it means that the server is unable to locate the requested file or resource. To fix this, you need to include an .htaccess in your Ionic project and add the following directives.

By marcom on Friday, March 10, 2023
Pebble stacks

To include an .htaccess file in your Ionic PWA build, you need to place the file in the public directory of your project.

  1. Create a file named .htaccess in the public directory of your project.

  2. Build your project using the ionic build command. This will copy the .htaccess file to the build directory.

By marcom on Monday, March 6, 2023
Brewing coffee

HomeBrew is a command line package manager and has native support for macOS and is an essential tool for any web developer. HomeBrew is intended for advanced users that like to have a broad range of command line utilities available.

If you haven’t installed HomeBrew before, install the Command Line tools first.

By marcom on Friday, February 17, 2023
MacBook Air beside green leaf

Working with Git will make it more efficient using SSH keys, since you do not have to constantly enter in your username and password or personal access token. Make sure your Git site URL is set to use the SSH URL for your repo.

By marcom on Thursday, February 16, 2023
YubiKey 5C NFC - Two Factor Authentication USB and NFC Security Key

In the digital age, passwords are one of the primary methods used for securing our online accounts and devices. However, the effectiveness of passwords in securing our personal data and digital assets is often questioned due to the increasing prevalence of data breaches and cyber-attacks. This has led to the search for alternatives to traditional passwords, and passkeys have emerged as a viable replacement.

Tags
By marcom on Wednesday, February 15, 2023
black laptop computer turned on on table

For the single-byte encoded (binary) strings:

substr($username, 0, 1);
// or 
$username[0] ?? null;

For the multi-byte encoded strings, such as UTF-8:

mb_substr($username, 0, 1);
Tags
By marcom on Tuesday, February 14, 2023
black and red laptop computer

X.509 is a standard format for public key certificates, digital documents that securely associate cryptographic key pairs with identities such as websites, individuals, or organizations. However, this can also be converted to .pem files using OpenSSL.