Skip to content

Instantly share code, notes, and snippets.

View smerrill's full-sized avatar
🤖
Attention is all you need

Steven Merrill smerrill

🤖
Attention is all you need
View GitHub Profile
@smerrill
smerrill / -
Created February 4, 2014 13:49
a
[centos@varnish4 ~]$ sudo yum install varnish-4.0.0
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.lug.udel.edu
* epel: epel.mirror.constant.com
* extras: mirror.atlanticmetro.net
* updates: mirrors.einstein.yu.edu
varnish-4.0 | 951 B 00:00
Setting up Install Process
Resolving Dependencies
'use strict';
var OpenShift = require('node-openshift-client');
var util = require('util');
var qs = require('qs');
// Connect to our OpenShift Origin!
process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"

The Test

This test times how long it takes to run puppet apply to install a large amount of monitoring software on a Docker container using the Vagrant 1.6 Docker provisioner. It is a mixed test that measures network speed (downloading large packages and plugins,) disk performance, and CPU performance.

Linode

  • 2 GB Instance
  • Fedora 20
  • Fremont datacenter
This is GhostScript 9.14.7, rebuilt for EL6.
@smerrill
smerrill / Vagrantfile
Last active August 29, 2015 14:23
Run Ansible on the Vagrant guest if you're on Windows.
Vagrant.configure(2) do |config|
config.vm.box = "centos/7"
# These lines are for testing gatling-rsync-auto on Windows; you can probably comment
# them out and just have ansible-playbook look for /vagrant/playbook.yml.
config.vm.synced_folder "files", "/opt/vagrant/rsynced_folder", type: "rsync"
config.gatling.rsync_on_startup = true
# On Windows, run ansible in the VM.
if RUBY_PLATFORM =~ /mswin|mingw|cygwin/ then
val alphabet = "abcdefghijklmnopqrstuvwxyz"
def train(text:String) = {
"[a-z]+".r.findAllIn(text).foldLeft(Map[String, Int]() withDefaultValue 1) {(a, b) => a(b) = a(b) + 1}
}
val NWORDS = train(scala.io.Source.fromFile("big.txt").getLines.mkString.toLowerCase)
def known(words:Set[String]) = {println("Known invocation: %s" format words); Set.empty ++ (for(w <- words if NWORDS contains w) yield w)}
<?php
/**
* @file
* Test case for Drupal tests using a given install profile.
*
* Based on work that is copyright 2008-2009 by Jimmy Berry ("boombatower", http://drupal.org/user/214218)
*/
class ProvisionWebTestCase extends DrupalWebTestCase {
protected function getProfileName() {
svn log -r{2009-12-09}:HEAD | grep '#[0-9]' | awk '{print $1;}' | sed 's/[^0-9]//g' | awk '{ x[$1]++; if (x[$1] == 1) { print $1; } }'
svn st | grep "C ht" | sed 's/!//g' | awk '{system(sprintf("svn resolve --accept working %s", $2))}'