Here are some comparative benchmarks of our API using PHP-FPM vs Laravel Octane (Swoole) endpoints.
Test Hardware - Setup
- Macbook Pro (15-inch, 2018) - 2.6 GHz 6-Core Intel Core i7. 32 GB 2400 Mhz
- MySQL - 8.0
- PHP - 8.0.3
- Laravel - 8.83.5
# To extract the sound from a video and save it as MP3: | |
ffmpeg -i <video.mp4> -vn <sound>.mp3 | |
# To convert frames from a video or GIF into individual numbered images: | |
ffmpeg -i <video.mpg|video.gif> <frame_%d.png> | |
# To combine numbered images (frame_1.jpg, frame_2.jpg, etc) into a video or GIF: | |
ffmpeg -i <frame_%d.jpg> -f image2 <video.mpg|video.gif> | |
# To quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image: |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
#!/bin/bash | |
# Create a new user named morpheus | |
useradd -m -s /bin/bash morpheus | |
# Add users to sudo or wheel group | |
usermod -aG sudo morpheus #Debian/Ubuntu | |
usermod -aG wheel morpheus #CentOS/RHEL | |
# Create Home Directory + .ssh Directory |
$ composer require itsgoingd/clockwork --dev
If you are running the latest Laravel version, congratulations you are done!
By default, Clockwork will only be available in debug mode, you can change this and other settings in the configuration file. Use the vendor:publish
Artisan command to publish the configuration file into your config directory.
do { | |
let jsonEncoder = JSONEncoder() | |
jsonEncoder.outputFormatting = .prettyPrinted | |
let jsonData = try jsonEncoder.encode(palettes) | |
if let jsonString = String(data: jsonData, encoding: .utf8) { | |
print(jsonString) | |
} | |
} catch { | |
print("error") | |
} |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
mysql -h 127.0.0.1 -u root -p"*******" database < applications.sql | |
mysql -h 127.0.0.1 -u root -p"******" database < publishers.sql |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"