Skip to content

Instantly share code, notes, and snippets.

View threez's full-sized avatar

threez

  • IONOS SE
  • Karlsruhe, Germany
View GitHub Profile
@threez
threez / perl.rb
Created May 5, 2015 13:57
Simply execute perl code from ruby
require 'open3'
module Perl
def self.exec(code)
pstdin, pstdout, pstderr = Open3.popen3('perl')
pstdin.write code
pstdin.close
data = pstdout.read
err = pstderr.read
if err.size > 0
@threez
threez / README.md
Last active April 18, 2016 09:24
gometalinter JSON top checkstyle converter for jenkins

Usage

gometalinter --deadline=5s ./... --json | ./goml2checkstyle.rb > checkstyle.xml

If the output doesn't show up, the prefix path might not be detected correctly. Pass the path in manually then:

gometalinter --deadline=5s ./... --json | ./goml2checkstyle.rb /absolute/path/to/the/files > checkstyle.xml

@threez
threez / rspec.xml
Created July 31, 2017 08:36
rspec.xml with errors
<?xml version="1.0" encoding="UTF-8"?>
<!-- source https://stackoverflow.com/questions/4922867/junit-xml-format-specification-that-hudson-supports -->
<testsuite>
<!-- if your classname does not include a dot, the package defaults to "(root)" -->
<testcase name="my testcase" classname="my package.my classname" time="29">
<!-- If the test didn't pass, specify ONE of the following 3 cases -->
<!-- option 1 --> <skipped />
all: pulse lcd
pulse: pulse.c
clang -lgpio -o $@ $<
lcd: lcd.c lcd.h lcd_const.h
clang -o $@ $<