Skip to content

Instantly share code, notes, and snippets.

View brianteachman's full-sized avatar

Brian Teachman brianteachman

View GitHub Profile
@brianteachman
brianteachman / mageup.sh
Last active January 3, 2016 04:29
Install script to setup base Magento installation on Ubuntu 12.04 lts running Nginx/PHP-FPM/MySQL. This script assumes if nginx is installed, it was done with this script so all dependencies are also installed or it attempts to install them.
#!/bin/sh
#
domain_name=$1
# check arguements
if $1==''; then
domain_name='test'
fi
# install server
@brianteachman
brianteachman / update_increment.py
Created June 27, 2014 20:18
Python function that updates first two characters (should be string integers) of each filename in a directory, starting at a given number.
import os
def update_increment(start_number, directory=None, direction='increment'):
if directory is None:
directory = os.path.abspath('.')
for file_name in os.listdir(directory):
# The two characters of the filename are numbers
/*
* CH.8 Vectors: Class Exercize
*
* Brian Teachman & Brandon Sobjack
* 8/11/2016
*/
#include "stdafx.h"
#include <iostream>
#include <vector>
/*
* CH.10 Structs: Class Exercize
*
* Select the revision tab above for previous versions (github only)
*
* Revision 1: Brian Teachman, Brandon Sobjack, Carolyn Stratford
* Revision 2-7: Brian
*
* 8/16/2016
*/
/*
* Write a C++ program that reads a word from the user into a C string and
* reports the number of vowels in the word.Then the program should read a
* whole line of text from the user into a string class variable and report
* the number of vowels in the whole line.
*
* For credit, give your instructor a line - by - line walkthrough of your
* code explaining how it works.Be prepared to modify your program to alter
* the algorithm in some way.
*
/*
* Brian Teachman <[email protected]>
* Date : 8/18/2016
*/
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
@brianteachman
brianteachman / wordpress_install_ubuntu-1604.sh
Created March 7, 2021 00:10 — forked from initcron/wordpress_install_ubuntu-1604.sh
Install wordpress on Ubuntu 16.04 LTS
#!/bin/bash
sudo apt-get update
sudo apt-get install apache2 apache2-utils -yq
sudo systemctl enable apache2
sudo systemctl start apache2
sudo apt-get install php libapache2-mod-php php-mysql -yq
sudo apt-get install php-curl php-gd php-mbstring php-xml php-xmlrpc -yq
sudo a2enmod rewrite
sudo systemctl restart apache2
cd /var/www