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
$ModLoad imfile | |
$inputFileName /srv/nginx/log/<VHOST_NAME>.access.log | |
$inputFileTag <VHOST_NAME>_info: | |
$InputFileStateFile <VHOST_NAME>_info_state | |
$InputFileSeverity info | |
$InputFileFacility local7 | |
$InputRunFileMonitor | |
*.* @@<REMOTE SYSLOG IP>:514 |
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
-- Thu Aug 29 20:25:10 PDT 2013 - Ruby Version: 1.9.3-p374 - ------------------------------------------------------------------------------------------------------------------------------------------------------- /Users/paul -- | |
-- paul@Pauls-MacBook-Pro $ telnet binary-yoga.com 80 | |
Trying 50.63.202.31... | |
Connected to binary-yoga.com. | |
Escape character is '^]'. | |
GET / HTTP/1.1 | |
host: binary-yoga.com | |
HTTP/1.1 200 OK | |
Cache-Control: max-age=900 |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'json' | |
require 'optparse' | |
require 'net/http' | |
require 'highline/import' | |
opts = Hash.new |
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
#!/usr/bin/env ruby | |
require 'date' | |
require 'syslog' | |
require 'fileutils' | |
bkup_dir = ARGV.first | |
log = Syslog.open($0, Syslog::LOG_PID | Syslog::LOG_CONS) | |
log.info "Starting backup rotation for #{bkup_dir}" |
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
########## Syslog priorities ########## | |
CRIT="user.crit" | |
ERROR="user.err" | |
WARN="user.warn" | |
NOTICE="user.notice" | |
INFO="user.info" | |
DEBUG="user.debug" | |
####################################### | |
debug(){ |
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
#!/usr/bin/env bash | |
# Author:: Paul Mooring (<[email protected]>) | |
# Copyright:: Copyright (c) 2013 Opscode, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# |
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 with 2 arguments and no default values | |
[1] pry(main)> def test(one, two) | |
[1] pry(main)* puts one | |
[1] pry(main)* puts two | |
[1] pry(main)* end | |
# Function with 2 arguments has a default value on 2 | |
[2] pry(main)> def test2(one, two="world!") | |
[2] pry(main)* puts one | |
[2] pry(main)* puts two |
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
[3] pry(main)> f = File.open("/tmp/lol", "w") | |
=> #<File:/tmp/lol> | |
[4] pry(main)> f.flock(File::LOCK_EX) | |
=> 0 | |
[5] pry(main)> g = File.open("/tmp/lol", "w") | |
=> #<File:/tmp/lol> | |
[6] pry(main)> g.flock(File::LOCK_EX) | |
### Hangs 4-eva ### |
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
* service[postgresql] action nothing (up to date) | |
* execute[/opt/opscode/embedded/bin/createdb -T template0 -E UTF-8 opscode_chef] action run | |
================================================================================ | |
Error executing action `run` on resource 'execute[/opt/opscode/embedded/bin/createdb -T template0 -E UTF-8 opscode_chef]' | |
================================================================================ | |
Mixlib::ShellOut::ShellCommandFailed | |
------------------------------------ | |
Expected process to exit with [0], but received '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
[pmooring@jenkins ~]$ valgrind --tool=massif --depth=1 --trace-children=yes knife -v && ms_print massif.out* | |
==16710== Massif, a heap profiler | |
==16710== Copyright (C) 2003-2010, and GNU GPL'd, by Nicholas Nethercote | |
==16710== Using Valgrind-3.6.0 and LibVEX; rerun with -h for copyright info | |
==16710== Command: /usr/bin/knife -v | |
==16710== | |
Chef: 11.2.0 | |
==16710== | |
-------------------------------------------------------------------------------- | |
Command: /usr/bin/knife -v |