This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ .aws/config (remove default profile, define region/output for each customer) | |
[profile customer_a] | |
region = eu-west-1 | |
output=text | |
[profile customer_b] | |
region = eu-west-1 | |
output=text |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Very quick&dirty script to quickly migrate puppet's modulefile to metadata.json files | |
# (Puppet >= 3.6 deprecated the Modulefile) | |
# | |
# Usage: check-out all your modules to a current directory and run ./modulefile2metadatajson.rb | |
# | |
# After completion, a proper metadata.json file should remain in each module directory. | |
require 'json' | |
Dir.glob('**/Modulefile') do | module_file | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Ruby 2.0.0 p451 own package | |
[root@management ~]# which ruby | |
/usr/local/puppet/bin/ruby | |
[root@management ~]# which gem | |
/usr/local/puppet/bin/gem | |
## Installing manually works | |
# export HOMEGEMS="$(ruby -rubygems -e 'puts Gem.user_dir')" | |
# export OLDPATH="$PATH" | |
# export PATH="${HOMEGEMS}/bin:${PATH}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# resize2fs allows offline & online resizing. | |
root@test:~# lvcreate -n test -L100M vg00 | |
Logical volume "test" created | |
root@test:~# mkfs.ext4 /dev/vg00/test | |
mke2fs 1.42.5 (29-Jul-2012) | |
Filesystem label= | |
OS type: Linux | |
Block size=1024 (log=0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'json' | |
data = { | |
'somekey' => 'a value', | |
'another key' => [ 'an', 'array', 'of', 'values' ], | |
'multiliner key' => "line 1\n line 2\n line 3\n", | |
'a final key' => 'last value', | |
} |