Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# How to use
# my_script_name bd_user db_pass project_name(should be same name on database and project_directory)
# by Alfredo Ribeiro: [email protected]
# Create the daily backup, delete old backups, and each month, make a copy last backup on a separated directory
mysql_user=$1
mysql_pass=$2
project_name=$3
@murphyslaw
murphyslaw / ubuntu-install-ruby-1.8.7.sh
Last active June 13, 2023 14:14
Install Ruby 1.8.7 with rbenv on Ubuntu
# Install system libraries.
sudo apt-get install zlib1g-dev openssl libssl-dev libreadline-dev git-core
# Install rbenv.
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Setup bash.
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL