- place this config in
/etc/systemd/system/supervisord.service
- kill all supervisord processes
sudo systemctl daemon-reload
sudo systemctl enable supervisord
- start with
sudo systemctl start supervisord
if already not started
This file contains hidden or 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
/** | |
* Temporary wrapper for firebase functions until @sentry/serverless support is implemented | |
* It currently supports wrapping https, pubsub and firestore handlers. | |
* usage: https.onRequest(wrap((req, res) => {...})) | |
*/ | |
import type {Event} from '@sentry/types'; | |
import type {https} from 'firebase-functions'; | |
import type {onRequest, onCall} from 'firebase-functions/lib/providers/https'; | |
import type {ScheduleBuilder} from 'firebase-functions/lib/providers/pubsub'; | |
import type {DocumentBuilder} from 'firebase-functions/lib/providers/firestore'; |
This file contains hidden or 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
<?php | |
namespace App\Enums; | |
use BenSampo\Enum\Enum; | |
final class HttpStatusCode extends Enum | |
{ | |
const Continue = 100; | |
const SwitchingProtocols = 101; |
This file contains hidden or 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
Hay que modificar el archivo applicationHost.config para poder aceptar el método PUT. | |
Referencia: https://www.azuretechguy.com/applicationhost-config-file-in-azure-app-service | |
* Agregar extensión IIS Manager a Azure webapp | |
* En applicationHost.xdt agregar lo siguiente: | |
<?xml version="1.0" encoding="utf-8"?> | |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> | |
<system.webServer> | |
<security> |
This file contains hidden or 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
addEventListener('fetch', event => { | |
event.respondWith(handleRequest(event.request)) | |
}) | |
const string2buffer = string => { | |
let tempArray = new Uint8Array(string.length) | |
for(let i = string.length; i--) tempArray[i] = string.charCodeAt(i) | |
return tempArray.buffer | |
} |
This file contains hidden or 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
<?php | |
use GuzzleHttp\Client; | |
class FCM{ | |
protected $endpoint; | |
protected $topic; | |
protected $data; | |
protected $notification; |
This file contains hidden or 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 bash | |
set -e | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
source="${1}" | |
target="${2}" | |
command="ffmpeg -hide_banner -y -i ${1} \ | |
-vf scale=w=640:h=360 -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 800k -maxrate 856k -bufsize 1200k -b:a 96k -hls_segment_filename ${target}/360p_%03d.ts ${target}/360p.m3u8 \ | |
-vf scale=w=842:h=480 -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 1400k -maxrate 1498k -bufsize 2100k -b:a 128k -hls_segment_filename ${target}/480p_%03d.ts ${target}/480p.m3u8 \ | |
-vf scale=w=1280:h=720 -c:a aac -ar 48000 -c:v h264 -profile:v main -crf 20 -sc_threshold 0 -g 48 -keyint_min 48 -hls_time 4 -hls_playlist_type vod -b:v 2800k -maxrate 2996k -bufsize 4200k -b:a 128k -hls_segment_filename ${target}/720p_%03d.ts ${tar |
This file contains hidden or 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
const functions = require('firebase-functions'); | |
const admin = require('firebase-admin'); | |
admin.initializeApp(); | |
const express = require('express'); | |
const cookieParser = require('cookie-parser')(); | |
const cors = require('cors')({origin: true}); | |
const app = express(); | |
// See https://github.com/firebase/functions-samples/blob/Node-8/authorized-https-endpoint/functions/index.js | |
const validateFirebaseIdToken = require('./validateFirebaseIdToken'); |
This file contains hidden or 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
var crypto = require('crypto'); | |
const id = process.env.API_ID; // your API ID, reading from environment variable | |
const key = process.env.KEY; // your API key, reading from environment variable | |
const preFix = "VERACODE-HMAC-SHA-256"; | |
const verStr = "vcode_request_version_1"; | |
var resthost = "api.veracode.com"; // rest host | |
var xmlhost = "analysiscenter.veracode.com"; // xml host |
NewerOlder