Installing vagrant itself can be a bit of a pain as it is a Ruby package and has most of the usual versioning problems therein. I recommend setting up your environment with the 'rbenv' package and then creating an rbenv environment with the latest vagrant. You probably want to run Vagrant with VirtualBox. At least for Ubuntu, I've had an easy enough time with Virtualbox from the Ubuntu repos.
This file contains 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
IO.popen('yum list installed -q').readlines.each do | yum_line | | |
name, version, stuff = yum_line.split(/\s+/) | |
name.gsub!(/\.(i386|i686|x86_64|noarch)/,'') | |
Facter.add("yum_#{name}_version") do | |
setcode do | |
version | |
end | |
end | |
end |
This file contains 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
VBoxManage guestproperty get "ubuntu_1358963029" "/VirtualBox/GuestInfo/Net/0/V4/IP" |
This file contains 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
Ctrl-R <search string> | |
Hit enter if the matched string is what you'd like. | |
Hit Ctrl-R again to search further back in the history. |
This file contains 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
# git checkout -t origin/<branchname> |
This file contains 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
$ git checkout -b dev | |
$ git branch -D master | |
$ git push --delete origin master | |
$ git push --all |
This file contains 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
#!/bin/bash | |
# If we don't have a HEAD, then this is the first commit and we can't do any of this | |
git show > /dev/null 2>&1 | |
if [ $? -ne 0 ]; then exit 0; fi | |
# first stash any on-disk changes so we're actually validating | |
# what's staged to be committed and not just what's on disk. | |
git diff --full-index --binary > /tmp/stash.$$ | |
git stash -q --keep-index |
This file contains 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
curl -G -H "Accept: application/json" 'http://localhost:8080/resources' --data-urlencode 'query=["=","exported", true]' |
This file contains 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
curl -G -H "Accept: application/json" 'http://localhost:8080/resources' --data-urlencode 'query=["=","exported", true]' |
mkdir foo
git init
git checkout -b production
touch README
git add -A
git commit -m 'initial commit'
git branch --delete master
git push --all
OlderNewer