Skip to content

Instantly share code, notes, and snippets.

View btopro's full-sized avatar
🃏
Seeking Ubiquity

Bryan Ollendyke btopro

🃏
Seeking Ubiquity
View GitHub Profile
cd ~
git clone https://github.com/nateswart/toolbox.git .toolbox
cd .toolbox
git submodule init
git submodule update
cd ~
ln -s ~/.toolbox/.bash_profile ~/.bash_profile
ln -s ~/.toolbox/.bashrc ~/.bashrc
ln -s ~/.toolbox/composer/.composer ~/.composer
ln -s ~/.toolbox/.drush ~/.drush

#Prepare CentOS 7.0 Server for Learning Locker LRS

###Assumptions:

  • CentOS 7.0 x64 is installed (default install from DigitalOcean Droplet Manager)
  • Logged in via ssh key with root privileges
  • Using MongoDB as database

Install Remi Collet Repository:

@btopro
btopro / gist:fc7792788c91f4c14bf0
Created April 21, 2015 02:04
start of trying to make a 1-line learninglocker installer
git clone https://github.com/LearningLocker/learninglocker.git learninglocker
cd learninglocker
composer install
mongo
use learninglocker
exit
db.createUser({user:"username",pwd:"password",roles:["readWrite"]})
vi app/config/database.php
php artisan migrate
@btopro
btopro / gist:b6ade25d8fdfe641160f
Last active August 29, 2015 14:19
attempt at a 1line installer for huginn
rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm -y
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum --enablerepo=remi install httpd
yum --enablerepo=remi,remi-php56 install php php-common php-cli php-pear php-mysqlnd php-pecl-mongo php-gd php-mbstring php-mcrypt php-xml
yum install deltarpm git mongodb mongodb-server npm -y
npm install -g bower -y
yum update -y
systemctl start firewalld.service
systemctl enable firewalld.service
firewall-cmd --permanent --zone=public --add-service=http
#!/bin/sh
base='/var/www/html'
owner='root'
webgroup='webdev'
wwwuser='apache'
# UPDATE DRUPAL CORE
#yes | drush up drupal
# UPDATE MODULES
#yes | drush up --no-core
@btopro
btopro / gist:746df7fe0ccbe90e62c4
Last active August 29, 2015 14:25
Remi CentOS 6.5 to mysql/php 5.5.x
sudo -i
# get all RPMs in place
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# install mysql, restart mysql
yes | yum -y --enablerepo=remi install mysql mysql-server
/etc/init.d/mysqld restart
# install php55 and related packages
yes | yum -y --enablerepo=remi,remi-php55 install httpd php php-common
yes | yum -y --enablerepo=remi,remi-php55 install php-opcache php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
@btopro
btopro / gist:a1975a589e8881328d45
Created July 29, 2015 19:17
Online University in a box
yes | yum -y install git && git clone https://github.com/elmsln/elmsln.git /var/www/elmsln && bash /var/www/elmsln/scripts/install/handsfree/centos/centos-install.sh openulmus ou openulmus.org http [email protected] yes
cd $HOME && source .bashrc
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
yes | yum -y --enablerepo=remi install mysql mysql-server
/etc/init.d/mysqld restart
yes | yum -y --enablerepo=remi,remi-php55 install httpd php php-common
yes | yum -y --enablerepo=remi,remi-php55 install php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
/etc/init.d/httpd restart
rm /etc/php.d/uploadprogress.ini
@btopro
btopro / gist:2b9ae3b54130374beb7d
Last active August 26, 2015 18:18
for the glory of old state
<a href="javascript:(function(){
document.getElementsByClassName("logo-img")[0].innerHTML='<a href="/" rel="home" title="Penn State University" class="active"><img src="http://www.psu.edu/profiles/psu_profile/themes/psu_main/logo.png" alt="Penn State University" id="logo"></a>';
document.getElementsByClassName("footer-logo")[0].innerHTML='<a href="http://www.psu.edu" title="Penn State" alt="Penn State"><img src="/profiles/psu_profile/themes/psu/images/footer_logo.png" alt="Penn State"></a>';
})();">For the Glory of Old State</a>
#!/bin/bash
# check if apache is still alive, if not bring it back up
# useful for active monitoring systems where you may hit a wall of traffic unexpectedly
# this prevents long term outages in the event you have such a flood of traffic
# based off of http://unix.stackexchange.com/questions/93699/how-to-write-a-shell-script-restart-apache-if-server-reached-maxclients
# where am i? move to where I am. This ensures source is properly sourced
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
@btopro
btopro / gist:ed743a590cc65c06ed9d
Last active October 24, 2015 16:20
thing for jim
yes | yum update
cat <<EOF | sudo apt-get install whatever
O
EOF