Skip to content

Instantly share code, notes, and snippets.

Maksim Surguy msurguy

Block or report user

Report or block msurguy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
msurguy /
Created Nov 4, 2019 — forked from dvlden/
Convert video files to MP4 through FFMPEG

This is my personal list of functions that I wrote for converting mov files to mp4!

Command Flags

Flag Options Description
-codec:a libfaac, libfdk_aac, libvorbis Audio Codec
-quality best, good, realtime Video Quality
-b:a 128k, 192k, 256k, 320k Audio Bitrate
-codec:v mpeg4, libx264, libvpx-vp9 Video Codec
View actions.yml
// Slack action:
args = "tag v*"
- v1 # Push events to v1 tag
- v1.0 # Push events to v1.0 tag
View gist:bd036dda5ff44d8d6a4c94070b6e386c
on: [push]
name: Deploy on Now
runs-on: ubuntu-latest
- uses: actions/checkout@master
- name: deploy
uses: actions/zeit-now@master
View basic-auth-module.js
const { createMiddleware } = require('./basic-auth')
export default function (moduleOptions) {
const options = Object.assign({}, this.options.basic, moduleOptions || {})
const { name, pass, enabled } = options
if (!(name && pass)) {
console.log('name or pass not found. Skip registration of authentication server.')
return false
if (enabled === false) {
msurguy /
Created Jul 21, 2019 — forked from alexellis/
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

msurguy /
Created May 15, 2019
timelapse video from GoPro Hero photos
ffmpeg \
  -r 15000/1001 \
  -pattern_type glob -i '*.JPG' \
  -vf "crop=in_w:in_w*9/16,scale=3840:-2" \
  -sws_flags lanczos \
  -pix_fmt yuv420p \
  -vcodec libx264 \
msurguy /
Last active Apr 9, 2019
Jetson Nano OpenCV 4.0.0 install script
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <Install Folder>"
msurguy /
Created Apr 8, 2019 — forked from mattdesl/
A Browser and Node.js compatible canvas-sketch script for generative and parametric 3D geometry.

Generative Geometry in Browser + Node.js

Here is a script that can be run with canvas-sketch to generate OBJ files from a parametric/algorithmic 3D ThreeJS geometry.

Hitting "Cmd + S" from the canvas-sketch tool will export a PNG and OBJ file of the scene.

If the same script is run from Node, it will simply render the OBJ to stdout, or write to the filename argument if given.

msurguy /
Created Mar 29, 2019
Pythoin File downloader
import csv, sys
#import requests
import urllib.request
#from urllib.request import urlopen
import os
filename = 'test.csv'
with open(filename, mode='r', encoding='utf-8-sig') as f:
reader = csv.reader(f)
msurguy / .block
Created Feb 22, 2019 — forked from getflourish/.block
D3 + Vue.js
View .block
license: mit
You can’t perform that action at this time.