Skip to content

Instantly share code, notes, and snippets.

Manuel Schmalstieg ms-studio

Block or report user

Report or block ms-studio

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
ms-studio /
Created Jun 19, 2019 — forked from jamesmacwhite/
Easy way to convert MKV to MP4 with ffmpeg

Converting mkv to mp4 with ffmpeg

Essentially just copy the existing video and audio stream as is into a new container, no funny business!

The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.

With ffmpeg this can be achieved with -c copy. Older examples may use -vcodec copy -acodec copy which does the same thing.

These examples assume ffmpeg is in your PATH. If not just substitute with the full path to your ffmpeg binary.

Single file conversion example

View gist:8027e39efe1c1a891419cc635220d0d4
<!doctype html>
<title>Site Maintenance</title>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
View mem-category-order-plugin.php
Plugin Name: MEM Category Order
Plugin URI:
Description: Functionality plugin for
Version: 0.1
Author: Manuel Schmalstieg
Author URI:
ms-studio / WP YouTube Video EMbed Override
Created Apr 30, 2018 — forked from gabrielmerovingi/WP YouTube Video EMbed Override
Override the default WordPress oEmbed for YouTube Videos to always use the myCRED Video Shortcode.
View WP YouTube Video EMbed Override
* Override WP oEmbed
* @version 1.0
add_filter( 'embed_oembed_html', 'mycred_override_video_shortcode', 999, 4 );
function mycred_override_video_shortcode( $original, $url, $attr, $post_ID ) {
// If myCRED is not enabled
if ( ! function_exists( 'mycred_render_shortcode_video' ) ) return $original;
// Get cache
ms-studio / improve-slideshare-embed.js
Created Dec 11, 2017
Improve Slideshare embedding - Make that iframe exactly the right size!
View improve-slideshare-embed.js
* Improve Slideshare embedding
* Make that iframe exactly the right size!
$(".entry-content p iframe[src*='https://www.slideshare']").each(function() {
var $this = $(this);
var slideW = $this.attr('width');
var slideH = $this.attr('height');
ms-studio / vimeo-responsive-embed.js
Created Dec 11, 2017
View vimeo-responsive-embed.js
$(".entry-content > p > iframe").each(function() {
var $this = $(this);
// donner classe video-gallery-item au parent
// corriger le ratio
var videoWidth = $this.attr('width');
var videoHeight = $this.attr('height');
var videoRatio = 100*(videoHeight / videoWidth);
$this.parent().css( "padding-bottom", videoRatio+"%" );
View tablepress-example.html
$.tablesorter.themes.bootstrap = {
// these classes are added to the table. To see other table classes available,
// look here:
table : 'table table-bordered table-striped',
caption : 'caption',
// header class names
ms-studio / form_name_shortcode.php
Last active Oct 7, 2018
Shortcode for the Formidable WordPress plugin, that returns the name of the current form (based on the entry ID).
View form_name_shortcode.php
* Form Name Shortcode
* For usage in confirmation email
* Returns name of current form
* Use the shortcode like this: [frm-form-name id=[id]]
* The [id] parameter will produce the ID of current entry
* See
ms-studio / formidable-get-form-name.php
Last active Sep 7, 2017
With Formidable Forms, display Names of all forms a user submitted
View formidable-get-form-name.php
// For context, see discussion here:
global $wpdb;
// Get IDs of all Forms the current user has submitted:
$user_forms = $wpdb->get_col( $wpdb->prepare(

a simple git branching model

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

You can’t perform that action at this time.