Skip to content

Instantly share code, notes, and snippets.

Josh Ribakoff joshribakoff

Block or report user

Report or block joshribakoff

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
joshribakoff / Vagrantfile
Created Oct 11, 2017 — forked from stephenreay/Vagrantfile
Local file override for Memory/CPU limits in Vagrant
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby
if File.exists?('./Vagrantfile.override.rb')
require_relative './Vagrantfile.override.rb'
# Defaults for CPU and Memory
CPUS ||= 1
MEMORY ||= 1024
View gist:eec82fdf61209db815b682069110dcec
<!DOCTYPE html>
if(file_exists(__DIR__.'/config.php')) {
$configuration = require __DIR__ . '/config.php';
} else {
$configuration = require __DIR__ . '/config.dist.php';
if(isset($configuration['environment']) && $configuration['environment'] == 'dev') {
View gist:8ff470adae1812052dbb033078788a3a
- name: Install apache2 and php etc
apt: name={{ item }} state=present
- apache2
- restart apache
- name: update apache ports.conf
src: ../vagrant-production/apache2/ports.conf
View gist:92185d520caa73b9741bc37e88154d3c
RUNNING HANDLER [restart apache] ***********************************************
Using module file /usr/lib/python2.7/dist-packages/ansible/modules/system/
<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/
<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/ && sleep 0'
<default> EXEC /bin/sh -c '/usr/bin/python /home/vagrant/.ansible/tmp/ansible-tmp-1500439923.22-278690191575535/; rm -rf "/home/vagrant/.ansible/tmp/ansible-tmp-1
View gist:b8aef3a670699a0499ffbf3f2a4f23ab
- hosts: all
http_port: 80
max_clients: 200
#- {script: /vagrant/, become: yes}
#- {include: roles/common/tasks/common.yml, become: yes}
joshribakoff / gist:5689343
Created Jun 1, 2013
phpunit bootstrap /zf2 service manager
View gist:5689343
use Zend\ServiceManager\ServiceManager;
use Zend\Mvc\Service\ServiceManagerConfig;
class phpunit_bootstrap
static $serviceManager;
static function go()
joshribakoff / gist:6905615
Created Oct 9, 2013
How to test a magento class thru command line for Ozzy
View gist:6905615
require_once 'app/Mage.php';
// this class is loaded in app/code/local/Paquin/Ozzy.php
$ozzy = new Paquin_Ozzy('json2.json');
View gist:6852699
print_r($this->getReadAdapter()->query('select * from elite_1_definition')->fetchAll());
joshribakoff / gist:6852259
Last active Dec 24, 2015
Shorten the docblocks, multi file recursive multi-line find & replace
View gist:6852259
/** Enable blash globbing, or run with zsh instead of bash */
`ls **/*.php > list.txt`;
$find = "/**
* Vehicle Fits ( for more information.)
* @copyright Copyright (c) Vehicle Fits, llc
* @license Open Software License (OSL 3.0)
joshribakoff / gist:6827222
Created Oct 4, 2013
Split 2 magento stores, in an almost atomic operation
View gist:6827222
# 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
You can’t perform that action at this time.