Skip to content

Instantly share code, notes, and snippets.

Open Source Saves Lives! <3

Andreas Marschke andreas-marschke

Open Source Saves Lives! <3
Block or report user

Report or block andreas-marschke

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
andreas-marschke /
Created Dec 17, 2014
Small example LUA script for wg/wrk using a tiny JSON implementation( to log test results to a file.
# Example usage with several configuration sets as in multiple connections durations and threads.
# You may go take the rest of the day off while this will run ;)
for duration in 10s 1m 10m 1h
for connections in 100 200 300 400 500 600
for thread in 1 2 3 4 5
wrk -d$duration -c$connections -t$thread -s wrk-script.lua http://localhost:4001/beacon/0001/demo-load-test/test/web
andreas-marschke / b.js
Created Oct 31, 2014
b.js - Boomerang Setup in around 500 bytes
View b.js
/* b.js - Boomerang Setup in around 500 bytes
* ------------------------------------------
* Complete boomerang.js initialization with essential plugins in around 500 bytes
* It mimics "Google Analytics"-style script injection using document.createElement
* and document.head.appendChild().
* Beacon URL configuration + configuring Plugins as a variable to the beacon:
andreas-marschke / gist:5912142
Created Jul 2, 2013
Visualize Nagios Configuration using GraphViz and Perl Usage: recursive copy your /etc/nagios or /etc/icinga to a box of your choosing. Make sure : - GraphViz2, - Nagios::Object::Config, - String::Random from CPAN are installed. From within your copy of the nagios configuration run: perl -n nagios.cfg -o output.svg Be *amazed* by the s…
View gist:5912142
=head1 NAME
nagios-view - View config of nagios in SVG/PNG
nagios-view --nagioscfg nagios.cfg --output nagios-config-visualized.svg
andreas-marschke /
Last active Dec 17, 2015
Mojolicious Command to minify all CSS/JS Scripts in a directory and save minified versions as .min.{js|css}
package Mojolicious::Command::minify;
use Mojo::Base 'Mojolicious::Commands';
use File::Find;
use File::Slurp;
has description => "Minify scripts in public/ directory.\n";
has hint => <<"EOF";
Minifies all Javascript and CSS files with the .js instead of the .min.js extension.
View #01 JARGON of the Day from
perl -Mojo -E 'say g("")->dom->at("font")->all_text'
andreas-marschke / gist:4751200
Last active Dec 12, 2015
When you have a set of collapsibles inside a modal events from inside like "shown" are bubbling up. So unless you make sure it's only the modal you are listening to, the callback will fire anyway. Better make sure it only happens once.
View gist:4751200
show: true,
backdrop: true,
keyboard: true
}).on("shown",function(e) {
/* suppress 'shown' events bubbling up from inside */
if ($('modal')){
/*do something*/
andreas-marschke / index.html
Created Dec 26, 2012
Example script for using Rickshaw graphing with backbone.js
View index.html
<!doctype html>
<link href="">
<div id="graph"></div>
<div id="legend"></div>
<script type="text/javascript" src=""></script>
<script type="text/javascript" src=""></script>
You can’t perform that action at this time.