1つの入力に対して複数の出力をするには、teeを使う。
以下は、RTMP入力をパイプする例。
$ gst-launch-1.0 rtmpsrc location=$INPUT ! flvdemux ! flvmux ! tee name=t ! queue ! rtmpsink location=$OUT1 t. ! queue ! rtmpsink location=$OUT2| package main | |
| import ( | |
| "fmt" | |
| ) | |
| func main() { | |
| var a int | |
| var answer string | |
| fmt.Scan(&a) |
| 'use strict' | |
| function main (input) { | |
| let x = Number(input) | |
| if (x < 1200) { | |
| console.log('ABC') | |
| } else { | |
| console.log('ARC') | |
| } | |
| } |
1つの入力に対して複数の出力をするには、teeを使う。
以下は、RTMP入力をパイプする例。
$ gst-launch-1.0 rtmpsrc location=$INPUT ! flvdemux ! flvmux ! tee name=t ! queue ! rtmpsink location=$OUT1 t. ! queue ! rtmpsink location=$OUT2$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install certbot
standalone
$ sudo certbot certonly --standalone -d example.com -m some@example.com --agree-tos -n
| const Chromy = require('chromy') | |
| const word = 'ヘッドレスブラウザ' | |
| const chromy = new Chromy() | |
| chromy.chain() | |
| .goto('https://google.com') | |
| .insert('input[type=text]', word) | |
| .click('input[value^=Google]', {waitLoadEvent: true}) | |
| .evaluate(() => { |
| const Chromy = require('chromy') | |
| const word = 'JavaScript' | |
| const chromy = new Chromy() | |
| chromy.chain() | |
| .goto('https://www.amazon.co.jp/') | |
| .select('select#searchDropdownBox', 'search-alias=stripbooks') | |
| .insert('input#twotabsearchtextbox', word) | |
| .click('input[type=submit]', {waitLoadEvent: true}) |
| const Chromy = require('chromy') | |
| const hashtag = 'しまむら' | |
| const chromy = new Chromy() | |
| chromy.chain() | |
| .goto(`https://www.instagram.com/explore/tags/${hashtag}/`) | |
| .wait('img') // wait to render | |
| .evaluate(() => { | |
| const images = document.querySelectorAll('img') |
| const SideEff = require('side-eff') | |
| // グローバル変数 | |
| let message = '' | |
| class Message extends SideEff { | |
| // 副作用のあるメソッド | |
| affect (payload) { | |
| message += payload + '\n' | |
| } |
| cat package.json | jq '.name = "modified-name"' | sponge package.json |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width,initial-scale=1"> | |
| <title>Smartphone Textarea</title> | |
| </head> | |
| <style> | |
| html, body { | |
| margin: 0; |