Skip to content

Instantly share code, notes, and snippets.

Rudy Garcia zolem

  • PluralSight
  • Lehi, Utah
View GitHub Profile
@zolem
zolem / nvm_fix.sh
Created Apr 15, 2019 — forked from itsmepetrov/nvm_fix.sh
Fix NVM to use from root (or sudo)
View nvm_fix.sh
# StackOverflow: http://stackoverflow.com/questions/21215059/cant-use-nvm-from-root-or-sudo
# Source: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps
# The below command seems to fix the problem
n=$(which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local
# The above command is a bit complicated, but all it's doing is copying whatever version of node
# you have active via nvm into the /usr/local/ directory (where user installed global files should
# live on a linux VPS) and setting the permissions so that all users can access them.
View babunUbuntuSetup.md

This wasn't too difficult to do for Ubuntu 15.04 and I assume the process for 14.04 would be the same. I first had to install zsh

sudo apt-get install zsh

and then restart my computer. I don't know why I had to restart but installing oh-my-zsh wouldn't work properly until I did. Then you need to make sure git is installed.

sudo apt-get install git

Once I restarted my computer I installed oh-my-zsh.

@zolem
zolem / phpmyadmin-provision.sh
Last active Aug 29, 2015
Install phpmyadmin
View phpmyadmin-provision.sh
echo "Installing pwgen..."
sudo apt-get install pwgen -y
AUTO_GENERATED_PASS=`pwgen -c -1 20`
echo "Installing phpmyadmin..."
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/reconfigure-webserver multiselect apache2"
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/dbconfig-install boolean true"
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-user string root"
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/admin-pass password root"
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/mysql/app-pass password $AUTO_GENERATED_PASS"
sudo debconf-set-selections <<< "phpmyadmin phpmyadmin/app-password-confirm password $AUTO_GENERATED_PASS"
View xdebug-provision.sh
echo "Installing xdebug"
wget http://xdebug.org/files/xdebug-2.3.2.tgz
tar -xvzf xdebug-2.3.2.tgz
cd xdebug-2.3.2/
phpize
./configure
make
sudo cp modules/xdebug.so /usr/lib/php5/20121212+lfs
sudo sh -c "echo 'zend_extension = /usr/lib/php5/20121212+lfs/xdebug.so' >> /etc/php5/apache2/php.ini"
sudo sh -c "echo 'xdebug.remote_enable=1' >> /etc/php5/apache2/php.ini"
@zolem
zolem / lamp-provision.sh
Last active Aug 29, 2015
Install LAMP server and enable needed mods
View lamp-provision.sh
echo "Installing a LAMP server and php5-dev..."
##### Preseed options to ignore prompt #####
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password password root"
sudo debconf-set-selections <<< "mysql-server mysql-server/root_password_again password root"
##### Easiest was to use the tasksel lamp server option #####
sudo apt-get install lamp-server^ php5-dev -y
##### Enable any mods for the environment #####
sudo a2enmod expires
sudo a2enmod rewrite
sudo a2enmod headers
You can’t perform that action at this time.