-
Instalar ffmpeg da fonte: https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu
-
Instalar nginx com módulo rtmp
wget http://nginx.org/download/nginx-1.9.3.tar.gz git clone https://github.com/arut/nginx-rtmp-module wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.bz2 tar -xvf pcre-8.36.tar.bz2 tar -xvf nginx-1.9.3.tar.gz cd nginx-1.9.3
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
'use client' | |
import * as React from 'react' | |
import { EyeIcon, EyeOffIcon } from 'lucide-react' | |
import { Button } from '@/components/ui/button' | |
import { Input, type InputProps } from '@/components/ui/input' | |
import { cn } from '@/lib/utils' | |
const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(({ className, ...props }, ref) => { |
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
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import Vue from 'vue' | |
import App from './App' | |
import VeeValidator, { Validator } from 'vee-validate' | |
import CpfValidator from './components/validators/cpf.validator' | |
import Dictionary from './components/validators/dictionary' | |
import Produto from './components/produtos.vue' | |
Validator.extend('cpf', CpfValidator) |
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
-- add users: | |
-- $ htpasswd -s -c /etc/nginx-rtmp/.htpasswd streamname | |
-- stream: | |
-- $ ffmpeg -i foo.mp4 -c copy -f flv rtmp://abc.de/streamname?auth=password | |
local users = {} | |
for line in io.lines("/etc/nginx-rtmp/.htpasswd") do | |
local user, pass = line:match("([^:]+):{SHA}([^\n]+)") | |
users[user] = pass | |
end |
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
# para esse exemplo pressupõe-se que você tenha um recurso post com o campo >> content:string | |
#Primeiro criamos um model Tag | |
rails g model Tag name:string | |
# >> crie uma tabela CreatePostsTags com post_id e tag_id (para nosso relacionamento has_and_belongs_to_many) | |
rails g migration CreatePostsTags post:references tag:references | |
# >> modifique a migration CreatePostsTags add :id => false, já que não precisaremos de id nesta tabela | |
class CreatePostsTags < ActiveRecord::Migration[5.0] |
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
#user nobody; | |
worker_processes 1; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; |
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
_ _ _ ____ _ _ | |
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| | | |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / | | |
| _ | (_| | (__| < | |_) | (_| | (__| <|_| | |
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_) | |
Um Guia Faça Você Mesmo |
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 | |
# Import required Python libraries | |
import time | |
import RPi.GPIO as GPIO | |
import sys | |
from twython import Twython | |
import pygame |
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
require 'aws-sdk' | |
require 'base64' | |
COREOS_AMI="ami-4b1c763c" | |
ec2 = Aws::EC2::Client.new(region: 'eu-west-1') | |
ecs = Aws::ECS::Client.new(region: 'eu-west-1') | |
NUM_INSTANCES=10 |
Uploads large files in multiple chunks. Also has the ability to resume if the upload is interrupted.
Typical usage:
- Send a POST request to
/upload
with the first chunk of the file and receive an upload id in return. - Repeatedly PATCH subsequent chunks using the upload id to identify the upload in progress and an offset representing the number of bytes transferred so far.
- After each chunk has been uploaded, the server returns a new offset representing the total amount transferred.
- After the last chunk commit the upload by passing its id to another endpoint such as
POST /upload/commit/:id
:
NewerOlder