Skip to content

Instantly share code, notes, and snippets.

View brianteachman's full-sized avatar

Brian Teachman brianteachman

View GitHub Profile
@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
/*
* Brian Teachman <mr.teachman@gmail.com>
* Date : 8/18/2016
*/
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
/*
* 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.
*
/*
* 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
*/
/*
* CH.8 Vectors: Class Exercize
*
* Brian Teachman & Brandon Sobjack
* 8/11/2016
*/
#include "stdafx.h"
#include <iostream>
#include <vector>
@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
@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 / read_deep_cookie.php
Last active December 29, 2015 05:49
Return an array stored in cookie
@brianteachman
brianteachman / RESUME.md
Last active August 16, 2016 18:45
Brian Teachman's resume

Brian Teachman | Web Developer

Bellingham, WA, USA | me@brianteachman.com

SKILLS & EXPERTISE

Agile Development: web sites/applications/services, modules, plugins, widgets

Small Business Portals: CRMs, Storefronts, Mapping Applications

Personal Sites: Blogs, Portfolio's, Informational Sites

@brianteachman
brianteachman / python-nmap_example.py
Created March 7, 2013 18:57
Quick port scan script in python using python-nmap.
# http://xael.org/norman/python/python-nmap
# lets check for common ports using nmap
import nmap
nmScan = nmap.PortScanner()
nmScan.scan('127.0.0.1', '0-1023')
for port in nmScan['127.0.0.1']['tcp']:
thisDict = nmScan['127.0.0.1']['tcp'][port]
print 'Port ' + str(port) + ': ' + thisDict['product'] + ', v' + thisDict['version']