Skip to content

Instantly share code, notes, and snippets.

View technorior's full-sized avatar

Vladimir Kurochkin technorior

  • aprobatica.com
  • Tomsk
View GitHub Profile
@witmin
witmin / ffmpeg-mp4-to-animated-webp.md
Last active June 12, 2024 13:30
Convert MP4 file to animated WebP in ffmpeg

Convert MP4 file to animated WEBP file in ffmpeg CLI

1. Install ffmpeg CLI through homebrew

In terminal.app, install ffmpeg through homebrew

brew install ffmpeg

Validate the installation:

Building pgModeler in MacOS with Homebrew

The official installation instructions for pgModeler recommends installing Xcode and the Enterprise DB distribution of Postgres to fulfill its build requirements. Luckily, Homebrew's got us covered!

  1. Checkout the source

    git clone https://github.com/pgmodeler/pgmodeler.git
    
@rschutjens
rschutjens / dynamicUpdate.py
Created May 5, 2017 01:55
dynamic update of selectField options Flask Ajax
from flask import Flask
from flask import json, make_response, render_template_string, request
from flask_wtf import Form
from wtforms import IntegerField, SelectField
from wtforms.validators import DataRequired
template = """
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
@callmephilip
callmephilip / gist:3626669
Created September 4, 2012 21:21
[JavaScript] Lock site in portrait mode in mobile Safari
// Kudos to Grumdrig
// http://stackoverflow.com/questions/1207008/how-do-i-lock-the-orientation-to-portrait-mode-in-a-iphone-web-application
$(document).ready(function () {
function reorient(e) {
var portrait = (window.orientation % 180 == 0);
$("body > div").css("-webkit-transform", !portrait ? "rotate(-90deg)" : "");
}
window.onorientationchange = reorient;
window.setTimeout(reorient, 0);