$ cat /etc/r10k.yaml
# The location to use for storing cached Git repos
:cachedir: '/var/cache/r10k'
# A list of git repositories to create
:sources:
# This will clone the git repository and instantiate an environment per
<?php | |
ignore_user_abort(true); | |
function syscall ($cmd, $cwd) { | |
$descriptorspec = array( | |
1 => array('pipe', 'w'), // stdout is a pipe that the child will write to | |
2 => array('pipe', 'w') // stderr |
#!/bin/bash | |
DAEMON=/usr/local/bin/thin | |
BUNDLE=/usr/local/bin/bundle | |
CONFIG_PATH=/etc/thin | |
SCRIPT_NAME=/etc/init.d/thin | |
# Exit if the package is not installed | |
[ -x "$DAEMON" ] || exit 0 | |
invoke() |
$ cat /etc/r10k.yaml
# The location to use for storing cached Git repos
:cachedir: '/var/cache/r10k'
# A list of git repositories to create
:sources:
# This will clone the git repository and instantiate an environment per
Note: total experiment and hack, looks nasty, could be awesome:
kitchen.local.yml
into $HOME/.kitchen/config.yml
brew install polipo
, with Ubuntu: apt-get install polipo
)polipo-start
and polipo-console
somewhere useful (perhaps $HOME/bin
?)resource_not_found = {} | |
begin | |
resources('ruby_block[my-resource-supposed-to-exist]') | |
rescue Chef::Exceptions::ResourceNotFound | |
resource_not_found['ruby_block[my-resource-supposed-to-exist]'] = true | |
end | |
template '/etc/my/template.conf' do | |
source 'template.conf.erb' | |
mode '640' |
# encoding: UTF-8 | |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# | |
# Available Rake tasks: | |
# | |
# $ rake -T | |
# rake clean # Clean some generated files | |
# rake default # Run doc, style, unit and integration tests |
cd into /tmp/kitchen. | |
/opt/chef/embedded/bin/gem install chef-zero | |
/opt/chef/embedded/bin/chef-zero -d | |
knife cookbook upload -a -c client.rb | |
chef-shell -z -c client.rb -o '<YOUR RECIPE>' |
# dirty, not tested hack http://www.zenoss.org/forum/8806 | |
# it will solve issue with Chrome, but question is what is broken after this hack? | |
sed -i -e "s# request.setHeader('Content-type', mimetype)# if mimetype == 'image/png':\n mimetype = 'application/javascript'\n request.setHeader('Content-type', mimetype)#g" /opt/zenoss/Products/ZenRRD/zenrender.py | |
# or edit /opt/zenoss/Products/ZenRRD/zenrender.py | |
original: | |
request.setHeader('Content-type', mimetype) | |
edited: | |
if mimetype == 'image/png': | |
mimetype = 'application/javascript' |
#!/bin/bash | |
export TKN=$(curl -X POST 'http://localhost:8080/auth/realms/master/protocol/openid-connect/token' \ | |
-H "Content-Type: application/x-www-form-urlencoded" \ | |
-d "username=admin" \ | |
-d 'password=admin' \ | |
-d 'grant_type=password' \ | |
-d 'client_id=admin-cli' | jq -r '.access_token') | |
curl -X GET 'http://localhost:8080/auth/admin/realms' \ |
#!/bin/bash | |
OLDIFS=$IFS | |
export IFS=$'\n' | |
# Find all boxes which have updates | |
AVAILABLE_UPDATES=$(vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2 2>/dev/null) | |
if [[ ${#AVAILABLE_UPDATES[@]} -ne 0 ]]; then |