Skip to content

Instantly share code, notes, and snippets.

@ringods
ringods / create-volume-from-snapshot.sh
Created December 14, 2014 20:09
Snapshots of EBS Volumes
$ ec2-create-volume –snapshot snap-cb7493a2 -z us-east-1a
VOLUME vol-9f00e5f6 1 snap-cb7493a2 us-east-1a creating 2008-09-26T11:52:37+0000
@ringods
ringods / env.sh
Created December 14, 2014 19:59
Setting EC2 Environment Variables in ~/.bash_login
export EC2_PRIVATE_KEY=~/.ec2/pk-.pem
export EC2_CERT=~/.ec2/cert-.pem
export EC2_HOME=~/AWS/ec2-api-tools-1.3-24159
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
export PATH=$PATH:$EC2_HOME/bin
@ringods
ringods / check-mount.sh
Last active August 29, 2015 14:11
Sharing EBS Volumes Among Instances
# ls /mnt
data-store lost+found
# ls /mnt/data-store/
lost+found
@ringods
ringods / rvm-issue-3168.log
Created December 11, 2014 20:58
Debug log file for RVM issue 3168
+ 1418331316.N /scripts/cli : __rvm_parse_args() 726 > [[ -z '' ]]
+ 1418331316.N /scripts/cli : __rvm_parse_args() 726 > [[ -n '' ]]
+ 1418331316.N /scripts/cli : __rvm_parse_args() 729 > [[ error == '' ]]
+ 1418331316.N /scripts/cli : __rvm_parse_args() 729 > [[ 0 -eq 1 ]]
+ 1418331316.N /scripts/cli : __rvm_parse_args() 729 > [[ -n '' ]]
+ 1418331316.N /scripts/cli : __rvm_parse_args() 15 > [[ -n osx-ssl-certs ]]
+ 1418331316.N /scripts/cli : __rvm_parse_args() 17 > rvm_token=osx-ssl-certs
+ 1418331316.N /scripts/cli : __rvm_parse_args() 19 > (( 1 > 0 ))
+ 1418331316.N /scripts/cli : __rvm_parse_args() 21 > next_token=update
+ 1418331316.N /scripts/cli : __rvm_parse_args() 22 > shift
@ringods
ringods / rvm-issue-3190.log
Created December 10, 2014 09:55
Debug log file for RVM issue 3190
+ 1418205167.N /scripts/cli : __rvm_parse_args() 726 > [[ -z '' ]]
+ 1418205167.N /scripts/cli : __rvm_parse_args() 726 > [[ -n '' ]]
+ 1418205167.N /scripts/cli : __rvm_parse_args() 729 > [[ error == '' ]]
+ 1418205167.N /scripts/cli : __rvm_parse_args() 729 > [[ 0 -eq 1 ]]
+ 1418205167.N /scripts/cli : __rvm_parse_args() 729 > [[ -n '' ]]
+ 1418205167.N /scripts/cli : __rvm_parse_args() 15 > [[ -n osx-ssl-certs ]]
+ 1418205167.N /scripts/cli : __rvm_parse_args() 17 > rvm_token=osx-ssl-certs
+ 1418205167.N /scripts/cli : __rvm_parse_args() 19 > (( 1 > 0 ))
+ 1418205167.N /scripts/cli : __rvm_parse_args() 21 > next_token=update
+ 1418205167.N /scripts/cli : __rvm_parse_args() 22 > shift
@ringods
ringods / libraries_s3_file.rb
Created February 5, 2014 20:27
NameError with s3_file as a full fledged resource/provider loaded from the cookbook's libraries folder
class Chef
class Resource
class S3
class File < Chef::Resource
def initialize(name, run_context=nil)
super
@resource_name = :s3_file
@provider = Chef::Provider::S3::File
@action = :create
@ringods
ringods / Vagrantfile
Created September 25, 2013 06:38
Vagrantfile for my Windows 2008R2 with WinRM activated, Puppet installed via MSI and failing the run via vagrant-windows.
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "windows2008r2"
config.vm.guest = :windows
# Max time to wait for the guest to shutdown
@ringods
ringods / addvirtualboxaccess.sh
Last active December 12, 2015 01:19
Console snippets for VirtualBox and raw disk setup.
root@host:~# usermod --groups disk -a virtualbox
@ringods
ringods / server.log
Created August 30, 2012 14:40
chef-validator: 401 Unauthorized problem
merb : chef-server (api) : worker (port 4000) ~ Started request handling: Thu Aug 30 16:38:43 +0200 2012
merb : chef-server (api) : worker (port 4000) ~ Routed to: {"admin"=>false, "action"=>"create", "controller"=>"clients", "name"=>"builder"}
merb : chef-server (api) : worker (port 4000) ~ Params: {"admin"=>false, "action"=>"create", "controller"=>"clients", "name"=>"builder"}
merb : chef-server (api) : worker (port 4000) ~ Failed to authenticate. Ensure that your client key is valid. - (Merb::ControllerExceptions::Unauthorized)
/usr/lib/ruby/gems/1.8/gems/chef-server-api-10.12.0/app/controllers/application.rb:56:in `authenticate_every'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:352:in `send'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:352:in `_call_filters'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/merb-core/controller/abstract_controller.rb:344:in `each'
/usr/lib/ruby/gems/1.8/gems/merb-core-1.1.3/lib/me
@ringods
ringods / SConstruct.py
Created January 30, 2012 15:53
env.Clone doesn't clone the builders and the emitters
# Configure base_env
base_env = Environment()
#...
# The snippet below enforces having different object instances of the builders
# to workaround the shallow copy of env.Clone()
other_env = base_env.Clone()
del other_env['BUILDERS']['StaticObject']
del other_env['BUILDERS']['SharedObject']
other_env.Tool('gcc')