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\Providers; | |
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; | |
use Illuminate\Support\Facades\Gate; | |
class AuthServiceProvider extends ServiceProvider | |
{ | |
/** |
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
public function reportLink($link) | |
{ | |
$link = $link->domain; | |
/*$visits = DB::table('tracker_page_trackings') | |
->select(DB::raw('count(DISTINCT dimension1) as visits'), DB::raw('count(*) as pageViews')) | |
->where('pagePathLevel1', 'like', '%'.$link.'%') | |
->get();*/ |
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 | |
error_reporting(E_ALL); | |
$host = '127.0.0.1'; | |
$user = 'root'; | |
$pass = 'password'; | |
$database = 'test_cnes'; | |
$delimiter = ';'; | |
$db = mysqli_connect($host, $user, $pass,$database); |
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
ns1.sc.gov.br,200.19.215.1 | |
mx1.sc.gov.br,200.19.215.50 | |
delegaciaeletronica2.sc.gov.br,200.19.215.164 | |
ead2.sc.gov.br,200.19.215.34 | |
delegaciavirtual2.sc.gov.br,200.19.215.164 | |
smtp2.sc.gov.br,200.19.215.16 | |
sistemas2.sc.gov.br,200.19.215.124 | |
ns2.sc.gov.br,200.19.215.2 | |
www2.sc.gov.br,200.19.215.26 | |
pop3.sc.gov.br,200.19.215.44 |
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\Http\Requests; | |
use Illuminate\Foundation\Http\FormRequest; | |
class UserRequest extends FormRequest | |
{ | |
/** | |
* Determine if the user is authorized to make this request. |
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
# Use root/example as user/password credentials | |
version: '3.1' | |
services: | |
mongo: | |
image: mongo | |
restart: always | |
ports: | |
- 27017:27017 |
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
[ | |
{ | |
$match: { | |
NR_VOTAVEL: 1580, | |
SG_UF: "SP", | |
CD_CARGO_PERGUNTA: 6, | |
}, | |
}, | |
{ | |
$group: { |
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\Jobs; | |
use App\Events\CommentEvent; | |
use App\Models\Api; | |
use App\Models\Comment; | |
use App\Models\Contact; | |
use App\Models\Conversation; | |
use App\Models\Post; |
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
// /utils/redisQueue.js | |
const redis = require('redis'); | |
const { v4: uuidv4 } = require('uuid'); | |
const phpSerialize = require('php-serialize'); | |
const pushToQueue = async (webhook) => { | |
const redisClient = redis.createClient({ | |
host: process.env.REDIS_HOST || 'localhost', | |
port: process.env.REDIS_PORT || 6379, |
OlderNewer