<commit_before>#!/bin/bash

function _y_install() {
    for _package_name_and_version; do true; done

    # http://www.linuxjournal.com/article/8919
    _package_name=`echo ${_package_name_and_version%*-*-*}` # removes majorVersion-minorVersion from the right

    #echo "package name ${_package_name}"

    if ! yum list installed | grep -i "^${_package_name}"; then
	yum --enablerepo=ius-archive -y install $*

	return 0
    else
	return -1
    fi
}

function _rpm() {
    for _package_name; do true; done

    _package_name=`basename ${_package_name}`
    _package_name=`echo ${_package_name} | cut -f1 -d'.'`
    
    if ! rpm -qa | grep -i "^${_package_name}"; then
	rpm -Uvh $*
    fi
}


function prepare() {    
    _rpm http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/epel-release-5-4.noarch.rpm
    _rpm http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/ius-release-1.0-11.ius.centos5.noarch.rpm

    _y_install yum-fastestmirror
}

function install_openssl() {
    _y_install openssl
}

function install_apache() {
# apache-2.2.3 (httpd-2.2.3-82.el5.centos)
    if _y_install httpd-2.2.3-83.el5.centos; then
	/sbin/chkconfig httpd on
	service httpd start
    fi

    #if _y_install mod_ssl; then
# http://wiki.centos.org/HowTos/Https
	mkdir certificates
	cd certificates

	_hostname=`hostname`

	openssl genrsa -out ss_ca.key 2048 
	openssl req -new -key ss_ca.key -out ss_ca.csr -subj "/C=CO/ST=State/L=City/O=Company/OU=Department/CN=${_hostname}"<commit_msg>Testing vg boxes<commit_after>#!/bin/bash

function _y_install() {
    for _package_name_and_version; do true; done

    # http://www.linuxjournal.com/article/8919
    _package_name=`echo ${_package_name_and_version%*-*-*}` # removes majorVersion-minorVersion from the right

    #echo "package name ${_package_name}"

    if ! yum list installed | grep -i "^${_package_name}"; then
	yum --enablerepo=ius-archive -y install $*

	return 0
    else
	return -1
    fi
}

function _rpm() {
    for _package_name; do true; done

    _package_name=`basename ${_package_name}`
    _package_name=`echo ${_package_name} | cut -f1 -d'.'`
    
    if ! rpm -qa | grep -i "^${_package_name}"; then
	rpm -Uvh $*
    fi
}


function prepare() {    
    _rpm http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/epel-release-5-4.noarch.rpm
    _rpm http://dl.iuscommunity.org/pub/ius/stable/CentOS/5/x86_64/ius-release-1.0-11.ius.centos5.noarch.rpm

    _y_install yum-fastestmirror
    _y_install unzip
}

function install_openssl() {
    _y_install openssl
}

function install_apache() {
# apache-2.2.3 (httpd-2.2.3-82.el5.centos)
    if _y_install httpd-2.2.3-83.el5.centos; then
	/sbin/chkconfig httpd on
	service httpd start
    fi

    #if _y_install mod_ssl; then
# http://wiki.centos.org/HowTos/Https
	mkdir certificates
	cd certificates

	_hostname=`hostname`

	openssl genrsa -out ss_ca.key 2048 
	openssl req -new -key ss_ca.key -out ss_ca.csr -subj "/C=CO/ST=State/L=City/O=Company/OU=Department/CN=${_hostname}"
{'fraction_non_alphanumeric': 0.13648468708388814, 'fraction_numerical': 0.02862849533954727, 'mean_word_length': 3.3613933236574747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7476872', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1157, 'n_words': 229}