Skip to content

Instantly share code, notes, and snippets.

Fernando Aleman fernandoaleman

  • Dallas, TX
Block or report user

Report or block fernandoaleman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
set -e
function getHostname()
local HOST=''
while test -z "$HOST"
read -p "$1 : " HOST
fernandoaleman / node-0.10.48.rb
Last active Sep 11, 2018
Install Node 0.10.48 via Homebrew
View node-0.10.48.rb
class Node01048 < Formula
desc "Platform built on V8 to build network applications"
homepage ""
url ""
sha256 "365a93d9acc076a0d93f087d269f376abeebccad599a9dab72f2f6ed96c8ae6e"
revision 2
head "", :branch => "v0.10-staging"
bottle do
sha256 "0053425c1c78f3afc8c7b311d7808d4e0f9ff955ec5edcef972529eabdf05856" => :sierra
fernandoaleman /
Last active Nov 23, 2018
Install MongoDB on Ubuntu 16.06

Install MongoDB on Ubuntu 16.04

Import MongoDB GPG Key

sudo apt-key adv --keyserver hkp:// --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

Add MongoDB apt repository

echo "deb [ arch=amd64,arm64 ] xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
fernandoaleman / homebrew-elasticsearch-1.0.2.rb
Created Jul 21, 2017
Homebrew Elasticsearch 1.0.2 Formula
View homebrew-elasticsearch-1.0.2.rb
require 'formula'
class Elasticsearch < Formula
homepage ''
url ''
sha256 '2fc2cd05e5f301ba972c9bf90232b70592568990f526f2634b3a768c4615ad70'
head do
url ''
depends_on 'maven'
fernandoaleman / clone-git-repo.txt
Last active Feb 14, 2020
How to clone git repo with all branches and tags
View clone-git-repo.txt
# Clone repo
git clone --mirror app/.git
# Change into app directory
cd app
# Update git config
git config --unset core.bare
# Checkout master branch
View auto-install-ruby-with-rbenv.zsh
# This snippet checks your current directory for a .ruby-version file
# and if it exists, it then checks to see if that version of ruby is
# installed. If not, it will ask you if you want to install it.
# Add this snippet to $HOME/.zshrc
# In zsh, the chpwd will run a command every time you change directories.
function chpwd {
# Check if a .ruby-version file exists
if [[ -f "$PWD/.ruby-version" ]]; then
fernandoaleman / redid-cannot-allocate-memory.txt
Created Dec 7, 2016
redis bgsave failed because fork Cannot allocate memory
View redid-cannot-allocate-memory.txt
Modify /etc/sysctl.conf and add
Then restart sysctl by:
$ sudo sysctl -p /etc/sysctl.conf
# Command to replace php memory limit in php.ini with env var
sed -i "s|;*memory_limit =.*|memory_limit = ${PHP_MEMORY_LIMIT}|i" /etc/php5/php.ini
fernandoaleman / INSTALL.txt
Last active Dec 24, 2019
Shell script to sync remote branches from upstream and push them up to forked origin
View INSTALL.txt
1. Copy 'git-sync-fork' script code from gist
2. Create a file called 'git-sync-fork' in any 'bin' directory in your $PATH
3. Paste script into this new file 'git-sync-fork' and save
4. Make the file executable `chmod +x git-sync-fork`
5. Run the script inside your locally forked git repo
git-sync-fork upstream origin

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.dev domains, e.g., and so on, without having to add to your hosts file each time.



You can’t perform that action at this time.