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
export PS1='\[\e[4;32m\]\!\[\e[m\] \[\e[0;31m\]\[\e[47m\]\u\[\e[m\] \[\e[1;37m\]\w\[\e[m\] \[\e[0;93m\][$?]\[\e[m\] \[\e[1;31m\]\$ \[\e[m\]\[\e[m\]\[\e[0;32m\]' | |
eg: | |
517 anoop ~ [0] $ cat aa | |
cat: aa: No such file or directory | |
518 anoop ~ [1] $ |
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/local/bin/docker -d -D -g /var/lib/docker -H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375 --label provider=virtualbox -s aufs | |
-d is deprecated |
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
# Need to force | |
# Ideally run this after removing the containers so that the images are not being used | |
for i in $(docker images | tail -n +2 | awk '{ print $3 }'); do docker rmi -f $i ; done | |
# Need to stop the container before removing it | |
# Instead of 'docker stop', you can also run 'docker kill'. | |
for i in $(docker ps -a | tail -n +2 | awk '{ print $1 }'); do docker stop $i && docker rm $i ; done |
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
cat /proc/sys/kernel/random/uuid | |
This can be used in creating Puppet node groups. |
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
require 'spec_helper_acceptance' | |
describe "file content tests" do | |
step "Create file with content" | |
hosts.each do |host| | |
# confine :except, :platform => 'windows' | |
content = "foo\nfoo\nfoo\n" | |
the_file = "/tmp/demo.txt" | |
create_remote_file host, the_file, content |
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
download entire site: | |
wget --no-clobber --convert-links --random-wait -r -p -E -e robots=off -U mozilla http://www.site.com | |
## pe-agent update: | |
### Put this in site.pp | |
node 'master.puppetlabs.vm' { | |
notify { "Hello dear master": } | |
} |
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
define profiles::blog ( | |
$docroot = '/opt/wordpress', | |
$port = '80', | |
$vhost_name = $title | |
){ | |
class { 'wordpress': | |
wp_owner => 'wordpress', | |
wp_group => 'wordpress', | |
install_dir => $docroot | |
} |
NewerOlder