Skip to content

Instantly share code, notes, and snippets.

View wwestenbrink's full-sized avatar

Wouter Westenbrink | Lead / Senior Software Engineer (Java/Kotlin) wwestenbrink

View GitHub Profile
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.8-compliant syntax, but you are running 2.3.5.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Running RuboCop...
Inspecting 45 files
.............................................
45 files inspected, no offenses detected
/Users/wouter/.rbenv/versions/2.3.5/bin/ruby -I/Users/wouter/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.2/lib:/Users/wouter/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/rspec-support-3.8.2/lib /Users/wouter/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
@wwestenbrink
wwestenbrink / bundle exec rake
Created August 2, 2019 11:41
Test failure vagrant-vsphere from vagrant 2.2.4
[DEPRECATION] `last_comment` is deprecated. Please use `last_description` instead.
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.8-compliant syntax, but you are running 2.3.5.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Running RuboCop...
Inspecting 45 files
.............................................
45 files inspected, no offenses detected
/Users/wouter/.rbenv/versions/2.3.5/bin/ruby -I/Users/wouter/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.2/lib:/Users/wouter/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/rspec-support-3.8.2/lib /Users/wouter/.rbenv/versions/2.3.5/lib/ruby/gems/2.3.0/gems/rspec-core-3.8.2/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb
@wwestenbrink
wwestenbrink / setup.sh
Last active September 3, 2019 11:43
use brew (cask) to install/update virtualbox, vagrant & boot2docker
echo "Making sure homebrew is installed"
command -v brew >/dev/null 2>&1 || ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo "Installing / updating homebrew packages & casks"
brew update
for pkg in docker boot2docker fig brew-cask; do
if ! brew list -1 | grep -q "^${pkg}\$"; then brew install ${pkg}; else brew upgrade ${pkg} || true; fi
done
for cask in virtualbox vagrant; do
brew cask install ${cask} --force
@wwestenbrink
wwestenbrink / build.sh
Last active August 29, 2015 14:07
Build & install boot2docker image from source
docker build -t user/boot2docker .
ID=$(docker run -itd user/boot2docker /bin/bash)
docker cp $ID:boot2docker.iso image
docker kill $ID
@wwestenbrink
wwestenbrink / PHP proces wrapper
Last active August 29, 2015 13:56
PHP wrapper script streaming stdout & stderr in parallel
<?php
// microsecond timeout
$timeout = 1000;
// launch proces, retrieve output & error streams
$proc=proc_open($cmd,array(0=>array('pipe','r'),1=>array('pipe','w'),2=>array('pipe','w')), $streams);
$stdOut = $streams[1];
$stdErr = $streams[2];
while($stdOut || $stdErr){
@wwestenbrink
wwestenbrink / Vagrant berkshelf NFS
Last active December 25, 2015 03:59
Rake tasks to work around a bug in berkshelf that destroys the vagrant shared NFS folder when installing cookbooks. Use with vagrant chef-solo provisioner. It assumes your cookbook is in the folder app-cookbook/, uses vendor/berkshelf to install & vendor/cookbooks to rsync them.
desc 'Install cookbooks'
task 'cookbooks-install' do
system 'berks install -b app-cookbook/Berksfile -p vendor/berkshelf/'
system 'rsync -aW --delete vendor/berkshelf/* vendor/cookbooks/'
end
desc 'Bring up vagrant virtual machine'
task 'up' => 'cookbooks-install' do
system 'vagrant up'
end