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
ffmpeg -debug_ts -re -copyts -i <intput_ts> -f null out.null |
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
################################################## | |
# Add natural number sorting to arrays | |
################################################## | |
class Array | |
# Method which sort an array composed of strings with embedded numbers by | |
# the 'natural' representation of numbers inside a string. | |
def natcmp | |
reg_number = /\d+/ |
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 argparse | |
################################################## | |
# Create the argument parser | |
# http://docs.python.org/dev/library/argparse.html | |
################################################## | |
parser = argparse.ArgumentParser(description="Parse arguments") | |
parser.add_argument("input_file", action="store", help="File to read", metavar="INFILE") | |
parser.add_argument("output_file", action="store", default="output.txt", help="File to write", metavar="OUTFILE") |
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
require 'choice' | |
# Choice Block for argument definition | |
Choice.options do | |
header 'Application options:' | |
option :template, :required => true do | |
short '-t' | |
long '--template=TEMPLATE' | |
desc 'The path to the preset settings template' |
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
// | |
// Dynamically generate the html script tag to prevent | |
// blocking the parser. | |
// http://css-tricks.com/thinking-async/ | |
// | |
jQuery.ajax({ | |
url: '//third-party.com/resource.js', | |
dataType: 'script', | |
success: function() { | |
// script loaded, do stuff! |
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
(* | |
A sub-routine for trimming unwanted characters from strings. | |
Taken from http://www.macosxautomation.com | |
*) | |
on trim_line(this_text, trim_chars, trim_indicator) | |
-- 0 = beginning, 1 = end, 2 = both | |
set x to the length of the trim_chars | |
-- TRIM BEGINNING | |
if the trim_indicator is in {0, 2} then | |
repeat while this_text begins with the trim_chars |
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
STDMETHODIMP CMyClass::GetThings(VARIANT* returnThings) | |
{ | |
HRESULT hr = S_OK; | |
SAFEARRAY FAR* safeArray; | |
SAFEARRAYBOUND safeArrayBound; | |
if (m_thing != NULL) | |
{ | |
std::set<const char *>::iterator it; | |
std::set<const char *> things = m_thing->GetThings(); |
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
#include <comutil.h> | |
_com_util::ConvertBSTRToString("") | |
_com_util::ConvertStringToBSTR(""); |
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
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Filename: bblean.vim | |
" Purpose: Vim syntax file for bblen resource files | |
" Language: bblean *.rc files | |
" Maintainer; Kevin S Kirkup [email protected] | |
" URL: | |
" Last Update: Sat 11/19/2005 | |
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
"----------------------------------------------------------- |
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
" Vim color file | |
" Maintainer: Kevin S Kirkup <[email protected]> | |
" Last Change: 2005 Feb 27 | |
" This color scheme uses a black background. | |
" First remove all existing highlighting. | |
set background=dark | |
highlight clear |