0 xxx.xxx.xxx.xxx ▁▁▁▁▁█▁▁▁▂▁▂▁▁▁▁▁▁▁▁▁▂▁▁▁▁▁▁▁▁ 1 xxx.xxx.xxx.xxx ▆▆▅▅▆██▅▅▆▅▅▄▅▆▅▆▆▅▅▅▅▅▅▆▅▅▅▅▆ 2 xxx.xxx.xxx.xxx ▇████▇█▇▇█▇█▇█▇██▇▇▇▇▇██▇▇▇▇██ 3 xxx.xxx.xxx.xxx ▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂▂█▂▂▂▂▂▂▂ 4 xxx.xxx.xxx.xxx ██████████████████████████████ 5 xxx.xxx.xxx.xxx ▆▆█▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆▆ 6 xxx.xxx.xxx.xxx ▆▇▇▆▆▆▇▇▆▆▆▆▇▇█▆▆▇▇▇▆▇▇▆▇▆▇▆▇▇ 7 62.172.57.233 ▅▅▅▅▅▅▅▅▅▅▅▅█▅▅▅▅▆▅▅▅▅▅▅▅▅▅▅▅▅ 8 62.6.198.137 ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▆▇█▁▁█▃
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
dan@dan-MacPro:~$ echo '/bin/date' > /tmp/version | |
dan@dan-MacPro:~$ chmod +x /tmp/version | |
dan@dan-MacPro:~$ /tmp/version | |
Tue Oct 18 09:22:49 BST 2011 | |
dan@dan-MacPro:~$ puppet apply -v --config_version /tmp/version -e 'notice("foobar")' | |
Unable to set config_version: Execution of '/tmp/version' returned 1: on node dan-macpro.xxx.com | |
dan@dan-MacPro:~$ echo -e '#!/bin/bash\n/bin/date' > /tmp/version | |
dan@dan-MacPro:~$ puppet apply -v --config_version /tmp/version -e 'notice("foobar")' |
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
irb(main):001:0> def foo(one="one", two="two", three="three") | |
irb(main):002:1> "one: #{one}, two: #{two}, three: #{three}" | |
irb(main):003:1> end | |
=> nil | |
irb(main):004:0> foo() | |
=> "one: one, two: two, three: three" | |
irb(main):005:0> foo(three=3) | |
=> "one: 3, two: two, three: three" |
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@puppet ~]# cat /etc/redhat-release | |
CentOS release 5.7 (Final) | |
[root@puppet ~]# service iptables stop | |
Flushing firewall rules: [ OK ] | |
Setting chains to policy ACCEPT: filter [ OK ] | |
Unloading iptables modules: [ OK ] | |
[root@puppet ~]# iptables -t filter -A INPUT -p tcp -m tcp -m multiport --dports 80,443 -m comment --comment "foo" -j ACCEPT |
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
diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb | |
index d4c7faa..0e8ec79 100644 | |
--- a/lib/puppet/provider/firewall/iptables.rb | |
+++ b/lib/puppet/provider/firewall/iptables.rb | |
@@ -1,4 +1,4 @@ | |
-require 'puppet/provider/firewall' | |
+require File.expand_path('../firewall', File.dirname(__FILE__)) | |
require 'digest/md5' | |
Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Firewall do |
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
--- with 2011-11-02 18:44:32.000000000 +0000 | |
+++ without-redhat 2011-11-02 18:45:02.000000000 +0000 | |
@@ -9,7 +9,7 @@ | |
compatible os's : linux | |
RPMRC VALUES: | |
-macrofiles : /usr/lib/rpm/macros:/usr/lib/rpm/ia32e-linux/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/ia32e-linux/macros:~/.rpmmacros | |
+macrofiles : /usr/lib/rpm/macros:/usr/lib/rpm/ia32e-linux/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/ia32e-linux/macros:~/.rpmmacros | |
optflags : -O2 -g -m64 -mtune=generic | |
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@fw0 ~]# iptables -F | |
[root@fw0 ~]# cat test.pp | |
firewall { | |
"500 http": | |
dport => 80, | |
action => "accept"; | |
"500 https": | |
dport => 443, | |
action => "accept"; |
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
dan@dan-MacPro:~$ python unpack.py | |
foo: foo | |
bar: bar | |
dan@dan-MacPro:~$ ruby unpack.rb | |
foo: foo | |
bar: |
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
# The principle of moderate-to-infuriating surprise. | |
irb(main):001:0> "23".to_i | |
=> 23 | |
irb(main):002:0> "23foobar".to_i | |
=> 23 | |
irb(main):003:0> "foo23bar".to_i | |
=> 0 | |
irb(main):004:0> "".to_i | |
=> 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
10:23:21 WARNING : not adding Base group | |
10:23:21 INFO : moving (1) to step postselection | |
10:23:21 INFO : selected kernel package for kernel | |
10:23:21 DEBUG : selecting kernel-devel | |
10:23:22 DEBUG : Checking for virtual provide or file-provide for authconfig.ia32e | |
10:23:22 DEBUG : no package matching authconfig.ia32e | |
10:23:23 DEBUG : Checking for virtual provide or file-provide for chkconfig.ia32e | |
10:23:23 DEBUG : no package matching chkconfig.ia32e | |
10:23:23 DEBUG : Checking for virtual provide or file-provide for mkinitrd.ia32e | |
10:23:23 DEBUG : no package matching mkinitrd.ia32e |