Skip to content

Instantly share code, notes, and snippets.

@meteorfox
meteorfox / app.js
Created April 2, 2014 17:53 — forked from jrmoran/app.js
var App = angular.module('App', []);

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

# salt-minion -l all
[DEBUG ] Reading configuration from /etc/salt/minion
[INFO ] Using cached minion ID from /etc/salt/minion_id: zeus-master
[TRACE ] loading log_handlers in ['/var/cache/salt/minion/extmods/log_handlers', '/usr/local/lib/python2.7/dist-packages/salt/log/handlers']
[TRACE ] Skipping /var/cache/salt/minion/extmods/log_handlers, it is not a directory
[TRACE ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG ] Configuration file path: /etc/salt/minion
[INFO ] Setting up the Salt Minion "zeus-master"
[DEBUG ] Created pidfile: /var/run/salt-minion.pid
[DEBUG ] Reading configuration from /etc/salt/minion
@meteorfox
meteorfox / gist:11357344
Created April 27, 2014 22:45
Flaky test?
======================================================================
FAIL: tests.benchmark.scenarios.test_base.ScenarioTestCase.test_sleep_between_internal
----------------------------------------------------------------------
Traceback (most recent call last):
_StringException: Empty attachments:
stderr
stdout
Traceback (most recent call last):
File "/home/meteorfox/programming/github.com/meteorfox/rally/.venv/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
@meteorfox
meteorfox / IdentitySimulation.scala
Created February 12, 2015 03:10
Gatling Template Based Requests
package qeperf
import io.gatling.core.Predef._
import io.gatling.http.Predef._
class IdentitySimulation extends Simulation {
val httpConf = http
.baseURL("http://identity.openstack.com")
.acceptHeader("text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8")
....
{
"atomic_actions": {
"nova.boot_server": 8.725579023361206,
"nova.delete_server": 4.360824108123779
},
"duration": 13.086577892303467,
"error": [],
"idle_duration": 0.0,
"scenario_output": {
diff --git a/rally/benchmark/context/users.py b/rally/benchmark/context/users.py
index f79d21c..c07b7a9 100644
--- a/rally/benchmark/context/users.py
+++ b/rally/benchmark/context/users.py
@@ -182,11 +182,13 @@ class UserGenerator(base.Context):
user = client.create_user(username, password,
"%s@email.me" % username,
tenant_id, user_dom)
+ endpoint_type = self.context["admin"]["endpoint"]["endpoint_type"]
user_endpoint = objects.Endpoint(
{
"context": {
"users": {
"tenants": 3,
"users_per_tenant": 2,
"endpoint_type": "internal"
}
}
}
$ rally task start concurrent-boot-and-delete.yaml --task-args "{'nr_times': 20, 'nr_concurrent': 2}"
@meteorfox
meteorfox / gist:558408e6138fac5d90ed
Created February 26, 2015 00:17
Full UnixBench output causing Regex error
# # # # # # # ##### ###### # # #### # #
# # ## # # # # # # # ## # # # # #
# # # # # # ## ##### ##### # # # # ######
# # # # # # ## # # # # # # # # #
# # # ## # # # # # # # ## # # # #
#### # # # # # ##### ###### # # #### # #
Version 5.1.3 Based on the Byte Magazine Unix Benchmark
Multi-CPU version Version 5 revisions by Ian Smith,