Skip to content

Instantly share code, notes, and snippets.

View ryanlitalien's full-sized avatar
🤘

Ryan L'Italien ryanlitalien

🤘
View GitHub Profile
# Replace path
Dir.glob("/Users/ryan/dev/railsapp/**/*.slim") do |slim|
@html = slim.gsub(/\.slim\z/, '.erb')
`slimrb --erb --pretty #{slim} > #{@html}`
File.delete slim
puts "Made #{@html}"
end
@ryanlitalien
ryanlitalien / finalsurge.js
Last active January 22, 2018 20:50
FinalSurge to TrainingPeaks converter
// Background: I needed to get FinalSurge workouts into TrainingPeaks
// Requires:
// * TrainingPeaks Javascript from: https://github.com/pchalacis/trainerroad-to-trainingpeaks
// * TrainingPeaks Premium account to add workouts
// Usage:
// * Make sure as many weeks are visible via the "weeks" button in calendar mode
// ** https://log.finalsurge.com/Calendar.cshtml?v=ws&vw=16b&y=2018&m=1&d=24
// * Run script in console
// * Use "pchalacis/trainerroad-to-trainingpeaks" instructions
// ** Set date to 2018-01-01 (as array is 0 based and will add the day to the day of the workout)