Skip to content

Instantly share code, notes, and snippets.

View ms-studio's full-sized avatar

Manuel Schmalstieg ms-studio

View GitHub Profile
@ms-studio
ms-studio / custom-properties-boilerplate.css
Created January 1, 2020 16:50 — forked from malarkey/custom-properties-boilerplate.css
CSS Custom Properties boilerplate
/* CSS Custom Properties */
:root {
--font-family: 'Georgia', serif;
--font-family-alt: 'Helvetica', Arial, sans-serif;
--font-weight: 400;
--font-weight-bold: 700;
--font-weight-black: 900;
/* 3:4 perfect fourth scale */
@ms-studio
ms-studio / ffmpeg_mkv_mp4_conversion.md
Created June 19, 2019 23:21 — forked from jamesmacwhite/ffmpeg_mkv_mp4_conversion.md
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

@ms-studio
ms-studio / gist:8027e39efe1c1a891419cc635220d0d4
Created January 8, 2019 13:38 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
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; }
</style>
@ms-studio
ms-studio / WP YouTube Video EMbed Override
Created April 30, 2018 08:31 — forked from gabrielmerovingi/WP YouTube Video EMbed Override
Override the default WordPress oEmbed for YouTube Videos to always use the myCRED Video Shortcode.
/**
* 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
ms-studio / simple-git-branching-model.md
Created December 9, 2016 21:45 — forked from jbenet/simple-git-branching-model.md
a simple git branching model

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.

Here are a few questions that will tee us up for a good conversation:
- Can you tell me about your project in a few sentences?
- What’s the timeframe? Does a certain event depend on this project launching?
- What are you looking for from us? Do you want us to design, build, and launch the whole site? Or do you have developers or other partners lined up and only need us for design?
- Have you already started on any part of the project? Do you have existing work? A new logo? Some rough designs or ideas for the site?
- How large is your team? What are the roles you envision on your end?
- How did you hear about our work? What specifically interests you about it? Any projects that you’re keen on?
- How much money have you set aside for this project?
- Are you talking to others about this project? Might we ask how many? What do you like about their work?
INITIALISATION
==============
load wp-config.php
set up default constants
load wp-content/advanced-cache.php if it exists
load wp-content/db.php if it exists
connect to mysql, select db
load object cache (object-cache.php if it exists, or wp-include/cache.php if not)
load wp-content/sunrise.php if it exists (multisite only)
@ms-studio
ms-studio / snowden-ietf93.md
Created October 12, 2015 20:27 — forked from mnot/snowden-ietf93.md
Transcript of Edward Snowden's comments at IETF93.
@ms-studio
ms-studio / sanitize-filename.php
Last active August 29, 2015 13:57 — forked from herewithme/sanitize-filename.php
Adding more problematic characters.
<?php
/*
Plugin Name: No french punctuation and accents for filename
Description: Remove all french punctuation and accents from the filename of upload for client limitation (Safari Mac/IOS)
Plugin URI: http://www.beapi.fr
Version: 1.0
Author: BeAPI
Author URI: http://www.beapi.fr
/*
@ms-studio
ms-studio / WordPress Webkit Line Height Fixer
Last active August 29, 2015 13:57 — forked from lumpysimon/WordPress Webkit Line Height Fixer
Fix for webkit (Chrome, Safari) adding style="line-height: 1.55;" all over the place in the WordPress content editor.
<?php
/*
Plugin Name: Webkit Line Height Fixer
Plugin URI: https://gist.github.com/lumpysimon/8782859
Description: Remove the annoying inline line-height styles added by Webkit
Version: 1.0
Author: Simon Blackbourn @ Lumpy Lemon
Author URI: http://lumpylemon.co.uk
See also: https://core.trac.wordpress.org/ticket/26975