running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
import random | |
import string | |
import re | |
from collections import Counter | |
from contextlib import contextmanager | |
class SwitchError(RuntimeError): | |
pass | |
@contextmanager | |
def switch(switch_value, *, ignore_nomatch=True): | |
blocks = {} | |
blocks.default = None |
.element { | |
position: relative; | |
top: 50%; | |
transform: translateY(-50%); | |
} |
# YOU MAY WANT TO CHECK THIS OUT: https://github.com/douglasmiranda/ddpt/blob/master/{{cookiecutter.django_project_name}}/{{cookiecutter.django_project_name}}/config/local.py | |
# If you don't do this you will have to add the host IP in INTERNAL_IPS = ('127.0.0.1',) | |
# And it will change, then you will have to change INTERNAL_IPS again. | |
def show_toolbar(request): | |
if request.is_ajax(): | |
return False | |
return True |
The gist that used to be here has since been implemented as a complete pip-installable package: https://github.com/anqxyr/mkepub | |
This notice is left here as a courtesy to the people who starred/bookmarked this gist in the past. | |
/** | |
* Utility functions for linking into native messaging applications (currently SMS and WhatsApp) without prepoluating a phone number. | |
* | |
* Plinks is based on this blog post I wrote earlier this year: | |
* http://blog.julianklotz.de/2015/03/14/the-sms-uri-scheme/ | |
* | |
* MIT license. | |
*/ | |
window.plinks = (function() { |
// ==UserScript== | |
// @name Medium: remove location hash | |
// @namespace http://efcl.info/ | |
// @description Remove location hash from medium | |
// @include https://medium.com/*#* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function removeLocationHash(){ |
import ast | |
import inspect | |
import os | |
def get_short_lambda_source(lambda_func): | |
"""Return the source of a (short) lambda function. | |
If it's impossible to obtain, returns None. | |
""" | |
try: |
running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8