Step 1: Edit /etc/sysconfig/network-scripts/ifcfg-eth0
Change ONBOOT=no to ONBOOT=yes
Step 2: Restart network
$ service network restart
Step 3: Update kernel
| <?php | |
| // autoload.php | |
| class framework { | |
| public function __construct() { | |
| spl_autoload_register(function ($class) { | |
| include dirname(__DIR__) . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, array_slice(explode('\\', $class), 0, -1)) . DIRECTORY_SEPARATOR . str_replace('_', DIRECTORY_SEPARATOR, implode('', array_slice(explode('\\', $class), -1, 1))) . '.php'; | |
| }); | |
| } | |
| } |
| #!/bin/bash | |
| # | |
| # VARIABLES | |
| # --------- | |
| # | |
| DIRECTORY=$( cd $( dirname $0 ) && pwd) | |
| MOUNTPOINT=/tmp/deploy | |
| source $DIRECTORY/.environment |
| <?php | |
| echo PHP_EOL; | |
| if ( array_key_exists( 1 , $argv ) == false ) { | |
| echo 'Usage: ' . $argv[ 0 ] . ' <env>' . PHP_EOL . PHP_EOL; | |
| exit(1); |
| find . -type f -name '*.<ext>' -exec sed -i '' 's/<search>/<replace>/' {} + |
| " | |
| " Vim Configuration | |
| " ----------------- | |
| " | |
| " Matt Helm <helmme@n3k8.net> | |
| " | |
| " ------------------------------------------------------------------------------ | |
| "aleph " ASCII code of the letter Aleph (Hebrew) |
| <?php | |
| $array = User::find( $id )->{ $collection }->sortBy( function ( $model ) | |
| { | |
| return $model->{ $column }; | |
| } )->reverse(); | |
| foreach ( $array as $model ) ... |
Step 1: Edit /etc/sysconfig/network-scripts/ifcfg-eth0
Change ONBOOT=no to ONBOOT=yes
Step 2: Restart network
$ service network restart
Step 3: Update kernel
This guide is a compilation of resources (#1, #2) provided by Vagrant, and assumes you already have a fresh install of CentOS 6.4 x86_64 (1 Core/512MB RAM/12MB Video RAM/8GB Dynamic Drive/NAT Network/No audio or USB) with a root password of
vagrant.
Step 1: Update openssh-server and sudo
$ yum update openssh-server sudo
Step 2: Edit /etc/ssh/sshd_config
Change #UseDNS yes to UseDNS no
| #!/bin/bash | |
| # | |
| # apache2 Startup script for the Apache HTTP Server | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Apache is a World Wide Web server. It is used to serve \ | |
| # HTML files and CGI. | |
| /usr/local/stack/httpd/bin/apachectl $@ |
| #!/bin/bash | |
| HOSTSFILE="/etc/hosts" | |
| BAKFILE="$HOSTSFILE.bak" | |
| DOMAINREGEX="^[a-zA-Z0-9]{1}[a-zA-Z0-9\.\-]+$" | |
| IPREGEX="^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" | |
| URLREGEX="^https?:\/\/[a-zA-Z0-9]{1}[a-zA-Z0-9\/\.\-]+$" | |
| backup() { | |
| cat $HOSTSFILE > $BAKFILE |