This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby | |
if File.exists?('./Vagrantfile.override.rb') | |
require_relative './Vagrantfile.override.rb' | |
end | |
# Defaults for CPU and Memory | |
CPUS ||= 1 | |
MEMORY ||= 1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<?php | |
if(file_exists(__DIR__.'/config.php')) { | |
$configuration = require __DIR__ . '/config.php'; | |
} else { | |
$configuration = require __DIR__ . '/config.dist.php'; | |
} | |
session_start(); | |
if(isset($configuration['environment']) && $configuration['environment'] == 'dev') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Install apache2 and php etc | |
apt: name={{ item }} state=present | |
with_items: | |
- apache2 | |
notify: | |
- restart apache | |
- name: update apache ports.conf | |
synchronize: | |
src: ../vagrant-production/apache2/ports.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUNNING HANDLER [restart apache] *********************************************** | |
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/system/service.py | |
<default> ESTABLISH LOCAL CONNECTION FOR USER: vagrant | |
<default> EXEC /bin/sh -c 'echo ~ && sleep 0' | |
<default> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /home/vagrant/.ansible/tmp/ansible-tmp-1500439923.22-278690191575535 `" && echo ansible-tmp-1500439923.22-278690191575535="` echo /home/vagrant/.ansible/tmp/ansible-tmp-1500439923.22-278690191575535 `" ) && sleep 0' | |
<default> PUT /tmp/tmphV7b7H TO /home/vagrant/.ansible/tmp/ansible-tmp-1500439923.22-278690191575535/service.py | |
<default> EXEC /bin/sh -c 'chmod u+x /home/vagrant/.ansible/tmp/ansible-tmp-1500439923.22-278690191575535/ /home/vagrant/.ansible/tmp/ansible-tmp-1500439923.22-278690191575535/service.py && sleep 0' | |
<default> EXEC /bin/sh -c '/usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1500439923.22-278690191575535/service.py; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: all | |
vars: | |
http_port: 80 | |
max_clients: 200 | |
tasks: | |
#- {script: /vagrant/bootstrap.sh, become: yes} | |
#- {include: roles/common/tasks/common.yml, become: yes} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'app/Mage.php'; | |
Mage::app('admin','store'); | |
// this class is loaded in app/code/local/Paquin/Ozzy.php | |
$ozzy = new Paquin_Ozzy('json2.json'); | |
var_dump($ozzy->categoryIdsToShow()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print_r($this->getReadAdapter()->query('select * from elite_1_definition')->fetchAll()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Enable blash globbing, or run with zsh instead of bash */ | |
`ls **/*.php > list.txt`; | |
$find = "/** | |
* Vehicle Fits (http://www.vehiclefits.com for more information.) | |
* @copyright Copyright (c) Vehicle Fits, llc | |
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | |
*/"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit your vhosts, and then reload apache immediatly after this script completes. | |
mysqldump --user=root magento_live > magento_new.sql | |
rsync -avr path/to/live/ path/to/new | |
mysql --user=root -e "create database magento_new" | |
mysql --user=root magento_new < magento_new.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function main($dir) | |
{ | |
foreach(glob($dir.'/*') as $dir) { | |
// if this is a test file / folder | |
if(preg_match('/Test(.php)?/', $dir)) { | |
$newFile = "tests/VF" . str_replace('library/VF', '', $dir); | |
$newPath = dirname($newFile); | |
`mkdir -p $newPath`; | |
`mv $dir $newFile`; |
NewerOlder