Skip to content

Instantly share code, notes, and snippets.

View JosefJezek's full-sized avatar

Josef Ježek JosefJezek

  • Heart of Europe
View GitHub Profile
@JosefJezek
JosefJezek / ffmpeg GIF to MP4.MD
Created July 7, 2022 15:00 — forked from gvoze32/ffmpeg GIF to MP4.MD
Convert animated GIF to MP4 using ffmpeg in terminal.

To convert animation GIF to MP4 by ffmpeg, use the following command

ffmpeg -i animated.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" video.mp4

Description

movflags – This option optimizes the structure of the MP4 file so the browser can load it as quickly as possible.

pix_fmt – MP4 videos store pixels in different formats. We include this option to specify a specific format which has maximum compatibility across all browsers.

How to add custom search engines to Chrome

Chrome's address bar doubles as a way to do a quick Google search, but you're not limited to searching Google. In that same bar, you can search any site or app.

This is great if you search specific apps frequently - for example, Gmail, Google Drive, or Twitter. You can search any site without having to open it first, just like you don't have to go to google.com to search Google. Type a keyword, hit space or tab, and you're good to go.

Demo

@JosefJezek
JosefJezek / npm-v7.md
Created July 7, 2021 09:58
npm v7 - public git dependencies
@JosefJezek
JosefJezek / playwright-tips.md
Last active February 2, 2023 11:45
Playwright Tips

Playwright Tips

Base Scripts

import {chromium, firefox, webkit} from 'playwright';

for (const browserType of [chromium, firefox, webkit]) {
  const browser = await browserType.launch();
  const page = await browser.newPage();
@JosefJezek
JosefJezek / css-snippets.md
Created July 10, 2019 15:47
CSS Snippets

CSS Snippets

my-element:not(:defined){}

@JosefJezek
JosefJezek / bash-snippets
Created June 19, 2019 13:14
Bash Snippets
## Dir Size
```sh
du -sh node_modules/* | sort -rh | head -n 10
```
@JosefJezek
JosefJezek / pwa-kit-2019.md
Last active March 17, 2019 21:48
PWA Kit 2019

PWA Kit 2019

The PWA Kit 2019 is list of resources for building modern PWA apps based on new browser W3C standard Web Components.

Why Web Components

In the last several years, the component-based model for web application development was popularized, and the JavaScript community blossomed with a wide variety of libraries and approaches. Work on standardizing the web’s native component model began at Google in 2012, and after several years of open development, was successfully implemented across all major browsers in 2019.

Web components provide a standards-based solution to problems like reusability, interopability, and encapsulation. Using the browser's native component model will increase the longevity of your application. The web has an extremely strong tradition of backwards-compatibility, as standards bodies have consistently gone out of their way to maintain legacy APIs.