Tuesday, September 17, 2024

[macOS] import cer and trust root cer


 security add-trusted-cert -r trustRoot -k  ~/Library/Keychains/login.keychain file.pem   

Monday, June 24, 2024

[macOS] Git File Locking

 


Install Git LFS


Before getting started, make sure you have Git LFS installed in your computer. Open a terminal window and run:

git-lfs --version


If it doesn’t recognize this command, you must install it. There are several installation methods that you can choose according to your OS. To install it with Homebrew:

brew install git-lfs


Once installed, open your local repository in a terminal window and install Git LFS in your repository. If you’re sure that LFS is already installed, you can skip this step. If you’re unsure, re-installing it does no harm:

git lfs install

For more information, see Git Large File Storage (LFS).

Lock files

By locking a file, you verify that no one else is editing it, and prevent anyone else from editing the file until you’re done. On the other hand, when you unlock a file, you communicate that you’ve finished editing and allow other people to edit it.

To lock or unlock a file with Exclusive File Locking, open a terminal window in your repository directory and run the commands as described below.

To lock a file:

git lfs lock path/to/file.png


To unlock a file:

git lfs unlock path/to/file.png


You can also unlock by file ID (given by LFS when you view locked files):

git lfs unlock --id=123


If for some reason you need to unlock a file that was not locked by yourself, you can use the --force flag as long as you have Maintainer permissions to the project:

git lfs unlock --id=123 --force


You can push files to GitLab whether they’re locked or unlocked.


Sunday, June 16, 2024

Docker Images from Oracle

Official source of container configurations, images, and examples for Oracle products and projects


 oracle/docker-images: Official source of container configurations, images, and examples for Oracle products and projects (github.com)


Import private key in Mac OS

Export key pair with keystore explorer in pem format

 


In terminal run the command.

security import ~/Documents/gitlab/key.pem -f openssl  -k ~/Library/Keychains/login.keychain  -T /Applications/Microsoft\ Edge.app


Tuesday, June 6, 2023

Downloading an Entire Web Site with wget


Ref: https://www.linuxjournal.com/content/downloading-entire-web-site-wget

If you ever need to download an entire Web site, perhaps for off-line viewing, wget can do the job—for example:

$ wget \
     --recursive \
     --no-clobber \
     --page-requisites \
     --html-extension \
     --convert-links \
     --restrict-file-names=windows \
     --domains website.org \
     --no-parent \
         www.website.org/tutorials/html/

This command downloads the Web site www.website.org/tutorials/html/.

The options are:

  • --recursive: download the entire Web site.

  • --domains website.org: don't follow links outside website.org.

  • --no-parent: don't follow links outside the directory tutorials/html/.

  • --page-requisites: get all the elements that compose the page (images, CSS and so on).

  • --html-extension: save files with the .html extension.

  • --convert-links: convert links so that they work locally, off-line.

  • --restrict-file-names=windows: modify filenames so that they will work in Windows as well.

  • --no-clobber: don't overwrite any existing files (used in case the download is interrupted and resumed).

Wednesday, May 31, 2023

Centos 8 not updating


 Ref: https://www.digitalocean.com/community/questions/cento-os-8-not-updating

Error: signature hdr data: BAD

I’ve reported this however for the time being what you can do is to update rpm alone and then do the dnf update on all packages;

  1. dnf update rpm

After that is completed:

  1. dnf update

 

CentOS through a VM - no URLs in mirrorlist

 

Ref: https://stackoverflow.com/questions/70926799/centos-through-a-vm-no-urls-in-mirrorlist

Check out this article: CentOS Linux EOL

The below commands helped me:

sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*

Doing this will make DNF work, but you will no longer receive any updates.

To upgrade to CentOS 8 stream:

sudo dnf install centos-release-stream -y
sudo dnf swap centos-{linux,stream}-repos -y
sudo dnf distro-sync -y

Optionally reboot if your kernel updated (not needed in containers).

Install and use xorg-server on macOS via Homebrew

  The instructions to install and use xorg-server on macOS via Homebrew: Install Homebrew (if you haven't already): /bin/bash -c ...