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
| require 'superunpack' | |
| class Category < Complex | |
| Blong :index | |
| Blong :identifier | |
| Blong :dirty | |
| CString :long_name | |
| CString :short_name |
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
| #!/bin/sh | |
| diff -x .gitignore -x .DS_Store -x metadata.json -x "README" -qr cookbooks/ /srv/chef/cookbooks/ | grep -v "Only in | |
| /srv/chef/cookbooks/" | sed -e "s/.*cookbooks\/[ :]*//;s/\/.*//;s/:.*//" | sort | uniq | xargs knife cookbook upload | |
| for a in `diff -x .gitignore -x metadata.json -x "README" -qr cookbooks/ /srv/chef/cookbooks/ | grep "Only in /srv/ | |
| chef/cookbooks/" | sed -e "s/.*cookbooks\/[ :]*//;s/\/.*//;s/:.*//" | sort | uniq`; do | |
| echo "y" | knife cookbook delete $a | |
| done |
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
| module Net | |
| class HTTP < Protocol | |
| def connect | |
| D "opening connection to #{conn_address()}..." | |
| s = timeout(@open_timeout) { TCPSocket.open(conn_address(), conn_port()) } | |
| D "opened" | |
| if use_ssl? | |
| unless @ssl_context.verify_mode | |
| warn "warning: peer certificate won't be verified in this SSL session" |
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
| require 'rubygems' | |
| require 'eventmachine' | |
| require 'evma_httpserver' | |
| require 'event_utils' | |
| require 'singleton' | |
| require 'syslog' | |
| require 'trollop' | |
| require 'yaml' | |
| class Syslogger |
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 | |
| Thread.new do | |
| sleep(15) | |
| puts "dumping stacks" | |
| puts caller_for_all_threads.inspect | |
| puts "done." | |
| end | |
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
| # | |
| # Sample configuration file for the Samba suite for Debian GNU/Linux. | |
| # | |
| # | |
| # This is the main Samba configuration file. You should read the | |
| # smb.conf(5) manual page in order to understand the options listed | |
| # here. Samba has a huge number of configurable options most of which | |
| # are not shown in this example | |
| # | |
| # Some options that are often worth tuning have been included as |
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
| require 'rubygems' | |
| require 'mongo' | |
| module MongoPubSub | |
| QUEUES_COLLECTION = 'queues' | |
| class EndSubscriptionException < Exception; end | |
| class Publisher | |
| def initialize(queue_name, mongo_connection) | |
| # Initialize queue collection as a capped collection | |
| if not mongo_connection[QUEUES_COLLECTION].collection_names.include?(queue_name) |
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
| class RedisException < Exception | |
| attr_accessor :original_exception | |
| end | |
| class Redis | |
| class Client | |
| def call(*args) | |
| begin | |
| process(args) do | |
| read | |
| end |
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
| # Redis configuration file | |
| daemonize no | |
| pidfile /var/run/redis-picor.pid | |
| port 12430 | |
| bind 0.0.0.0 | |
| timeout 3000 | |
| save 900 1 | |
| save 300 10 | |
| save 60 10000 | |
| dbfilename redis-picor_state.rdb |
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 'redis' | |
| class Subscriber | |
| def initialize | |
| end | |
| def redis | |
| Redis.new(:host => "redis.fotonauts.net", :port => 12430) |