Skip to content

Instantly share code, notes, and snippets.

Avatar

Fernando Aleman fernandoaleman

  • Dallas, TX
View GitHub Profile
@fernandoaleman
fernandoaleman / fix-libv8-mac.txt
Created May 5, 2016
Fixing libv8 and therubyracer on Mac
View fix-libv8-mac.txt
brew tap homebrew/versions
brew install v8-315
gem install libv8 -v '3.16.14.13' -- --with-system-v8
gem install therubyracer -- --with-v8-dir=/usr/local/opt/v8-315
bundle install
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 install-rabbitmq-centos-7.md

Install RabbitMQ on CentOS 7

sudo yum -y install epel-release
sudo yum -y update

Install Erlang

Download repository

@fernandoaleman
fernandoaleman / mysql2-catalina.md
Last active Feb 24, 2021
Install mysql2 on MacOS Catalina
View mysql2-catalina.md

Problem

Installing mysql2 gem errors on MacOS Catalina with MySQL 5.7.

Solution

Make sure openssl is installed on Mac via Homebrew.

brew install openssl
@fernandoaleman
fernandoaleman / mysql2-mojave.md
Last active Feb 12, 2021
Install mysql2 on MacOS Mojave
View mysql2-mojave.md

For MacOS Catalina, visit Install mysql2 on MacOS Catalina

Problem

Installing mysql2 gem errors on MacOS Mojave.

Solution

Make sure openssl is installed on Mac via Homebrew.

@fernandoaleman
fernandoaleman / clone-git-repo.txt
Last active Feb 9, 2021
How to clone git repo with all branches and tags
View clone-git-repo.txt
# Clone repo
git clone --mirror git@github.com/fernandoaleman/app.git app/.git
# Change into app directory
cd app
# Update git config
git config --unset core.bare
# Checkout master branch
@fernandoaleman
fernandoaleman / apache-503-proxy.md
Last active Feb 5, 2021
Solving Apache 503 “Service temporarily unavailable” proxy timed out
View apache-503-proxy.md

Error

[Tue Jun 03 22:05:51 2014] [error] (110)Connection timed out: proxy: HTTP: attempt to connect to 127.0.0.1:3000 (127.0.0.1) failed
[Tue Jun 03 22:05:51 2014] [error] ap_proxy_connect_backend disabling worker for (127.0.0.1)
[Tue Jun 03 22:05:52 2014] [error] proxy: HTTP: disabled connection for (127.0.0.1)
[...]

The problem is that the Apache proxy module, recognising that the service was unavailable, stopped redirecting requests to it for one minute.

@fernandoaleman
fernandoaleman / rpm-from-source.sh
Created Nov 18, 2011
How to create an RPM from source with spec file
View rpm-from-source.sh
# How to create an RPM from source with spec file
# This is for Redhat versions of linux. Sometimes when you search for an rpm package,
# it is either outdated or not available. The only thing available is the source code.
# You can create a custom RPM package from source.
#
# For this example, I'll be using the latest version of Git, currently v.1.7.7.3
# Step: 1
# Install rpmbuild
@fernandoaleman
fernandoaleman / rbenv-1.8.7-openssl.patch
Created Jun 5, 2014
Patch to solve error when installing ruby 1.8.7 with rbenv or ruby_build and openssl 1.0.1x
View rbenv-1.8.7-openssl.patch
--- ext/openssl/ossl_pkey_ec.c
+++ ext/openssl/ossl_pkey_ec.c
@@ -757,8 +757,10 @@ static VALUE ossl_ec_group_initialize(int argc, VALUE *argv, VALUE self)
method = EC_GFp_mont_method();
} else if (id == s_GFp_nist) {
method = EC_GFp_nist_method();
+#if !defined(OPENSSl_NO_EC2M)
} else if (id == s_GF2m_simple) {
method = EC_GF2m_simple_method();
+#endif
@fernandoaleman
fernandoaleman / gist:5083680
Last active Jan 20, 2021
How to update VirtualBox Guest Additions with vagrant
View gist:5083680
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.