This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%!TEX TS-program = xelatex | |
%!TEX encoding = UTF-8 Unicode | |
% 以上设定默认使用 XeLaTeX 编译,并指定 Unicode 编码,供 TeXShop 自动识别 | |
% XeLaTeX 示例 | |
\documentclass[12pt]{article} | |
% XeTeX 配合 fontspec 可以非常方便的设置字体 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, cmd, sys, re, glob, os.path, shutil, zipfile, tarfile, gzip | |
# Credits | |
# | |
# The python code here was written by pudquick@github | |
# | |
# License | |
# | |
# This code is released under a standard MIT license. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assuming python and pip are already installed | |
# installing the instantclient is usually where problems happen | |
# download the following files from oracle | |
# | |
# oracle-instantclient11.2-basic-11.2.0.3.0-1.x86_64.rpm | |
# oracle-instantclient11.2-devel-11.2.0.3.0-1.x86_64.rpm | |
# oracle-instantclient11.2-sqlplus-11.2.0.3.0-1.x86_64.rpm | |
# install the rpms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Copyright 2012 LinkedIn Corp. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_m3u8(m3u8) | |
File.open(m3u8, 'r') do |file| | |
keyfile = nil | |
iv = 0 | |
file.each_line do |line| | |
line.chomp! | |
if line =~ /^#EXT-X-KEY:METHOD=AES-128,URI="(.*?)"(,IV=0x(.*))?/ | |
keyfile = $1 | |
if $2 | |
iv = $3 |
NewerOlder