Skip to content

Instantly share code, notes, and snippets.

View fernandohs1500's full-sized avatar

Fernando Henrique fernandohs1500

  • Uberlândia / MG
View GitHub Profile
@fernandohs1500
fernandohs1500 / verifyCsrfToken.php
Created April 26, 2022 14:24
handling the error CSRF token mismatch in Laravel.
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class VerifyCsrfToken extends Middleware
@fernandohs1500
fernandohs1500 / jitsi-jibri-installer
Created July 8, 2021 03:28
jitsi-jibri-installer
#!/bin/bash
set -e
JBI=https://gist.githubusercontent.com/fernandohs1500/6855776f11f23da404f30cf4a6509338/raw/b7db02b26bd53aef3c72dcc1e27e37fbaeb346e9/JBI%2520-%2520Without%2520DNS%2520check
JJI=https://gist.githubusercontent.com/fernandohs1500/5ced2f9ecd6c5f7a2214769c554155c1/raw/69bf1c765ffd0294d10992df59124b611deaa4cc
JJ2=https://gist.githubusercontent.com/fernandohs1500/291e50f5fce69eee63772a135fb3f770/raw/8600c8db9cd069fb6f5081e94d8fe69ea6337e5b
export APT_PROXY_OPTION=$APT_PROXY_OPTION
export DEBIAN_FRONTEND=noninteractive
apt-get $APT_PROXY_OPTION -y install wget ca-certificates \
#!/bin/bash
# -----------------------------------------------------------------------------
# input for jibri-jibri-installer
# -----------------------------------------------------------------------------
# core
out <<< "checking the number of cores..."
CORES=$(nproc --all)
if [[ "$CORES" -lt 4 ]]; then
out <<EOF
#!/bin/bash
# -----------------------------------------------------------------------------
# extra for jibri-jibri-installer
# -----------------------------------------------------------------------------
JIBRI_TMPL=https://raw.githubusercontent.com/jitsi-contrib/installers/main/templates/jibri
PROSODY=/etc/prosody/conf.avail/$JITSI_HOST.cfg.lua
JICOFO_SIP=/etc/jitsi/jicofo/sip-communicator.properties
JITSI_MEET_CONFIG=/etc/jitsi/meet/$JITSI_HOST-config.js
@fernandohs1500
fernandohs1500 / JBI - Without DNS check
Created July 8, 2021 03:20
JBI - Without DNS check
#!/bin/bash
set -e
export APT_PROXY_OPTION=$APT_PROXY_OPTION
export DEBIAN_FRONTEND=noninteractive
export JITSI_TMPL=https://raw.githubusercontent.com/jitsi-contrib/installers/main/templates/jitsi
export PROSODY_PLUGINS=https://raw.githubusercontent.com/jitsi-contrib/prosody-plugins/main
export CHECKMYPORT=https://checkmyport.emrah.com
export TCP=(80 443 4444 5222 5280 5269 5347 5349 8080 8888 9090)
export UDP=(5000 5349 10000)
@fernandohs1500
fernandohs1500 / HTTP CLIENT REQUEST JAVA
Created December 11, 2019 21:36
HTTP CLIENT REQUEST JAVA
jsonParams.put("wallet", billetRequest.getWallet());
JSONObject jsonParams = new JSONObject();
jsonParams.put("user", user);
StringEntity params = new StringEntity(jsonParams.toString());
HttpPost post = new HttpPost(url);
post.addHeader("Authorization", autorizathion);
post.addHeader("Content-Type", "application/json");
post.setEntity(params);
@fernandohs1500
fernandohs1500 / bitbucket-pipelines.yml
Last active September 8, 2019 19:23
Pipeline Bitbucket - PHP + AWSElasticBeanStalk
# You can specify a custom docker image from Docker Hub as your build environment.
image: php:7.1.29
pipelines:
branches:
develop:
- step:
name: "Build and Test"
caches:
- composer