Skip to content

Instantly share code, notes, and snippets.

View davidrichards's full-sized avatar

David Richards davidrichards

View GitHub Profile
@kobaltz
kobaltz / convert.rb
Created January 7, 2018 03:51
Convert Audio from MP4 to Text
#!/usr/bin/env ruby
# Install some tools first
# brew install ffmpeg
# brew install lame
# brew install --HEAD watsonbox/cmu-sphinx/cmu-sphinxbase
# brew install --HEAD watsonbox/cmu-sphinx/cmu-pocketsphinx
# Place this file in the directory that you have files to convert.
# Make this file executable
@patmaddox
patmaddox / application_helper.rb
Created September 20, 2011 21:42
conditionally link to precompiled assets in rails 3 asset pipeline
module ApplicationHelper
def controller_asset_javascript
javascript_include_tag(controller_name) if Rails.configuration.assets.precompile.include?("#{controller_name}.js") || !Rails.env.production?
end
def controller_asset_stylesheet
stylesheet_link_tag(controller_name) if Rails.configuration.assets.precompile.include?("#{controller_name}.css") || !Rails.env.production?
end
end