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
HOSTS: | |
pe-ubuntu-lucid: | |
roles: | |
- master | |
platform: ubuntu-10.04-i386 | |
pe-centos6: | |
roles: | |
- agent | |
platform: el-6-i386 | |
CONFIG: |
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
#!/usr/bin/env ruby | |
require 'ruby-prof' | |
RubyProf.measure_mode = RubyProf::PROCESS_TIME | |
#RubyProf.measure_mode = RubyProf::ALLOCATIONS | |
#RubyProf.measure_mode = RubyProf::MEMORY | |
RubyProf.start | |
begin |
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
(ns foo | |
(:use [criterium.core]) | |
(:require [clojure.java.jdbc :as sql] | |
[clojure.java.jdbc.internal :as sql-internal])) | |
(defn my-bench [desc f] | |
(println (format "\n | |
Beginning benchmark for '%s' | |
-----------------------------------------------------" desc)) | |
(time (with-progress-reporting (bench (f) |
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
I===~:,,::~:~::~~~~~:::::,::::~~::::::,.........,,,,,,,:,::::::::::~~::::,,..... | |
=~~~:::::::::~~=~~~~::::,,,:::::,,,,,.. ..............,,,::::::::::::::::,,,,... | |
~~=~~~~~:~:::::~~:::::,,,,,,:,,,,,,.....................,,::::::::::::::::,,,... | |
~=~~~~=~~~::::::::,,,.,,,,,,,.,,..........=OO$...........,,,,,::,::~:,::,,,,,.., | |
=~~=~~~::::::,:,:,,,,,,,...............,??????I?$:.......,,,,,:,,,,:,,,,,,,,,,.: | |
==~~~~~~::::,::,,,,,,,,...............I????IIIIIIIZ.......,,,,,,,,,,,,,,,,:,,,,. | |
==~~~~:::::::,,,,,,,,................?+??I?7Z?III???......,,,,,,,,,,,,,,,,,,,,,, | |
===~:~~::::,,,,,...................,I?????7Z888I7Z$Z.........,,,,,...,,,,,,,,,,: | |
+=~~~~::,:::,,,,..................77????II?77Z77$IO,.....,.,,.,........,,,,,,,,. | |
+=~~~:::,,,,,....................:7????$II77I7$IODZ......,,..,.............,..,. |
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
name 'inkling-postgresql' | |
version '0.2.0' | |
source 'git://github.com/inkling/puppet-postgresql.git' | |
author 'Inkling' | |
description 'PostgreSQL defined resource types' | |
summary 'PostgreSQL defined resource types' | |
license 'Apache' | |
project_page 'https://github.com/inkling/puppet-postgresql' | |
dependency 'puppetlabs/stdlib', '>= 2.4.0' |
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
irb | |
1.8.7 :001 > class Foo | |
1.8.7 :002?> class << self | |
1.8.7 :003?> def setvar(val) | |
1.8.7 :004?> @myvar = val | |
1.8.7 :005?> end | |
1.8.7 :006?> end | |
1.8.7 :007?> end | |
=> nil | |
1.8.7 :008 > class Bar < Foo |
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
host, port = args | |
puts "Hi there" | |
Puppet.notice("HI from logging!!!") | |
require 'puppet/network/http_pool' | |
path = "/metrics/mbean/java.lang:type=Memory" | |
headers = { "Accept" => "application/json" } | |
Puppet.notice("HI from logging2!!!") |
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
1.8.7 :004 > def testfoo(ports) | |
1.8.7 :005?> val1 = Zlib.crc32(Set.new(ports).inspect) | |
1.8.7 :006?> val2 = Zlib.crc32(Set.new(Set.new(ports)).inspect) | |
1.8.7 :007?> puts "val1 '#{val1}'" | |
1.8.7 :008?> puts "val2 '#{val2}'" | |
1.8.7 :009?> end | |
=> nil | |
1.8.7 :010 > testfoo([22,8080]) | |
val1 '3915886963' | |
val2 '3915886963' |
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
explain analyze SELECT certname_catalogs.certname, catalog_resources.resource, catalog_resources.type, catalog_resources.title,catalog_resources.tags, catalog_resources.exported, catalog_resources.sourcefile, catalog_resources.sourceline, rp.name, rp.value FROM catalog_resources JOIN certname_catalogs USING(catalog) LEFT OUTER JOIN resource_params rp USING(resource) INNER JOIN certnames ON certname_catalogs.certname = certnames.name WHERE (catalog_resources.type = 'Ssh_key') AND (catalog_resources.exported = true) AND (certnames.deactivated IS NULL) AND (NOT ((certname_catalogs.certname = 'some.host.name'))) |
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
require 'puppet/error' | |
require 'puppet/util/puppetdb/command_names' | |
require 'puppet/util/puppetdb/char_encoding' | |
class Puppet::Util::Puppetdb::Command | |
include Puppet::Util::Puppetdb::CommandNames | |
Url = "/v2/commands" | |
SpoolSubDir = File.join("puppetdb", "commands") |
OlderNewer