Skip to content

Instantly share code, notes, and snippets.

$ puppet apply test.pp
warning: Scope(Class[Foo]): Could not look up qualified variable 'bar::var'; class bar has not been evaluated at /tmp/test.pp:4
notice: undef
notice: /Stage[main]/Foo/Notify[undef]/message: defined 'message' as 'undef'
notice: Finished catalog run in 0.03 seconds
# The same is produced if I append to the manifest the line 'Class['foo'] -> Class['bar']'
@timurb
timurb / facter-freezing.patch
Created February 17, 2012 17:31
Facter run through Puppet freezing occasionally
diff -rU 0 ./facter/util/processor.rb /root/sav3/facter/util/processor.rb
--- ./facter/util/processor.rb 2012-01-25 19:47:59.000000000 +0000
+++ /root/sav3/facter/util/processor.rb 2012-02-17 16:36:23.000000000 +0000
@@ -11 +10,0 @@
- Thread::exclusive do
@@ -23 +21,0 @@
- end
@@ -26 +23,0 @@
- Thread::exclusive do
@@ -35 +31,0 @@
@timurb
timurb / zombie.rb
Created February 16, 2012 13:19
zombie process created by ruby
$ (ruby zombie.rb & ) ; sleep 2 ; ps
PID TTY TIME CMD
8609 pts/2 00:00:00 zsh
8651 pts/2 00:00:00 sh
8653 pts/2 00:00:00 ruby
8655 pts/2 00:00:00 sleep <defunct>
8656 pts/2 00:00:00 ps
and once more
@timurb
timurb / gist:901399
Created April 4, 2011 10:05
watch the users accessing our server
date ; tail -f access.log | ruby -a -n -e 'a||=[]; unless a.include?($F[-1]) then a.push $F[-1]; puts "#{Time.now} #{a.uniq.sort.inspect}"; end'
--- auth_source_ldap.rb.orig 2010-09-13 14:31:38.000000000 +0000
+++ auth_source_ldap.rb 2010-09-13 14:24:02.000000000 +0000
@@ -124,7 +124,7 @@
def self.get_attr(entry, attr_name)
if !attr_name.blank?
- entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name]
+ ( entry[attr_name].is_a?(Array) ? entry[attr_name].first : entry[attr_name] ).force_encoding('UTF-8')
end
end
Rails CMS alternatives
======================
Note: project activity was checked on 11/26/09 for most of these projects, and the "last update" field has not been kept up to date since then.
Active projects:
---------------
adva-cms
repo: http://github.com/svenfuchs/adva_cms/
site: http://adva-cms.org/
Last update: 11/24/09
было:
def concat(....)
......
output_buffer.respond_to?(:safe_concat) ? output_buffer.safe_concat(string) : concat(string)
......
end
должно быть:
def concat(....)
......