Skip to content

Instantly share code, notes, and snippets.

View matterai's full-sized avatar
🥷
Samurai Champloo

Vladimir W matterai

🥷
Samurai Champloo
View GitHub Profile
@edwardstock
edwardstock / FFMpegProgress.java
Last active December 12, 2020 22:50
FFmpeg progress parsing regular expression (with named groups)
public class FFMpegProgress {
// raw
// frame=\s*(?<nframe>[0-9]+)\s+fps=\s*(?<nfps>[0-9\.]+)\s+q=(?<nq>[0-9\.-]+)\s+(L?)\s*size=\s*(?<nsize>[0-9]+)(?<ssize>kB|mB|b)?\s*time=\s*(?<sduration>[0-9\:\.]+)\s*bitrate=\s*(?<nbitrate>[0-9\.]+)(?<sbitrate>bits\/s|mbits\/s|kbits\/s)?.*(dup=(?<ndup>\d+)\s*)?(drop=(?<ndrop>\d+)\s*)?speed=\s*(?<nspeed>[0-9\.]+)x
private final static Pattern PATTERN_S = Pattern.compile("" +
"frame=\\s*(?<nframe>[0-9]+)\\s+" +
"fps=\\s*(?<nfps>[0-9\\.]+)\\s+" +
"q=(?<nq>[0-9\\.-]+)\\s+(L?)\\s*" +
"size=\\s*(?<nsize>[0-9]+)(?<ssize>kB|mB|b)?\\s*" +
"time=\\s*(?<sduration>[0-9\\:\\.]+)\\s*" +
"bitrate=\\s*(?<nbitrate>[0-9\\.]+)(?<sbitrate>bits\\/s|mbits\\/s|kbits\\/s)?.*" +
@holmberd
holmberd / deploy-keys.md
Last active February 11, 2024 20:36
Setup GitHub repository SSH deploy keys

Setup GitHub repository SSH deploy keys

  1. Create GitHub repository in github and save the SSH repository url

  2. Init git on server in code directory

  • git init
  1. Create SSH keys on the server
  • ssh-keygen -t rsa -b 4096 -C your@email.here
  • Rename the key that doesn't end with .pub to repo-name.deploy.pem