# Set up input file
repeat 10000 echo "." >> input
# Run inline
time lein run inline < input > output
# Run async
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
| --- | |
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: 'Cloudformation stack to manage permission to deploy a serverless service' | |
| Parameters: | |
| ServiceName: | |
| Description: Name of the Service you want to deploy | |
| Type: String | |
| ServiceName2: | |
| Description: Name of the 2nd Service you want to deploy |
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/bash -xe | |
| # requires jq 1.5 (or at least > 1.3) and kafkacat | |
| PATH=$PATH:/usr/lib/kafka/bin | |
| topic="hound-staging.retriever-mutation" | |
| which kafkacat || echo 'no kafkacat found, bye!' && exit 1 | |
| which jq || echo 'no jq found, bye!' && exit 1 | |
| # make sure jq is v 1.5 |
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
| object Implicits { | |
| implicit class PimpedString(str: String) { | |
| def everyNthChar(skipNum: Int) = (for (i <- 0 until str.length if i%skipNum==0) yield str(i)).mkString | |
| //Other methods I want strings to have go here | |
| } | |
| implicit class PimpedInt(int: Int){ | |
| //Other methods I want ints to have do here | |
| } | |
| } |
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
| import boto | |
| import datetime | |
| cw = boto.connect_cloudwatch() | |
| instance_id = boto.utils.get_instance_metadata()['instance-id'] | |
| now = datetime.datetime.utcnow() | |
| start_time = now - datetime.timedelta(days=1) | |
| namespace = "System" |
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
| location /webhook/17cbb307-94ec-446b-a17b-ab82594c974c { | |
| if ($request_method != 'POST') { | |
| return 405; | |
| } | |
| content_by_lua 'ngx.print(io.popen("/path/to/script.sh"):read("*a"))'; | |
| } |
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
| Producer | |
| Setup | |
| bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
| bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3 | |
| Single thread, no replication | |
| bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196 |
JSON, MessagePack, and Google's Protocol Buffers are all awesome. Here's how they're awesome on different client environments and how to use them on your rails env.
Some links:
- JSON: http://json.org/
- MsgPack: http://msgpack.org/
- ProtoBufs: https://code.google.com/p/protobuf/
Output from Ruby Client:
The prep-script.sh will setup the latest Node and install the latest perf version on your Linux box.
When you want to generate the flame graph, run the following (folder locations taken from install script):
sudo sysctl kernel.kptr_restrict=0
# May also have to do the following:
# (additional reading http://unix.stackexchange.com/questions/14227/do-i-need-root-admin-permissions-to-run-userspace-perf-tool-perf-events-ar )
sudo sysctl kernel.perf_event_paranoid=0
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
| * Reciprocal Needs in the Employment Relation | |
| We can look at two sides of the management coin: What do the | |
| individuals get out of it? And what benefit does the whole system | |
| derive from it? | |
| I will disregard any benefits that accrue to managers just by holding | |
| the position of managing. Those are just circular logic. Circular | |
| logic abounds in discussions of management and hierarchy. For example, | |
| consider status reports. It will be said that status reports are | |
| necessary so managers know what their employees are working on. It's |
NewerOlder