ffmpeg -y -i input.mov -r 30 -t 2.99 -an -c:v libvpx-vp9 -pix_fmt yuva420p -vf 'scale=512:512:force_original_aspect_ratio=decrease' output.webm
Here is a breakdown of the options:
-y
- Overwrite the output file if it already exists.
ffmpeg -y -i input.mov -r 30 -t 2.99 -an -c:v libvpx-vp9 -pix_fmt yuva420p -vf 'scale=512:512:force_original_aspect_ratio=decrease' output.webm
Here is a breakdown of the options:
-y
- Overwrite the output file if it already exists.
extension Task where Failure == Error { | |
// Start a new Task with a timeout. If the timeout expires before the operation is | |
// completed then the task is cancelled and an error is thrown. | |
init(priority: TaskPriority? = nil, timeout: TimeInterval, operation: @escaping @Sendable () async throws -> Success) { | |
self = Task(priority: priority) { | |
try await withThrowingTaskGroup(of: Success.self) { group -> Success in | |
group.addTask(operation: operation) | |
group.addTask { | |
try await _Concurrency.Task.sleep(nanoseconds: UInt64(timeout * 1_000_000_000)) |
#!/usr/bin/env bash | |
source /home/your/path/to/chia-blockchain/activate | |
STR=$(chia farm summary | head -8) | |
FARM=$(chia farm summary | head -8 | sed 's/ /_/g; s/:_/=/g') #jq -Rs '{chia:split("\n")|map(split(": ")|{(.[0]):.[1]}?)}' | |
ACTIVE=$(pgrep -fa 'chia plots create' | wc -l) | |
printem() { | |
echo "Active_Plots=$ACTIVE" |
public func with<T>(_ item: inout T, action: (inout T) -> Void) { | |
action(&item) | |
} | |
public func with<T>(_ item: T, action: (T) -> Void) { | |
action(item) | |
} | |
public func with<T: AnyObject>(_ item: T, action: (T) -> Void) { | |
action(item) |
/** | |
An Observable emits values to its subscribed observers. | |
A minimal implementation based upon the reactivex specification: | |
http://reactivex.io/documentation/observable.html | |
*/ | |
public class Observable<Value> { | |
/** Add a new observer. The provided instance will receive all values provided to onNext. */ | |
public func subscribe(_ observer: @escaping (Value) -> Void) -> Observable<Value> { | |
observers.append(observer) |
#!/usr/bin/env zsh | |
# example usage: | |
# $ webp2gif input.webp output.gif | |
dir0=`pwd` | |
dir=`mktemp -d` | |
cd $dir | |
for i in $(seq -f "$04g" 0 1000); do; webpmux -get frame $i $dir0/$1 -o "$i.webp"; done; | |
mkdir png | |
for i in {0..1000}; do; dwebp "$i.webp" -o "png/$i.png"; done; |
@interface RACGestureViewController () | |
@property(weak, nonatomic) IBOutlet UILabel *translationLabel; | |
@property(weak, nonatomic) IBOutlet UILabel *stateLabel; | |
@property(strong, nonatomic) RACSubject *animationDelegate; | |
@property(weak, nonatomic) IBOutlet UILabel *pinchLabel; | |
@end | |
@implementation RACGestureViewController |
// | |
// main.m | |
// 101RACSamples | |
// | |
// Created by Matthew Doig on 1/26/14. | |
// Copyright (c) 2014 DWI. All rights reserved. | |
// | |
#pragma mark Asynchronous operators |
#!/usr/bin/env python2 | |
import SimpleHTTPServer | |
import SocketServer | |
import logging | |
PORT = 8000 | |
class GetHandler(SimpleHTTPServer.SimpleHTTPRequestHandler): |