In terminal.app, install ffmpeg through homebrew
brew install ffmpeg
Validate the installation:
:root { | |
/* Fon family */ | |
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; | |
--font-serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; | |
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; | |
--font-default: var(--font-sans); | |
/* Font size */ | |
--text-xs: .75rem/1rem var(--font-default); |
⤵
$ brew install pngquant
<?php | |
/************************************************************************* | |
* Get File Information | |
*/ | |
// Assuming these come from some data source in your app | |
$s3FileKey = 's3/key/path/to/file.ext'; | |
$fileName = 'file.ext'; |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
<?php | |
/** | |
* If you have two sets of collections, which you would previously have used a nested foreach to do something to each unique | |
* combination of items, you can use this macro to get it done instead! | |
* | |
* It will return a collection of tuples that represent the combination of the two collections. If you'd like to add keys to the tuple | |
* you can pass that in as an optional second argument! | |
*/ |
FFMPEG filters provide a powerful way to programmatically enhance or alter videos, and it’s fairly simple to add a watermark to a video using the overlay filter. The easiest way to install ffmpeg is to download a pre-built binary for your specific platform. Then you don’t have to worry about including and installing all the right dependencies and codecs you will be using.
Once you have ffmpeg installed, adding a watermark is as easy as passing your existing source through an overlay filter like so:
ffmpeg -i test.mp4 -i watermark.png -filter_complex "overlay=10:10" test1.mp4
Basically, we’re passing in the original video, and an overlay image as inputs, then passing it through the filter, and saving the output as test1.mp4.
$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf
# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/
$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
You can run your Express app very easily inside your Electron app.
All you need to do is to:
your_electron_app\resources\app
app.js
file<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Request; | |
use Illuminate\Http\Response; | |
use Symfony\Component\DomCrawler\Crawler; | |
class PjaxMiddleware |