Install ffmpeg
brew install ffmpeg
Download file through url, like this:
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
| import React, { | |
| useState, | |
| useCallback, | |
| forwardRef, | |
| DetailedHTMLProps, | |
| InputHTMLAttributes, | |
| Ref, | |
| useRef | |
| } from 'react' |
Install ffmpeg
brew install ffmpeg
Download file through url, like this:
ffmpeg -protocol_whitelist file,http,https,tcp,tls,crypto -i "http://url-file.domain.m3u8" -c copy video.mp4
| #!/usr/bin/env bash | |
| echo "BACKUPING..." | |
| docker run -i -e PGPASSWORD=<password> --rm postgres /usr/bin/pg_dump -p <port> -h <ip> -U <user> <db> | gzip -9 > backup.sql.gz | |
| echo "BACKUPING...[END]" | |
| if [ -n "$1" ] ; then | |
| where="where pg_stat_activity.datname = '<db>' AND pid <> pg_backend_pid();" | |
| fi | |
| cat <<-EOF | docker exec -i <container_db_local> psql -h 127.0.0.1 -U <user_db> -d postgres |
| class MyJob < ActiveJob::Base | |
| queue_as :urgent | |
| rescue_from(NoResultsError) do | |
| retry_job wait: 5.minutes, queue: :default | |
| end | |
| def perform(*args) | |
| MyService.call(*args) | |
| end |
| version: '3' | |
| networks: | |
| default: | |
| driver: bridge | |
| webproxy: | |
| external: true | |
| services: | |
| db: |
| import React from "react" | |
| import Checkbox from "./Checkbox" | |
| import { render, fireEvent, cleanup } from "react-testing-library" | |
| afterEach(cleanup) | |
| it("testa check", () => { | |
| const { getByTestId } = render(<Checkbox />) | |
| fireEvent.click(getByTestId("meucheck")) | |
| expect(getByTestId("meucheck").value).toEqual("123"); |
| class ActiveSupport::TestCase | |
| def self.prepare | |
| # Add code that needs to be executed before test suite start | |
| end | |
| prepare | |
| def setup | |
| # Add code that need to be executed before each test | |
| end |
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'activerecord', '5.1.3' |
STOP ALL CONTAINERS
$ docker stop $(docker ps -a -q)REMOVE ALL CONTAINERS
$ docker rm $(docker ps -a -q)| // app.js | |
| const onPressOpenLink = async (url, title) => { | |
| const { navigate } = props.navigation | |
| navigate('Web', { url: url, title: title }) | |
| } | |
| // webview.js | |
| import React, { useState, useEffect } from 'react' | |
| import { WebView } from 'react-native-webview' |