Skip to content

Instantly share code, notes, and snippets.

Avatar

Carsten Dreesbach HerbCSO

View GitHub Profile
@HerbCSO
HerbCSO / convert_tcx.rb
Created Apr 28, 2012
Parse Garmin TCX file
View convert_tcx.rb
#!/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|
@HerbCSO
HerbCSO / Gemfile
Created Sep 13, 2012
Gemfile and Gemfile.lock for issue 2099
View Gemfile
source 'http://rubygems.org'
gem 'rake'
gem 'rspec'
gem 'superfight', github: "RubyoffRails/superfight"
@HerbCSO
HerbCSO / Gemfile
Created Sep 13, 2012
Issue 2099, updated to bundler 1.2
View Gemfile
source 'https://rubygems.org'
# Specify your gem's dependencies in about-herbcso.gemspec
gemspec
@HerbCSO
HerbCSO / improve-performance.html
Created Feb 25, 2014
Comparison of phonelib improve-performance and refactor branches
View improve-performance.html
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;
View 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 / gist:2b4213cdc1e81df121e8
Created Feb 14, 2015
binary_test.sql.uuencode
View gist:2b4213cdc1e81df121e8
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 / switch.sh
Created Oct 17, 2019
Switching from minitest to rspec
View switch.sh
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