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
A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.
Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.
| #Model | |
| @user.should have(1).error_on(:username) # Checks whether there is an error in username | |
| @user.errors[:username].should include("can't be blank") # check for the error message | |
| #Rendering | |
| response.should render_template(:index) | |
| #Redirecting | |
| response.should redirect_to(movies_path) |
| """ | |
| Single Responsibility Principle | |
| “…You had one job” — Loki to Skurge in Thor: Ragnarok | |
| A class should have only one job. | |
| If a class has more than one responsibility, it becomes coupled. | |
| A change to one responsibility results to modification of the other responsibility. | |
| """ | |
| class Animal: | |
| def __init__(self, name: str): |
| def add(x, y): | |
| return x + y | |
| const assert = require('assert') | |
| function getAnimals(fetch, id) { | |
| return fetch('http://api.animalfarmgame.com/animals/' + id) | |
| .then(response => response.json()) | |
| .then(data => data.results[0]) | |
| } | |
| describe('getAnimals', () => { | |
| it('calls fetch with the correct url', () => { |
| function Person(saying) { | |
| this.saying = saying | |
| } | |
| Person.prototype.talk = function() { | |
| console.log('I say:', this.saying) | |
| } | |
| function newFake(constructor) { | |
| var obj = {} |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
| <title>Static Server</title> | |
| <link rel="stylesheet" href="./main.css" /> | |
| </head> | |
| <body> |