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
#! /usr/bin/env python | |
# based on vplayer.py (http://pymedia.org/tut/src/vplayer.py.html) by dmitry borisov (http://pymedia.org) | |
# bloated and uglied for fair reasons by sven könig (http://www.popmodernism.org) | |
import sys, thread, time, traceback, Queue, os | |
import optparse | |
import pymedia | |
import pymedia.video.muxer as muxer |
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
######################### | |
# .gitignore file for Xcode4 and Xcode5 Source projects | |
# | |
# Apple bugs, waiting for Apple to fix/respond: | |
# | |
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation? | |
# | |
# Version 2.6 | |
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects | |
# |
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
type ActionTypes = 'actionA' | 'actionB' | 'actionC' | 'actionNoPayload'; | |
type ActionPayloads = { | |
actionA: { payload: number }; | |
actionB: { payload: string }; | |
actionC: { foo: boolean; bar: boolean }; | |
}; | |
type Actions = { | |
[key in ActionTypes]: { |
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 type-safe high-order-component creator | |
* that injects a prop named a given string, | |
* with a type inferred by a given hook's | |
* return value. | |
* | |
* Ex: | |
* const Component = ({ name }) => { | |
* return <>Hello {name}</>; | |
* }; |
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
type LinkifiedString = Array<string | JSX.Element> | string | null | undefined | |
/** | |
* Turn a string into JSX with autolinks | |
*/ | |
export function getLinkifiedString(str: string | null | undefined): LinkifiedString { | |
try { | |
// Group by whitespace (wrapping regex in parens keeps matched results in the array) | |
const substrings = str?.split(/(\s+)/g) |