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/bash | |
i="0" | |
while [ $i -lt 1000 ] | |
do | |
echo "{\"yo$i\":$i}" | netcat -c localhost 3132 | |
i=$[$i+1] | |
done |
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
import json | |
from kafka import KafkaConsumer | |
from kafka.consumer.subscription_state import ConsumerRebalanceListener | |
class TopicSubChanged(ConsumerRebalanceListener): | |
def on_partitions_revoked(self,revoked): | |
print "Lost partitions: %s" % repr(revoked) | |
def on_partitions_assigned(self,assigned): |
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
# Preconfigure agent | |
relay_agent.channels = activity_relay_channel | |
relay_agent.sources = activity_daemon_source | |
relay_agent.sinks = activity_kafka_sink | |
# Channel | |
relay_agent.channels.activity_relay_channel.type = file | |
relay_agent.channels.activity_relay_channel.checkpointDir = /tmp/relay/checkpoint | |
relay_agent.channels.activity_relay_channel.dataDirs = /tmp/relay/data |
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
[2016-04-01T19:11:17+00:00] DEBUG: Plugin Groovy threw #<Errno::ENOENT: No such file or directory - groovy> | |
[2016-04-01T19:11:17+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:338:in `exec' | |
[2016-04-01T19:11:17+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:338:in `block in fork_subprocess' | |
[2016-04-01T19:11:17+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:316:in `fork' | |
[2016-04-01T19:11:17+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:316:in `fork_subprocess' | |
[2016-04-01T19:11:17+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout/unix.rb:93:in `run_command' | |
[2016-04-01T19:11:17+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/mixlib-shellout-2.2.6/lib/mixlib/shellout.rb:259:in `run_command' | |
[2016-04-01T19:11:1 |
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
resource_exists = proc do |name| | |
begin | |
resources name | |
true | |
rescue Chef::Exceptions::ResourceNotFound | |
false | |
end | |
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
[2016-03-26T06:40:05+00:00] DEBUG: default_inet6_gateway set to 2604:1380:0:9900 | |
[2016-03-26T06:40:05+00:00] DEBUG: Plugin Network threw #<ArgumentError: Invalid IP "2604:1380:0:9900"> | |
[2016-03-26T06:40:05+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ipaddress-0.8.3/lib/ipaddress/ipv6.rb:101:in `initialize' | |
[2016-03-26T06:40:05+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ipaddress-0.8.3/lib/ipaddress.rb:57:in `new' | |
[2016-03-26T06:40:05+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ipaddress-0.8.3/lib/ipaddress.rb:57:in `parse' | |
[2016-03-26T06:40:05+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ipaddress-0.8.3/lib/ipaddress.rb:211:in `IPAddress' | |
[2016-03-26T06:40:05+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ohai-8.11.1/lib/ohai/plugins/linux/network.rb:359:in `route_is_valid_default_route?' | |
[2016-03-26T06:40:05+00:00] DEBUG: /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/ohai-8.11.1/lib/ohai/plugins/linux/network.rb:386:in `block in favored_default |
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
auto-manage-instances=1 | |
auto-manage-instances-settling-period-ms=0 | |
backup-extra= | |
backup-max-store-ms=0 | |
backup-period-ms=0 | |
check-ms=30000 | |
cleanup-max-files=20 | |
cleanup-period-ms=300000 | |
client-port=2181 | |
connect-port=2888 |
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
# cat eicar.txt | |
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H* | |
# clamscan eicar.txt | |
eicar.txt: Win.Trojan.Trojan-605 FOUND | |
----------- SCAN SUMMARY ----------- | |
Known viruses: 4428330 | |
Engine version: 0.98.6 | |
Scanned directories: 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
DEBUG: ---- HTTP Status and Header Data: ---- | |
DEBUG: HTTP 1.1 200 OK | |
DEBUG: server: openresty/1.9.3.1 | |
DEBUG: date: Wed, 16 Mar 2016 02:03:26 GMT | |
DEBUG: content-type: application/json | |
DEBUG: transfer-encoding: chunked | |
DEBUG: connection: close | |
DEBUG: x-ops-server-api-version: {"min_version":"0","max_version":"1","request_version":"0","response_version":"0"} | |
DEBUG: x-ops-api-info: flavor=cs;version=12.0.0;oc_erchef=12.4.1+20160203230036 | |
DEBUG: content-encoding: gzip |
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
... | |
Created cookbooks/xxxx-0.8.1 | |
Created cookbooks/xxxx-0.7.0 | |
Updated cookbooks/xxxx-0.9.0 | |
Created cookbooks/xxxx-0.6.5 | |
Created cookbooks/xxxx-0.8.0 | |
Created cookbooks/yyyy-0.5.3 | |
Updated cookbooks/zookeeper-3.0.1 | |
ERROR: knife encountered an unexpected error | |
This may be a bug in the 'upload' knife command or plugin |