Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
You can get the list of installed codecs with:
| class StateMachineHelper | |
| module MOCK_METHOD | |
| ALLOW = :allow | |
| EXPECT = :expect | |
| end | |
| module CALLBACK_TYPE | |
| BEFORE = :before | |
| AFTER = :after |
| # HACK to enable using protected methods from Rails 4.2 and initial states as default attributes for ActiveRecord | |
| module StateMachine | |
| module Integrations | |
| module ActiveModel | |
| public :around_validation | |
| end | |
| module ActiveRecord | |
| public :around_save |
| # NullStorage provider for CarrierWave for use in tests. Doesn't actually | |
| # upload or store files but allows test to pass as if files were stored and | |
| # the use of fixtures. | |
| class NullStorage | |
| attr_reader :uploader | |
| def initialize(uploader) | |
| @uploader = uploader | |
| end |
Magic words:
psql -U postgresSome interesting flags (to see all, use -h or --help depending on your psql version):
-E: will describe the underlaying queries of the \ commands (cool for learning!)-l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)| module CapybaraHelpers | |
| class << self | |
| def local_ip | |
| ipv4_addr_info.ip_address | |
| end | |
| def setup_selenium_remote | |
| app_host ||= ENV.fetch('SELENIUM_APP_HOST', local_ip) | |
| Capybara.server_host = app_host | |
| Capybara.app_host = "http://#{app_host}:#{Capybara.current_session.server.port}" |
| inputs = %w[ | |
| CollectionSelectInput | |
| DateTimeInput | |
| FileInput | |
| GroupedCollectionSelectInput | |
| NumericInput | |
| PasswordInput | |
| RangeInput | |
| StringInput | |
| TextInput |
Updated for Rails 4.0.0+
Set up the bower gem.
Follow the Bower instructions and list your dependencies in your bower.json, e.g.
// bower.json{
| # place in lib/tasks/ | |
| namespace :sidekiq do | |
| desc "Strano | Stop sidekiq" | |
| task :stop do | |
| system "bundle exec sidekiqctl stop #{pidfile}" | |
| end | |
| desc "Strano | Start sidekiq" | |
| task :start do |