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
[root@razor project_razor]# razor -w broker add '{"name":"test","description":"test","plugin":"puppet","@req_metadata_hash":{"@server":"puppet.test.com","@plugin":"puppet"}}' | |
{"command":"add_broker","resource":"ProjectRazor::Slice::Broker","errcode":0,"http_err_code":201,"response":[{"@name":"test","@is_template":false,"@user_description":"test","@plugin":"puppet","@req_metadata_hash":{"@server":{"validation":"(^$|^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$)","example":"puppet.example.com","required":false,"default":"","description":"Hostname of Puppet Master; optional"},"@broker_version":{"validation":"(^$|^[0-9]+(\\.([0-9a-zA-Z\\-\\_]+))*$)","example":"3.0.1","required":false,"default":"","description":"Puppet Version; for gem install, blank for latest"}},"@classname":"ProjectRazor::BrokerPlugin::Puppet","@noun":"brok |
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
1.9.3-p327 :012 > Dir.foreach('/Users/kes/Desktop/') do |x| | |
1.9.3-p327 :013 > puts x.reverse | |
1.9.3-p327 :014?> end |
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
# in /etc/puppet/hieradata/ | |
--- | |
someclass::setting1: 'blah' | |
someclass::another_setting: 1234 | |
someclass::array_setting: | |
- 'oneval' | |
- 'twoval' | |
- 'redval' | |
- 'blueval' |
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
Host * | |
ControlPath ~/.ssh/master-%l-%r@%h:%p | |
ControlMaster auto | |
StrictHostKeyChecking no | |
ServerAliveInterval 30 | |
ServerAliveCountMax 3 |
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
sudo sysctl -w net.inet.tcp.keepintvl=10000 | |
sudo sysctl -w net.inet.tcp.keepidle=60000 |
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
function serve { | |
local port="${1:-3000}" | |
local ip=`facter ipaddress` | |
local address="http://$ip:$port/" | |
echo "$address" | pbcopy | |
echo "Serving at $address" | |
ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => $port, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start" & | |
sleep 1 | |
open $address | |
fg %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
function serve { | |
local port="${1:-3000}" | |
local ip=`facter ipaddress` | |
local address="http://$ip:$port/" | |
echo "$address" | pbcopy | |
echo "Serving at $address" | |
ruby -r webrick -e "s = WEBrick::HTTPServer.new(:Port => $port, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start" & | |
sleep 1 | |
open $address | |
fg %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
PROMPT='%{$fg[blue]%}$(git_prompt_info)%{$fg[blue]%}%{$fg[cyan]%}%c %% %{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[magenta]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%} / $fg[red]%}ಠ_ಠ%{$fg[blue]%})%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%} / $fg[green]%}ᵔ◡ᵔ%{$fg[blue]%})%{$reset_color%} " |
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
c2950#sh interfaces FastEthernet 0/1 status | |
Port Name Status Vlan Duplex Speed Type | |
Fa0/1 --> to end-user wo connect 1000 auto auto 10/100BaseTX | |
c2950#sh etherchannel 1 summary | |
Flags: D - down P - in port-channel | |
I - stand-alone s - suspended | |
H - Hot-standby (LACP only) | |
R - Layer3 S - Layer2 |
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
$my_word = "foo" | |
$word = "foo" | |
## Pick the if statement | |
# if $my_word =~ /word/ { | |
# if $my_word =~ /${word}/ { | |
# if $my_word =~ /"${word}"/ { | |
# if $my_word =~ /#{word}/ { | |
notify { "${my_word} has ${word} in it":} | |
} |