Mês: agosto 2021

Como instalar o Composer no CentOS 8

Etapa 1: instalar o curl yum install -y curl Passo 2: curl -sS https://getcomposer.org/installer | php Resultado: [[email protected] ~]# curl -sS https://getcomposer.org/installer | php All settings correct for using Composer Downloading… Composer (version 1.10.13) successfully installed to: /root/composer.phar Use it: php composer.pha Etapa 3: mv composer.phar /usr/local/bin/composer

Por sudoroot 30 de agosto de 2021 0

PHP: como obter o endereço IP real do cliente

function get_client_ip() {       // Default to REMOTE_ADDR     $ip = $_SERVER[‘REMOTE_ADDR’];       $proxy_headers = array(         ‘HTTP_CF_CONNECTING_IP’, // CloudFlare         ‘HTTP_INCAP_CLIENT_IP’, // Incapsula         ‘HTTP_X_SUCURI_CLIENTIP’, // Sucuri         ‘HTTP_X_FORWARDED_FOR’, // Any Proxy     );       // Check for alternate headers indicating a forwarded IP address     foreach ( $proxy_headers as $proxy_header ) {         if ( isset( $_SERVER[ $proxy_header ] ) )…

Por sudoroot 30 de agosto de 2021 0

Como construir e publicar um pacote Typescript para NPM

Etapa 1: pacote init 1 2 mkdir name-typescript-package && cd name-typescript-package npm init -y Exemplo: 1 2 mkdir express-ip && cd express-ip npm init -y Resultado: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 D:\AppServ\www\node3>mkdir express-ip && cd express-ip   D:\AppServ\www\node3\express-ip>npm init -y Wrote to D:\AppServ\www\node3\express-ip\package.json:  …

Por sudoroot 30 de agosto de 2021 0

NestJS: middleware ipinfo

Dependência: @sansamour/express-ip Arquivo middleware/ip.ts import { Injectable, NestMiddleware } from ‘@nestjs/common’; import { Request, Response } from ‘express’; import {getIpInfoMiddleware} from ‘@sansamour/express-ip’ @Injectable() export class IpMiddleware implements NestMiddleware { use(req: Request, res: Response, next: Function) { return getIpInfoMiddleware()(req, res, next) } } Arquivo app.module.ts import {IpMiddleware} from ‘./middleware/ip’; … export class AppModule { configure(consumer: MiddlewareConsumer)…

Por sudoroot 30 de agosto de 2021 0

Listar streaming ao vivo HTTP e HTTPS para teste

Transmissão ao vivo de HTTP para teste: http://esioslive6-i.akamaihd.net/hls/live/202892/AL_P_ESP1_FR_FRA/playlist.m3u8 http://sample.vodobox.net/skate_phantom_flex_4k/skate_phantom_flex_4k.m3u8 http://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 http://cdn-fms.rbs.com.br/vod/hls_sample1_manifest.m3u8 http://content.jwplatform.com/manifests/vM7nH0Kl.m3u8 http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8 http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8 http://www.streambox.fr/playlists/test_001/stream.m3u8 http://184.72.239.149/vod/smil:BigBuckBunny.smil/playlist.m3u8 http://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8 Transmissão ao vivo HTTPS para teste: https://video-dev.github.io/streams/x36xhzz/x36xhzz.m3u8 https://playertest.longtailvideo.com/adaptive/wowzaid3/playlist.m3u8 https://content.jwplatform.com/manifests/vM7nH0Kl.m3u8 https://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8 https://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8 https://www.streambox.fr/playlists/test_001/stream.m3u8 https://mnmedias.api.telequebec.tv/m3u8/29880.m3u8 https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8 https://wowzaec2demo.streamlock.net/vod-multitrack/_definst_/smil:ElephantsDream/ElephantsDream.smil/playlist.m3u8 HTTP TV ao vivo http://cdnapi.kaltura.com/p/931702/sp/93170200/playManifest/entryId/1_oorxcge2/format/applehttp/protocol/http/uiConfId/28428751/a.m3u8 http://streaming.kordia.net.nz/out/u/ptv_houseaudio_96.m3u8?m=1542331772 HTTPS TV ao vivo https://yourmoneylive.akamaized.net/hls/live/712194/yourmoneyau/live1280x720.m3u8 https://rbmn-live.akamaized.net/hls/live/590964/BoRB-AT/master_3360.m3u8 https://stream.wairarapatv.co.nz/WiFi_High/playlist.m3u8 https://tvsn-i.akamaihd.net/hls/live/261837/tvsn_nz/tvsn_nz_4m5_4500.m3u8 https://english.streaming.aljazeera.net/aljazeera/english2/index2073.m3u8

Por sudoroot 30 de agosto de 2021 0