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
This file contains hidden or 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
package main | |
import "golang.org/x/tour/reader" | |
type MyReader struct{} | |
func (r MyReader) Read(b []byte) (int, error) { | |
for i := range b { | |
b[i] = 65 | |
} |
This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
) | |
type ErrNegativeSqrt float64 | |
func (e ErrNegativeSqrt) Error() string { | |
return fmt.Sprintf("cannot Sqrt negative number %d", int(e)) |
This file contains hidden or 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
package main | |
import "golang.org/x/tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
r := make([][]uint8, dy) | |
for y := range r { | |
r[y] = make([]uint8, dx) | |
for x := range r[y] { | |
// different functions to generate the “picture” |
This file contains hidden or 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
FROM redis:6.0.10 |
This file contains hidden or 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
[core] | |
# ... | |
[init] | |
defaultBranch = main | |
[commit] | |
gpgsign = true | |
# you want that to have a default for locations outside of your regular dev folders |
This file contains hidden or 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 node | |
// dependencies | |
const https = require('https'); | |
const express = require('express'); | |
const multer = require('multer'); | |
// app | |
const app = express(); | |
const storage = multer.memoryStorage(); |
This file contains hidden or 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 bash | |
# get platform to determine IP address accordingly | |
PLATFORM=$(uname -s) | |
if [ "$PLATFORM" == "Darwin" ]; then | |
IP=$(ipconfig getifaddr en0) | |
elif [ "$PLATFORM" == "Linux" ]; then | |
IP=$(hostname -I) | |
else | |
echo "Unknown platform. Can not determine IP address that way." |
This file contains hidden or 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
// black lists | |
var linkBlackList = [ | |
// start of the URI you want to black list, e.g. '/display/~marco.lehmann' | |
]; | |
var userBlackList = [ | |
// user name you want to black list, e.g. 'marco.lehmann' | |
]; |
This file contains hidden or 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
var data = [1, 2, 3]; | |
var REFRESH_RATE = 16.67; | |
function veryExpensive(item) { | |
// ... | |
} | |
function forEachExpensive(data, callback) { | |
var index = 0; | |
var dataLength = data.length; |