(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
package com.sample; | |
import com.google.cloud.storage.*; | |
import com.haulmont.bali.util.Preconditions; | |
import com.haulmont.cuba.core.app.FileStorageAPI; | |
import com.haulmont.cuba.core.entity.FileDescriptor; | |
import com.haulmont.cuba.core.global.Configuration; | |
import com.haulmont.cuba.core.global.FileStorageException; | |
import com.metanube.metai4.google.service.GoogleConfig; | |
import org.apache.commons.lang3.StringUtils; |
# Please see the following blog post for more information: | |
# | |
# https://www.hashicorp.com/blog/using-hashicorp-vault-with-chef.html | |
# | |
resource_name :vault_secret | |
property :path, String, name_property: true | |
property :destination, String |
{} // this is intentionally left blank | |
// Coming soon : backup plan | |
// However this is not a definitive solution | |
// This is an atrocity | |
// Questions overflow! Die Gosling! |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |
# In Chef, when a resource is defined all its variables are evaluated during | |
# compile time and the execution of the resource takes place in converge phase. | |
# So if the value of a particular attribute is changed in converge | |
# (and not in compile) the resource will be executed with the old value. | |
# Example problem: | |
# Let's consider this situation where there are two steps involved in a recipe | |
# Step 1 is a Ruby block that changes a node attribute. Rubyblocks get executed | |
# in converge phase | |
# Step 2 is a Chef resource that makes use of the node attribute that was |
from fabric.api import cd, env, local, prefix, run, sudo | |
env.hosts = ['cs01.actalis.vpn'] | |
env.project_root = '/home/libersoft/visalaid' | |
env.user = 'libersoft' | |
def push(): | |
local('git push') |
keystore = "/etc/java-6-sun/security/cacerts" | |
keystore_pass = "foobar" | |
# you'll need foo.cert et. al. in files/default | |
certs = %w{foo bar bang} | |
certs.each do |cert| | |
cookbook_file "#{Chef::Config[:file_cache_path]}/#{cert}.cert" do | |
source "#{cert}.cert" | |
end |
client = Savon::Client.new do | |
# This can be a URL also | |
wsdl.document = "/Path/to/your.wsdl" | |
# These are optional, only if your WSDL sucks :) | |
wsdl.endpoint = "https://your_endpoint" | |
wsdl.namespace = "http://your_namespace" | |
certs = Akami::WSSE::Certs.new :cert_file => "/path/to/cert.crt", :private_key_file => "/path/to/private/key.pem", :private_key_password => "password" | |
wsse.sign_with = Akami::WSSE::Signature.new certs |
template "/tmp/foo.rb" | |
source "foo.rb.erb" | |
cookbook "banana" | |
end |