Skip to content

Instantly share code, notes, and snippets.


Nikolaus Piccolotto prayerslayer

Block or report user

Report or block prayerslayer

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
prayerslayer /
Created Jan 28, 2019
Find slow Robot Framework keywords
#!/usr/bin/env python
"""Usage: elapsed_by_keyword path/to/output.xml
Reads result of a test run from Robot output file
and outputs "keyword elapsed_time"
sorted by the elapsed time in each keyword.
import sys
prayerslayer / find_color.js
Created May 7, 2018
Find used colors on page
View find_color.js
function colorCount() {
function trim(str) {
return str.replace(/^\s+|\s+$/gm, '');
function toComponents(str) {
return str.match(/rgba?\((.+)\)/)[1].split(',').map(s => s.trim()).map(s => parseInt(s, 10))
function componentToHex(c) {
prayerslayer / gist.js
Last active Sep 29, 2017
8x8 Matrix with 10 1s on random positions
View gist.js
function shuffle(a) {
for (let i = a.length; i; i--) {
let j = Math.floor(Math.random() * i);
[a[i - 1], a[j]] = [a[j], a[i - 1]];
return a;
function range(n) {
return new Array(n).fill(0).map((_, i) => i);
prayerslayer / output.txt
Last active Sep 28, 2015
Tests JSON encoding performance of different clojure libs
View output.txt
content length
"Elapsed time: 103.332902 msecs"
"Elapsed time: 79.033905 msecs"
"Elapsed time: 638.59961 msecs"
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
.node {
stroke-width: 1.5px;
You can’t perform that action at this time.