- Convert images to video:
ffmpeg -framerate 4 -start_number 51 -i _DSC12%d.jpg -c:v libx264 -r 4 output.mp4
(Recommendataion) Use Screen2Gif's editor instead. - Convert video into gif
- Convert video into image sequence:
- Crop video:
ffmpeg -i in.mp4 -vf crop=w:h:x:y out.mp4
- Change video frame rate:
- Scale video resolution:
ffmpeg -i input.avi -vf scale=320:240 output.avi
- Scaleing while keeping aspect ratio:
ffmpeg -i input.jpg -vf scale=320:-1 output_320.png
- Scale images:
ffmpeg -i input.jpg -vf scale=320:240 output_320x240.png
- Multiple filters (separate using comma):
ffmpeg -i 1.mp4 -vf "crop=720:720:264:0, scale=320:-1" 1.gif
- Trim/Cut video:
ffmpeg -i input.mp4 -ss 00:05:20 -t 00:10:00 -c:v copy -c:a copy output1.mp4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <PackageReference Include="K4os.Compression.LZ4.Streams" Version="1.3.5" /> | |
public abstract class BaseNotifyPropertyChanged: INotifyPropertyChanged | |
{ | |
#region Data Binding | |
public event PropertyChangedEventHandler PropertyChanged; | |
public virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = null) | |
=> PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | |
protected bool SetField<TType>(ref TType field, TType value, [CallerMemberName] string propertyName = null) | |
{ |
docker run --name <your_container_name> alpine/git <git_command>
docker run -it --name <your_container_name> alpine/git <git_command>
: Run with tty interactivedocker run -d --name couch -p 8091-8094:8091-8094 -p 11210:11210 couchbase
: Run (e.g. a server) unattacheddocker cp container_name:/git/getting-started .
: Copy files/folders between a container and the local filesystemdocker start <your_container_name>
: Start a stopped containerdocker attach <your_container_name>
: Attach to running container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Wave | |
{ | |
Vec2 dir; | |
float amplitude; | |
float waveLength; | |
}; | |
struct ImmutableCB | |
{ | |
float waveSteepness; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Clone of https://gist.github.com/Flafla2/1a0b9ebef678bbce3215 with more dimensions and seed generation. | |
public class PerlinGen | |
{ | |
private readonly int[] p; // Randomly shuffled array of values from 0 to 255. | |
// Values are repeated up to size of 512 to avoid using modulo operator. | |
public PerlinGen(int seed) | |
{ | |
// Generate p. |
Blazor is NOT procedural. And you cannot define "functional components" - so all the shitty little layouts need to become a seperate component, which quickly makes project messy because each component needs some naming.
Blazor is entirely FUNCTIONAL despite what it looks like, and things like the below can happen that blew your mind:
// The code below depends on Blazorized for <Row> and <Column> definitions
// ProductGalerry.blazor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Drawing; | |
using System.Runtime.InteropServices; | |
using System.Windows; // Or use whatever point class you like for the implicit cast operator | |
namespace CursorPos | |
{ | |
class Program | |
{ | |
/// <summary> |
Ctrl+-
: Go to last cursor location (navigate back); Same effect if one has "Navigate back" mouse button;Alt+F12
: Peek definition; Press again to peek declaration;Ctrl+K, O
: Switch between header and cpp file;Ctrl+K, R
: Find all references;Alt+*
: Go (back to) current debug line;F9
: Toggle breakpoint
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Hi There! | |
# | |
# You may be wondering what this giant blob of binary data here is, you might | |
# even be worried that we're up to something nefarious (good for you for being | |
# paranoid!). This is a base85 encoding of a zip file, this zip file contains | |
# an entire copy of pip (version 22.3.1). | |
# | |
# Pip is a thing that installs packages, pip itself is a package that someone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Dependency: Csv by Steven Hansen*/ | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
namespace Utility |
NewerOlder