Chef presently runs the resources in a recipe serially, one after the next. In this proposal, user-selected groups of resources will run their actions in parallel.
To run a group of resources in parallel, you write it this way:
| # knife cheat | |
| ## Search Examples | |
| knife search "name:ip*" | |
| knife search "platform:ubuntu*" | |
| knife search "platform:*" -a macaddress | |
| knife search "platform:ubuntu*" -a uptime | |
| knife search "platform:ubuntu*" -a virtualization.system | |
| knife search "platform:ubuntu*" -a network.default_gateway |
Chef presently runs the resources in a recipe serially, one after the next. In this proposal, user-selected groups of resources will run their actions in parallel.
To run a group of resources in parallel, you write it this way:
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
Note: total experiment and hack, looks nasty, could be awesome:
kitchen.local.yml into $HOME/.kitchen/config.ymlbrew install polipo, with Ubuntu: apt-get install polipo)polipo-start and polipo-console somewhere useful (perhaps $HOME/bin?)| class RubyScope | |
| # `self` is the RubyScope Class | |
| # (i.e. an Instance of RubyScope MetaClass) | |
| @variable_type = 'class instance variable' | |
| # Methods are defined in a class, but executd on an instance | |
| # Created on self: "RubyScope", Executed on self: "any instance of RubyScope" | |
| def initialize | |
| # `self` is an Instance of RubyScope Class | |
| @variable_type = 'instance variable' |
| #!/bin/bash | |
| repo_host="apt.opengeo.org" | |
| repo_dir="suite/v3/ubuntu" | |
| repo_release="lucid" | |
| echo -n "===> Please enter a bucket name: " | |
| read -e bucket | |
| echo "===> Confirming you have s3cmd configured..." |
| // phantomjs code to log in to Amazon | |
| // based on the code from this Stackoverflow answer: http://stackoverflow.com/questions/9246438/how-to-submit-a-form-using-phantomjs | |
| // I'm injecting jQuery so this assumes you have jquery in your project directory | |
| var page = new WebPage(), testindex = 0, loadInProgress = false; | |
| page.onConsoleMessage = function(msg) { | |
| console.log(msg); | |
| }; |
This is a little trick I use to spin up the packages instalation on Debian/Ubuntu boxes in Vagrant.
I add a simple function that checks if a directory named something similar to ~/.vagrant.d/cache/apt/opscode-ubuntu-12.04/partial (it may have another path in Windows or MacOS) and create the directory if it doesn't already exist.
def local_cache(basebox_name)
cache_dir = Vagrant::Environment.new.home_path.join('cache', 'apt', basebox_name)
partial_dir = cache_dir.join('partial')
partial_dir.mkdir unless partial_dir.exist?
cache_dirLocate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |