Skip to content

Instantly share code, notes, and snippets.

View paulmthiebauth's full-sized avatar
🌞
Hey

paulmthiebauth

🌞
Hey
  • ezCater
  • Boston, MA
View GitHub Profile
@paulmthiebauth
paulmthiebauth / Jenkinsfile
Created February 14, 2018 23:02
Jenkins Rcov Publisher MetricTarget Syntax
#The snippet generator for RcovPublisher in Jenkins is incomplete.
#When you add in metric values for desired coverage percentages, the generator doesnt provide the syntax.
#Here it is served up on a silver platter.
step([$class: 'RcovPublisher', reportDir: 'coverage/rcov', targets: [[$class: 'hudson.plugins.rubyMetrics.rcov.model.MetricTarget', metric: 'TOTAL_COVERAGE', healthy: 87, unhealthy: 86, unstable:85], [$class: 'hudson.plugins.rubyMetrics.rcov.model.MetricTarget', metric: 'CODE_COVERAGE', healthy: 87, unhealthy: 86, unstable: 85]]])

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@mkuhnt
mkuhnt / stringify_keys.rb
Last active October 6, 2021 12:48
Deep Stringify Keys of hash even with embedded arrays
def transform_hash(original, options={}, &block)
original.inject({}){|result, (key,value)|
value = if (options[:deep] && Hash === value)
transform_hash(value, options, &block)
else
if Array === value
value.map{|v| transform_hash(v, options, &block)}
else
value
end