Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8
[ | |
{ | |
"name":"Afghanistan", | |
"flag":"🇦🇫", | |
"code":"AF", | |
"dial_code":"+93" | |
}, | |
{ | |
"name":"Åland Islands", | |
"flag":"🇦🇽", |
/** | |
As seen on twitch.tv/cassidoo | |
*/ | |
// A function that validates an email address | |
function validateEmail(email) { | |
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(email); | |
} |
function flattenFolderTree(folders) { | |
return folders.reduce((acc, folder) => { | |
const {children, ...rest} = folder; | |
if (!children || !children.length) { | |
return [...acc, rest]; | |
} | |
return [...acc, rest, ...flattenFolderTree(children)]; | |
}, []); |
import AWS from "aws-sdk"; | |
import { v2 as cloudinary } from "cloudinary"; | |
import crypto from "crypto"; | |
import fs from "fs"; | |
import Jimp from "jimp"; | |
import path from "path"; | |
import gifsicle from "gifsicle"; | |
import { execFile } from "child_process"; | |
import sizeOf from "image-size"; | |
import Settings from "../models/settings"; |
for (var i = 0; i < 1024 * 1024; i++) { | |
process.nextTick(function () { Math.sqrt(i) } ) | |
} |
import InplaceEdit from "./InplaceEdit" | |
class App extends React.Component { | |
render() { | |
return ( | |
<InplaceEdit | |
isUpdatingId={true || false} | |
id={idForTheField || ""} | |
updateKey={keyToReturnAnObjectWith || ""} | |
onUpdate={functionToCallForTheUpdate || (() => {})} |
const resursaModel = require('../../models/resursa-red'); | |
const competenteS = require('../../models/competenta-specifica'); | |
module.exports = (params) => { | |
return resursaModel.find({_id: params.idres}).populate({ | |
path: 'competenteS' | |
}).exec().then( (resursa) => { | |
// console.log(resursa); | |
if (resursa[0].content) { | |
let articleHTML = ''; | |
resursa[0].content.blocks.map(obj => { |
import axios from 'axios'; | |
const createCustomer = async form => { | |
const options = { | |
url: "https://api.paystack.co/customer", | |
headers: { | |
'authorization': `Bearer ${process.env.PAYSTACK_SECRET_KEY}`, | |
'content-type': 'application/json', | |
'cache-control': 'no-cache' | |
}, |
Direct copy of pre-encoded file:
$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8