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
#!/bin/sh | |
gpart_list=$(gpart list) | |
IFS='' | |
zpool status $1 | while read -r line ; do | |
echo "$line" | grep "gptid/" >/dev/null | |
if [ $? -eq 1 ]; then | |
echo $line | |
continue |
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
#!/bin/sh | |
# | |
# PROVIDE: graylog2_server | |
# REQUIRE: NETWORKING SERVERS | |
# BEFORE: DAEMON | |
# KEYWORD: shutdown | |
# | |
# Add the following line to /etc/rc.conf to enable graylog2_server: | |
# | |
# graylog2_server_enable="YES" |
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 | |
# | |
# Unbound Stats Collector | |
# sends unbound-control stats output to a batsd/statsd server | |
# | |
# | |
# source 'https://rubygems.org' | |
# gem 'statsd-ruby' | |
# |
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
awk '{ end=split($0,a,";"); result = a[1]; for(i = 2; i <= end; i++) { if (index(a[i], ",")) { a[i] = "\"" a[i] "\""; } result = result "," a[i]; } print result }' |
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 | |
# | |
cmdargs = ARGV.map do |arg| | |
arg = arg.strip | |
if arg.index(" ") | |
"\"#{arg}\"" | |
else | |
arg | |
end |
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
# Rails 4 Ember Application Template | |
# vim: set sts=2 sw=2 et: | |
# Remove normal files we don't want | |
remove_file "README.rdoc" | |
remove_file "public/index.html" | |
remove_file "app/assets/images/rails.png" | |
# Copy database.yml to sample | |
inside "config" do | |
run "cp database.yml database.yml.sample" |
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
# Rails 4 Application Template | |
# Remove normal files we don't want | |
remove_file "README.rdoc" | |
remove_file "public/index.html" | |
remove_file "app/assets/images/rails.png" | |
# Copy database.yml and secrets.yml to sample | |
inside "config" do | |
run "cp database.yml database.yml.sample" | |
run "cp secrets.yml secrets.yml.sample" |
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
diff -ruN orig/ansible-1.1/docs/man/man1/ansible-doc.1 new/ansible-1.1/docs/man/man1/ansible-doc.1 | |
--- orig/ansible-1.1/docs/man/man1/ansible-doc.1 2013-04-03 01:39:05.000000000 +0100 | |
+++ new/ansible-1.1/docs/man/man1/ansible-doc.1 2013-06-10 21:00:05.000000000 +0100 | |
@@ -2,12 +2,12 @@ | |
.\" Title: ansible-doc | |
.\" Author: [see the "AUTHOR" section] | |
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> | |
-.\" Date: 04/02/2013 | |
+.\" Date: 02/01/2013 | |
.\" Manual: System administration commands |
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 'time' | |
module EasterCalculations | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def easter(year = nil) | |
y = year ||= now.year | |
c = y / 100 | |
n = y - 19 * ( y / 19 ) |
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 'net/telnet' | |
prefix = ARGV.length > 1 ? ARGV[1] : nil | |
prefix_regexp = prefix && Regexp.new("\A#{prefix}") | |
cache_dump_limit = 100 | |
localhost = Net::Telnet::new("Host" => "localhost", "Port" => 11211, "Timeout" => 3) | |
slab_ids = [] | |
localhost.cmd("String" => "stats items", "Match" => /^END/) do |c| |