Skip to content

Instantly share code, notes, and snippets.

Avatar

Fernando Aleman fernandoaleman

View GitHub Profile
@fernandoaleman
fernandoaleman / update-chef-version.md
Last active Sep 25, 2021
How to update version of chef client on node
View update-chef-version.md

Update Chef Version

How to update version of chef client on node

curl -L https://www.opscode.com/chef/install.sh | sudo bash -s -- -v 17.5.22
View how-to-backup-and-restore-redis.md

How To Backup and Restore Redis

Backup

Login to Redis

$ redis-cli
@fernandoaleman
fernandoaleman / how-to-install-openssh-8.7-on-centos-7.md
Last active Oct 11, 2021
How to install openssh 8.7 on CentOS 7
View how-to-install-openssh-8.7-on-centos-7.md

How To Install OpenSSH 8.7 on CentOS 7

This tutorial goes through how to install openssh 8.7 on CentOS 7, since the yum repo only installs up to openssh 7.4.

Requirements

Upgrade the system

yum -y update
@fernandoaleman
fernandoaleman / how-to-install-openssl-1.1.1-on-centos-7.md
Last active Oct 15, 2021
How to install openssl 1.1.1 on CentOS 7
View how-to-install-openssl-1.1.1-on-centos-7.md

How To Install OpenSSL 1.1.1 on CentOS 7

This tutorial goes through how to install openssl 1.1.1 on CentOS 7, since the yum repo only installs up to openssl 1.0.

Requirements

Upgrade the system

yum -y update
@fernandoaleman
fernandoaleman / pg_backup.config
Last active Apr 19, 2021
Postgres backup script
View pg_backup.config
##############################
## POSTGRESQL BACKUP CONFIG ##
##############################
# Optional system user to run backups as. If the user the script is running as doesn't match this
# the script terminates. Leave blank to skip check.
BACKUP_USER=backup
# Optional hostname to adhere to pg_hba policies. Will default to "localhost" if none specified.
HOSTNAME=
View chefspec-invalid-data-bag-path-error.md

Problem

Using chef_vault_item in a recipe and testing via ChefSpec returns the following error:

Chef::Exceptions::InvalidDataBagPath:
       Data bag path '/var/folders/5d/46p9wf6976l9xptq3fwsrj9r0000gp/T/d20210228-64571-1lao3dr/data_bags' not found. Please create this directory.

Solution

View keybase.md

Keybase proof

I hereby claim:

  • I am fernandoaleman on github.
  • I am fernandoaleman (https://keybase.io/fernandoaleman) on keybase.
  • I have a public key ASAvmS_mMPd7J7hcMXaB0I-OHP_3ZuuAuOcFsRgyJSPQjQo

To claim this, I am signing this object:

@fernandoaleman
fernandoaleman / rabbitmqadmin
Created Sep 16, 2020
rabbitmqadmin - Install on Linux server under /usr/local/bin directory
View rabbitmqadmin
#!/usr/bin/env python3
# The contents of this file are subject to the Mozilla Public License
# Version 1.1 (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# https://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
# License for the specific language governing rights and limitations
View how-to-clean-up-ubuntu.md

How To Clean Up Ubuntu

Some simple ways to free up space on Ubuntu

Remove Unnecessary Packages and Dependencies

apt-get autoremove
@fernandoaleman
fernandoaleman / already-initialized-constant-etc.md
Created Apr 29, 2020
Chef command warning: already initialized constant Etc::
View already-initialized-constant-etc.md

Problem

Chef command warnings concerning already initialized constants

warning: already initialized constant Etc::SC_AIO_LISTIO_MAX
warning: already initialized constant Etc::SC_AIO_MAX
warning: already initialized constant Etc::SC_AIO_PRIO_DELTA_MAX
warning: already initialized constant Etc::SC_ARG_MAX
warning: already initialized constant Etc::SC_ATEXIT_MAX