A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
A list of useful commands for the FFmpeg command line tool.
Download FFmpeg: https://www.ffmpeg.org/download.html
Full documentation: https://www.ffmpeg.org/ffmpeg.html
| #!/usr/bin/env bash | |
| # HOW TO USE | |
| # ./updateSecret.sh secretName newValue | |
| # It's that simple ! | |
| if [ "$#" -ne 2 ]; | |
| then | |
| echo "#####" | |
| echo "You must supplied secretName newValue" |
Ember's official documentation describes a number of low-level APIs, but doesn't offer advice on how to put them together. As a result, a simple task such as creating a simple CRUD application is not obvious to a newcomer.
To help solving this problem, I decided to figure out and document a clear convention for simple CRUD apps, using Ember and Ember Data with no third-party add-ons.
| require 'bundler/setup' | |
| require 'thor/foodcritic' | |
| require 'berkshelf/thor' | |
| require 'thor/scmversion' |
| set :path_to_repo, "/path_to_repo/" | |
| set :running_app_user, "appusername" | |
| namespace :webscale do | |
| desc "Cache a signed out version of the path. Usage: cap webscale:signed_out_cache_page -s path_to_cache=/films/on_netflix" | |
| task :signed_out_cache, roles: :app do | |
| cache_base_path = "#{path_to_repo}/public/signed_out" | |
| cached_destination_path = "#{cache_base_path}#{path_to_cache}.html" | |
| working_path = "#{cached_destination_path}.tmp" |
| class Handlers | |
| constructor: -> | |
| @handlers = {} | |
| register: (handler, registered_class) -> | |
| @handlers[handler] = registered_class | |
| instantiate: (handlers, element) -> | |
| handlers = handlers.replace(/\s/g, '').split(',') | |
| element.handlers = [] |
| class RemoveRecordFromSolr | |
| @queue = :high | |
| def self.perform(klass, id) | |
| klass.constantize.find(id).remove_from_index! | |
| end | |
| end |
| (function(d) { | |
| var dl = d.createElement('a'); | |
| dl.innerText = 'Download MP3'; | |
| dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
| dl.download = d.querySelector('em').innerText+".mp3"; | |
| d.querySelector('.primary').appendChild(dl); | |
| dl.style.marginLeft = '10px'; | |
| dl.style.color = 'red'; | |
| dl.style.fontWeight = 700; | |
| })(document); |
| class PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
| group :test do | |
| # ... | |
| gem 'vcr' | |
| gem 'fakeweb' | |
| gem 'capybara-mechanize' | |
| end |