Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# http://techblog.appnexus.com/2011/managing-ssh-sockets-in-gnu-screen/
# https://gist.github.com/martijnvermaat/8070533
# http://stackoverflow.com/questions/21378569/how-to-auto-update-ssh-agent-environment-variables-when-attaching-to-existing-tm
# Fix SSH auth socket location so agent forwarding works with screen.
if test "$SSH_AUTH_SOCK" ; then
ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock.$(hostname)
fi
worker_processes 16;
worker_rlimit_nofile 30000;
pid /run/nginx.pid;
events {
worker_connections 15000;
multi_accept on;
#!/usr/bin/env ruby
COLORS = {:red => 0, :white => 1, :blue => 2}
def random_color
COLORS.keys.sample
end
def is_sorted?(array)
sorted = false
defmodule DFP do
@colors [:red, :white, :blue]
def random_ball(number) do
:random.seed(:erlang.now())
{_, ball} = Enum.fetch(@colors, (:random.uniform(number)-1))
ball
end
# No prior provided
nToggle is poised to revolutionize programmatic advertising at a time when all
sides of the media equation feel overwhelmed by the tidal wave and complexity
of programmatic inventory. nToggle delivers heightened efficiency and
transparency for buyers and sellers amidst the rapid rise of programmatic
advertising.
We're scaling up our infrastructure at Ntoggle and we're looking for operations
engineers to help us design and build the kind of infrastructure that can
process billions of events every day. You'll be part of a fast growing team
located in the heart of Boston and every day your actions will directly
(venv) dd-agent git:(network-tests) nosetests tests/checks/integration/test_network.py
.F
======================================================================
FAIL: test_check (tests.checks.integration.test_network.TestCheckDisk)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/apenney/source/dd-agent/tests/checks/integration/test_network.py", line 32, in test_check
self.assertMetric(metric, tags=[])
File "/home/apenney/source/dd-agent/tests/checks/common.py", line 303, in assertMetric
self._candidates_size_assert(candidates, count=count, at_least=at_least)
class Text
def initialize
end
def file
File.read('test-words')
end
def words
Hi,
We've run into an issue (and a pattern really) using ansible that we've been unable to solve and I'm hoping the list can teach us the "ansible way".
The background is that we want to create a number of monitors automatically, based on certain information. The solution we have today is a variable:
monitor_exchanges:
- name: exchange1
demand_partners:
- 'dp1'
1) container should be running
Failure/Error: expect(docker_container('name')).to be_running
MultiJson::ParseError:
795: unexpected token at 'Error: No such image or container: name
if [ $DEPLOY == true ]; then
ansible-playbook -i inventory/ec2 playbooks/all.yml --vault-password-file ~/.pass --extra-vars "target=&tag_Loadtest_${RUN_ID}" -u ec2-user --module-path ./modules;
ansible-playbook -i inventory/ec2 playbooks/nroute/ec2_mount.yml --vault-password-file ~/.pass --extra-vars "target=&tag_Loadtest_${RUN_ID}:&tag_Role_nroute" --module-path ./modules;
AUDOBON_DATASTORE_PUBLIC_IP=`public_ip_from_inventory "&tag_Loadtest_${RUN_ID}:&tag_Role_audobon_datastore"`
ansible-playbook -i inventory/ec2 playbooks/nroute/engine.yml --vault-password-file ~/.pass --extra-vars "target=&tag_Loadtest_${RUN_ID}:&tag_Role_nroute audobon_datastore=&tag_Loadtest_${RUN_ID}:&tag_Role_audobon_datastore audobon_cassandra_host={{ hostvars[groups.audobon_datastore.0].ansible_eth0.ipv4.address }} audobon_datastore=${AUDOBON_DATASTORE_PUBLIC_IP}" --extra-vars "@${EXTRA_VARS}" --module-path ./modules;
ansible-playbook -i inventory/ec2 playbooks/audobon/datastore.yml --vault-password-file ~/.pass --ex