Skip to content

Instantly share code, notes, and snippets.

View HerbCSO's full-sized avatar

Carsten Dreesbach HerbCSO

  • Oracle
  • Arlington, VA
View GitHub Profile
@HerbCSO
HerbCSO / switch.sh
Created October 17, 2019 16:05
Switching from minitest to rspec
for dirs in app/*; do
dir=$(basename $dirs | sed 's/s$//')
echo $dir
for file in $(find ${dirs}/* -type f -not -name "_*"); do
rails generate rspec:${dir} ${$(basename ${file%.*} | sed 's/_'${dir}'//')%.*}
done
done
@HerbCSO
HerbCSO / gist:2b4213cdc1e81df121e8
Created February 14, 2015 03:55
binary_test.sql.uuencode
begin 644 binary_test.sql
M+2T@37E344P@9'5M<"`Q,"XQ,R`@1&ES=')I8B`U+C$N-#4L(&9O<B!A<'!L
M92UD87)W:6XQ,"XS+C`@*&DS.#8I"BTM"BTM($AO<W0Z(&QO8V%L:&]S="`@
M("!$871A8F%S93H@8FEN87)Y7W1E<W0*+2T@+2TM+2TM+2TM+2TM+2TM+2TM
M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM+2TM"BTM(%-E<G9E
M<B!V97)S:6]N"34N,2XT-0H*+RHA-#`Q,#$@4T54($!/3$1?0TA!4D%#5$52
M7U-%5%]#3$E%3E0]0$!#2$%204-415)?4T547T-,245.5"`J+SL*+RHA-#`Q
M,#$@4T54($!/3$1?0TA!4D%#5$527U-%5%]215-53%13/4!`0TA!4D%#5$52
M7U-%5%]215-53%13("HO.PHO*B$T,#$P,2!3150@0$],1%]#3TQ,051)3TY?
M0T].3D5#5$E/3CU`0$-/3$Q!5$E/3E]#3TY.14-424].("HO.PHO*B$T,#$P
@HerbCSO
HerbCSO / keybase.md
Created January 29, 2015 02:52
keybase.md

Keybase proof

I hereby claim:

  • I am herbcso on github.
  • I am cdreesbach (https://keybase.io/cdreesbach) on keybase.
  • I have a public key whose fingerprint is B30F 9340 4A8A 08FF 165E B282 5C98 D892 03AA 0E0B

To claim this, I am signing this object:

@HerbCSO
HerbCSO / improve-performance.html
Created February 25, 2014 21:26
Comparison of phonelib improve-performance and refactor branches
This file has been truncated, but you can view the full file.
<html><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>ruby-prof call tree</title>
<style type="text/css">
<!--
body {
font-size:70%;
padding:0px;
margin:5px;
margin-right:0px;
@HerbCSO
HerbCSO / Gemfile
Created September 13, 2012 04:32
Issue 2099, updated to bundler 1.2
source 'https://rubygems.org'
# Specify your gem's dependencies in about-herbcso.gemspec
gemspec
@HerbCSO
HerbCSO / Gemfile
Created September 13, 2012 02:39
Gemfile and Gemfile.lock for issue 2099
source 'http://rubygems.org'
gem 'rake'
gem 'rspec'
gem 'superfight', github: "RubyoffRails/superfight"
@HerbCSO
HerbCSO / convert_tcx.rb
Created April 28, 2012 14:59
Parse Garmin TCX file
#!/usr/bin/env ruby
require 'nokogiri'
xml=Nokogiri::XML File.open 'My Activities_history.tcx'
xml.remove_namespaces!
$stdout.reopen("activities.csv", "w")
$stdout.sync = true
$stderr.reopen($stdout)
puts '"Sport","Id","LapStartTime","TotalTimeSeconds","DistanceMeters","MaximumSpeed","Calories","AverageHeartRateBpm","MaximumHeartRateBpm"'
xml.xpath("//Activity").each do |activity|
activity.xpath('Lap').each do |lap|