My Recent Pastes (26 and counting)

Pastes by holoway (26 and counting)

Pages:

Below are the 15 most recent pasties by holoway.

September 23, 2008
2:57PM EDT
by holoway

--- 
classes: 
  - operations-master
  - base
parameters: 

July 29, 2008
4:28PM EDT
by holoway

 gcc -DHAVE_CONFIG_H -I. -I.. -std=gnu99 -Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables -Werror -I ../gnulib/lib -g -MT transform.lo -MD -MP -MF .deps/transform.Tpo -c transform.c  -fno-common -DPIC -o .libs/transform.o
cc1: warnings being treated as errors
transform.c: In function 'transform_save':
transform.c:449: warning: implicit declaration of function 'canonicalize_file_name'
transform.c:449: warning: nested extern declaration of 'canonicalize_file_name'

July 24, 2008
3:53PM EDT
by holoway

In your pam auth section:

auth [success=1 default=ignore] pam_unix.so 
auth    required    pam_ldap.so use_first_pass
auth    required    pam_permit.so

June 13, 2008
4:36PM EDT
by holoway

it "should call display with an object" do
  dispatch_to(YourController, :your_action, { :id => "funky" }) do |c|
    c.should_receive(:display).with({ :id => "funky" })
  end
end

June 10, 2008
8:32PM EDT
by holoway

def if_mongrel(msg="Install mongrel to run this test", &block) do
  begin
    require 'rubygems'
    require 'mongrel'
  rescue

June 09, 2008
7:07PM EDT
by holoway

Given some node data, like:

{"_id":"node_latte_local","_rev":"3095317047","name":"latte.local","attributes":{"sp_current_processor_speed":"2.4 GHz","kernel":"Darwin","sp_serial_number":"W88153RWYJX","sp_smc_version":"1.27f1","macosx_productname":"Mac OS X","hardwaremodel":"i386","sp_boot_rom_version":"MBP41.00C1.B03","operatingsystemrelease":"9.3.0","ipaddress":"192.168.22.7","sp_os_version":"Mac OS X 10.5.3 (9D34)","sp_kernel_version":"Darwin 9.3.0","macosx_productversion":"10.5.3","ps":"ps -auxwww","sp_uptime":"up 6:13:43:13","kernelrelease":"9.3.0","sp_boot_mode":"normal_boot","fqdn":"latte.local","domain":"local","sp_packages":1,"macosx_buildversion":"9D34","sp_l2_cache":"3 MB","sp_boot_volume":"Macintosh HD","sp_machine_name":"MacBookPro","sp_local_host_name":"latte","sp_bus_speed":"800 MHz","sp_physical_memory":"4 GB","sshrsakey":"AAAAB3NzaC1yc2EAAAABIwAAAQEAr3ZIJusU+7\/cbCyJ3hRp6MmqpmvTPl5beAuergDEcDnJ75xlt+\/0V6C7kPmgNY2FMytO0wTj\/myAd7Ylf2hVwMRq63Cdb\/0LLAln0luiqfcLLQtZFJnhn4txV0RxtdNoaXj7rFohBHIxDJ9EAzWmNSm9tCQOY4ro65qsGLUU4YXfhcLJw4LSbsYJa8jVThb\/tbcwZz6D+m4m2\/lRvpXhY7cAj\/dP12b3DY3v3tKl0GaELZtGuEt49S7SPPq05YfL6X1JfAd6l29FfkxGStMa\/K8rg1Hmh0PJM5WQZcm+0tr9nllLLIMMf4rk2JznnFyB64NOMt97qIhtM1v7NP4pgw==","sp_user_name":"Adam Jacob (adam)","owner":"Adam Jacob","owner":"Adam Jacob","sp_cpu_type":"Intel Core 2 Duo","sp_mmm_entry":{"MMM_state":"MMM_enabled"},"sp_machine_model":"MacBookPro4,1","hostname":"latte","rubyversion":"1.8.6","facterversion":"1.3.7","macaddress":"00:1f:f3:4e:16:ab","operatingsystem":"Darwin","sp_number_processors":2,"sshdsakey":"AAAAB3NzaC1kc3MAAACBAOzWvVwoQ0HQGtXq42x8L8Wn9rgjbVEAx3h3Uu9jMHA6ftZRiSJizgQlnoLjLkAiUARQUEho\/TJWdCx\/TQkWnIcrGjkPhGrovzq9212w5x8shYA3qPTppwtajenOEKJFjNSqW\/i8dHkansUrGv5V49zc9KVfJ+SUkVP3CXAGndTHAAAAFQCG6h9qRnwjUhRYERqx+BJmOr3RCwAAAIByJIWvZ8qeK28S1b+ERfy0+1jVVYCqFkJfuKp3nQLi7bF21w\/C0SVf9Nkpo0Ecw7hufGgyCo3XsxayedSrNQgy954aTiyqdCxakhwECIWBaNuWLTRb5oMcbzvkr\/JLRNR8cOJrIb5d7KMAGrU29mZ\/0smFptikGz2tc1scqP26aQAAAIEA2Gcgs3wsPa36a75qS7mkE8paDAEgiBAq64OUkkLSy6lmNNtGW0IApPYOC91S0L01aODhtJqB2txHOSP6GokxgrKTcoA5fGwYbxrGw7pddCDP+5AU8JghVIwF\/Z9hGkhCk2ZQi8YUJW0lpJzEQqZmJ\/XShaayeR2kbHOj4\/g0BOQ="}}

You might have two views, "all" and "all_ids"

June 06, 2008
3:12PM EDT
by holoway

# in 01_set_description.rb in ./icagent
description(attrib?("fqdn")

May 29, 2008
5:58PM EDT
by holoway

define remotefile($owner = root, $group = root, $path, $mode, $source, $backup = true, $recurse = false, $module) {

  $filedist = "$lsbdistid-$lsbdistrelease"
  
  file {

May 19, 2008
2:31PM EDT
by holoway

case $operatingsystem {
  "CentOS": {
    $apache_dir = "/etc/httpd"
    $apache_log_dir = "/var/log/httpd"
    $apache_user = "apache"

May 14, 2008
8:15PM EDT
by holoway

Install this file as puppet_certificate_rebuild.rb

Edit the constants to reflect your environment

Install Capistrano with "gem install capistrano"

May 12, 2008
9:26PM EDT
by holoway

<% if variable == "something -%>
normal
stuff
<% else -%>
other

May 11, 2008
1:55PM EDT
by holoway

diff --git a/lib/merb-core/dispatch/request.rb b/lib/merb-core/dispatch/request.rb
index ff55484..54445e0 100644
--- a/lib/merb-core/dispatch/request.rb
+++ b/lib/merb-core/dispatch/request.rb
@@ -113,10 +113,19 @@ module Merb

May 05, 2008
7:37PM EDT
by holoway

# a simple ssh_host_key example
class ssh_host_keys {
file { "/etc/ssh/host_keys":
  contents => template("ssh_host_keys.erb"),
  owner => root,

May 05, 2008
5:09PM EDT
by holoway

1. Find the directory where your RRDs are stored
2. Stop the poller
3. Create a tmpfs large enough to hold them, with some buffer. (tmpfs will grow as-needed)
4. Rsync your rrds to a safe spot 
5. Mount the tmpfs

May 05, 2008
1:43PM EDT
by holoway

PidFile /var/run/apache2-puppetmaster.pid

# Include module configuration:

LoadModule proxy_module modules/mod_proxy.so

Next page