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
Using worker: worker-linux-docker-623b439b.prod.travis-ci.org:travis-linux-4 | |
Build system information | |
Build language: crystal | |
Build group: stable | |
Build dist: precise | |
Build image provisioning date and time | |
Thu Feb 5 15:09:33 UTC 2015 | |
Operating System Details | |
Distributor ID: Ubuntu |
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 "statsd" | |
# Create a stats instance. | |
statsd = Statsd.new("localhost", 8125) | |
# Increment a counter for 5 minutes, 1 point per second | |
(1...300).each { statsd.count("dev.mike.dogstatsd", 1) ; sleep 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
# S3 translates a '+' in filenames to %2B in the URL, breaking apt | |
# Here we will traverse any file in the pool/ dir and create a hardlink for | |
# any file that has a plus in its name. apt/wget will do the right thing. | |
Dir.chdir('<%= @repo_root %>') do | |
plusfiles = Dir.glob '**/*/*+*.deb' | |
begin | |
plusfiles.each do |file| | |
File.link(file, file.gsub('+', ' ')) | |
end | |
rescue SystemCallError # swallow this if file already exists |
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
$ vagrant up | |
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Importing base box 'opscode_ubuntu-12.04_chef-11.4.4'... | |
[default] Matching MAC address for NAT networking... | |
[default] Setting the name of the VM... | |
[default] Clearing any previously set forwarded ports... | |
[default] Creating shared folders metadata... | |
[default] Clearing any previously set network interfaces... | |
[default] Preparing network interfaces based on configuration... | |
[default] Forwarding ports... |
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 datetime | |
import pprint | |
from dogapi import dog_http_api as api | |
api.api_key = 'somesecret' | |
api.application_key = 'yetanothersecret' | |
start_time = 1375940459 | |
end_time = 1375980459 |
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 psutil | |
psutil.cpu_times() | |
# => cputimes( | |
# user=4482262.9199999999, | |
# nice=70491.440000000002, | |
# system=717972.08999999997, | |
# idle=25366818.309999999, | |
# iowait=84943.889999999999, | |
# irq=0.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
#!/usr/bin/env ruby | |
#require 'bundler/setup' | |
require 'date' | |
require 'jiralicious' | |
require 'json' | |
require 'net/https' | |
require 'uri' | |
# Pass component name on command line as first argument |
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
$ erubis outer-template.erb | |
bash -x -c ' | |
echo $(date +%s) > /tmp/test-templates | |
echo "this is an outer template" >> /tmp/test-templates | |
' | |
bash -x -c ' | |
echo "This is an inner template" >> /tmp/test-templates | |
echo "Some inner ruby: 25" |
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
# File dropped of by Chef, local modifications will be overwritten! | |
# 2013-05-08T00:00:02+00:00 10.87.125.117 haproxy[30746]: 10.44.133.138:39039 [07/May/2013:23:59:56.974] public dogdispatcher/i-5e4d843b:9000 4/0/5001/1002/6009 202 166 - - ---- 132/132/35/11/1 0/0 "POST /api/v1/series/?api_key=<redacted> HTTP/1.1" | |
# Field numbers, description, example | |
# Ref: https://code.google.com/p/haproxy-docs/wiki/HTTPLogFormat | |
# 1 (rsyslog) log time | |
# 2 (rsyslog) haproxy server | |
# 3 process_name '[' pid ']:' haproxy[14389]: | |
# 4 client_ip ':' client_port 10.0.1.2:33317 |
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
--- | |
driver_plugin: vagrant | |
platforms: | |
- name: ubuntu-12.04_chef_11.4.4 | |
driver_config: | |
box: opscode_ubuntu-12.04_chef-11.4.4 | |
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_chef-11.4.4.box | |
require_chef_omnibus: 11.4.4 | |
- name: ubuntu-12.04_chef_10.24.4 |