echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
import collections | |
from typing import Counter, List, Set, Tuple | |
def subanagrams(letters: Counter[str], words: Set[str], min_len=4) -> List[Tuple[str, Counter[str]]]: | |
anagrams = [] | |
for word in words: | |
if len(word) < min_len: continue | |
rest = letters.copy() |
import React, { useState, useEffect, useRef } from 'react' | |
import { StripeProvider } from 'react-stripe-elements' | |
type TProvider = React.FC<{ apiKey: string }> | |
const AsyncStripeProvider: TProvider = props => { | |
const { apiKey, children } = props | |
const [stripe, setStripe] = useState<stripe.Stripe | null>(null) | |
const isMounted = useRef(false) | |
const unmountFn = () => { |
Hi Nicholas,
I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:
The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't
var myApp = angular.module('myApp', []); | |
myApp.directive('googleplace', function() { | |
return { | |
require: 'ngModel', | |
link: function(scope, element, attrs, model) { | |
var options = { | |
types: [], | |
componentRestrictions: {} | |
}; |
(Turns out, I have no idea when the Germanian war that started in 17 AD ended, but if you happen to know, feel free to reach out.[0])
(Have a complaint about this email? Want to make it better, fix a typo, or add more info? Fork the gist on GitHub!)
Hello Hackers-
/** | |
* Detect if the browser can play MP3 audio using native HTML5 Audio. | |
* Invokes the callack function with first parameter is the boolean success | |
* value; if that value is false, a second error parameter is passed. This error | |
* is either HTMLMediaError or some other DOMException or Error object. | |
* Note the callback is likely to be invoked asynchronously! | |
* @param {function(boolean, Object|undefined)} callback | |
*/ | |
function canPlayAudioMP3(callback){ | |
try { |