Skip to content

Instantly share code, notes, and snippets.

@stephenreay
stephenreay / Vagrantfile
Last active January 9, 2020 13:44
Local file override for Memory/CPU limits in Vagrant
# -*- 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
@Edward-Lombe
Edward-Lombe / equals.js
Last active March 28, 2017 18:38
Strict Deep Javascript equality
beforeEach(function() {
jasmine.addMatchers({
toStrictlyEqual : function() {
return {
compare : function(actual, expected) {
var result = {};
result.pass = equals(actual, expected, function (a, b, sPath) {
result.message = 'Expected ' + sPath + ' = ' + b + ' to equal ' + a;
});
return result;
@rrosiek
rrosiek / install_mysql.sh
Last active June 5, 2023 07:08
Vagrant provision script for php, Apache, MySQL, phpMyAdmin, Laravel, and javascript helpers. Tested with Ubuntu 16.04.
#! /usr/bin/env bash
###
#
# install_mysql.sh
#
# This script assumes your Vagrantfile has been configured to map the root of
# your application to /vagrant and that your web root is the "public" folder
# (Laravel standard). Standard and error output is sent to
# /vagrant/vm_build.log during provisioning.