Skip to content

Instantly share code, notes, and snippets.

@Kyrodan
Kyrodan / MSpecToJUnit.xslt
Created August 31, 2011 12:59 — forked from vansha/MSpecToJUnit.xslt
MSpec to JUnit transformation
<?xml version="1.0" encoding="utf-8"?>
<!--
Converts the MSpec (http://github.com/machine/machine.specifications) xml
output to JUnit output format.
The aim of this transformation is to integrate MSpec tests to Hudson CI.
Hudson understands test results presented in JUnit format.
Limitations: MSpec xml output currently doesn't contain detailed information
@danverbraganza
danverbraganza / tox.ini
Created January 26, 2012 00:54
My standard tox.ini file that allows you to run coverage, lettuce, nosetests and lint, and to pick out a given feature or a module for nosetest (So that you don't have to run the whole suite)
[tox]
envlist=py27,lint
[testenv]
downloadcache={homedir}/.pipcache
distribute=True
sitepackages=False
[testenv:py27]
deps=nose
@japaz
japaz / logformat.txt
Created June 7, 2012 14:53
Web Server Stress Testing with Curl
%{url_effective},%{http_code},%{content_type},%{time_total},%{time_connect},%{time_starttransfer},%{size_download}\n
@michaelminter
michaelminter / branch-color.sh
Created October 1, 2012 17:47 — forked from yujiberra/gist:1144329
Bash profile with color current git branch color coded by status
# Git status bash prompt
#
# In addition to printing the current working directory, this prompt will
# show a number of things if you are in a git repository:
# - The current branch you are in
# - Whether there are untracked files in the repository (there will be an
# asterisk after the branch nome if there are)
# - Whether there are any unmerged/unstaged/staged changes or if the directory
# is clean. See below for the colors that will be used, and change them if
# you'd like.
@jpatters
jpatters / HeidiDecode.js
Last active November 11, 2024 15:09
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));
@bamboo
bamboo / ReactiveServiceStack.cs
Last active May 11, 2019 16:00
Using ServiceStack* together with Reactive Extensions** to reduce the latency before the client can start processing the elements of an array response. The service sends elements to the client as soon as they become available through the magic of AsyncServiceBase, IStreamWriter, IObservable<T>.ToEnumerable() and careful use of WriteLine() and Fl…
using System;
using System.Collections.Generic;
using System.Disposables;
using System.IO;
using System.Linq;
using System.Net;
using System.Reflection;
using Funq;
using ServiceStack.Common.Web;
using ServiceStack.Service;
@tristanfisher
tristanfisher / Ansible-Vault how-to.md
Last active June 11, 2024 13:23
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

Working with ansible-vault


I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

@dnozay
dnozay / 1_tox.ini
Created October 23, 2014 18:20
tox + coverage : getting combined python code coverage.
[testenv]
deps=coverage
commands =
coverage erase
coverage run setup.py test
coverage report --omit='.tox/*'
coverage html --omit='.tox/*'
@cirocosta
cirocosta / stress-test.sh
Created July 9, 2015 18:58
naive http server stress tester using cURL
#!/bin/bash
#### Default Configuration
CONCURRENCY=4
REQUESTS=100
ADDRESS="http://localhost:8080/"
show_help() {
cat << EOF
@btroncone
btroncone / rxjs_operators_by_example.md
Last active November 7, 2024 09:19
RxJS 5 Operators By Example