Skip to content

Instantly share code, notes, and snippets.

Alex Schwartz alexschwartz

  • solarisBank
  • Berlin, Germany
View GitHub Profile
@alexschwartz
alexschwartz / spec.js
Last active Jan 13, 2020
node.js: parse xunit test file
View spec.js
var expect = require("chai").expect;
var walk_tests = require("./walk_xunit_tests.js").walk_tests;
var util = require('util');
describe("walk_tests", function() {
let input = `<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
<testsuite name="SuiteA" errors="0" skipped="1" tests="3" failures="1">
<testcase classname="Class A" name="test1" time="0.006" status="run"/>
View extract_json_file_history_from_git.rb
require 'git'
require 'json'
filename = 'data.json'
working_dir = 'resources/repo1/'
g = Git.open(working_dir) #, :log => Logger.new(STDOUT))
history = []
g.log.path(filename).each do |log_entry|
View vagrant debout out
INFO global: Vagrant version: 1.7.2
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_DEFAULT_PROVIDER="virtualbox"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/bin/vagrant"
INFO global: VAGRANT_LOG="debug"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
View gist:c9f8269cccd15a6a43a7
Applying Ideas From Conferences for Organizational Change
Fanny Pittack and Alex Schwartz gave a presentation about insights from happy change agents at the Agile Testing Day Netherlands 2015. They talked about the challenges that people can have when they learn an idea at a conference and try to apply it in their work environment, and practiced a a change dojo with the attendants and provided suggestions to do successful change in organizations.
Schwartz told his story about a change that he did to getting rid of a tool. At a conference he learned to avoid tools that are only used by one tester. Back at work he tried to convince the QA team to get rid of a specific tool, but the people that he was working with were not happy about that. In the end the tool was removed, so the change goal was achieved. But the relationship between him and his colleagues was damaged, making future cooperation and doing change more difficult.
You have to focus on identifying the problem, understanding it well, and agree on it
@alexschwartz
alexschwartz / dashboard.html
Created Oct 23, 2012
Cloud Dashboard CSS Layout v1
View dashboard.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Generic AWS Regional Status Page</title>
<meta name="description" content="Generic AWS Regional Status Page">
<meta name="copyright" content="Copyright (c) 2012 Alex Schwartz">
<meta name="author" content="Alex Schwartz">
@alexschwartz
alexschwartz / IRC.rb
Created Jun 14, 2012
Post to IRC channel
View IRC.rb
require "socket"
# The irc class, which talks to the server and holds the main event loop
class IRC
def initialize(params)
@host = params[:host]
@port = params[:port]
@nick = params[:nick]
@channel = params[:channel]
View sintra_proxy.rb
require 'sinatra'
require 'open-uri'
get '/?' do
erb :index
end
get '/proxy/:domain/:port/?*' do |domain,port,path|
puts "TBD: proxy domain #{domain}, path #{path}"
View anagrampairfinder.rb
require 'rspec'
describe 'AnagramPairFinder' do
let(:dictionary) { %w{ hot dog cat } }
let(:splitter) { AnagramPairFinder.new(dictionary) }
describe "#lookup" do
@alexschwartz
alexschwartz / gist:912787
Created Apr 10, 2011
Ask Jenkins via json using jquery
View gist:912787
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Seitenr?nder - marginwidth, marginheight, topmargin, leftmargin</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var baseUrl;
@alexschwartz
alexschwartz / gist:829676
Created Feb 16, 2011
GIT Knowhow - How to replace branches with tags?
View gist:829676
## Given a git repo with at least one branch (for example "tags/A")
## which should be transformed into a tag
for t in `git branch -r | grep tags | perl -pi -e "s/origin\///"`; do
echo ============================ $t ;
REV=`git log -1 --pretty=%h origin/$t`;
COMMENT=`git log -1 --pretty=%s origin/$t`;
TAG=`echo $t | cut -d'/' -f2`;
echo $t .. $REV .. $COMMENT .. $TAG;
git tag -a $TAG -m "$COMMENT" $REV;
You can’t perform that action at this time.