Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Gentrit Abazi gentritabazi01

🎯
Focusing
View GitHub Profile
View Handler.php
<?php
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class Handler extends ExceptionHandler
{
@gentritabazi01
gentritabazi01 / DB.php
Created Feb 26, 2021
PHP MySQL Connect to database.
View DB.php
<?php
$dbHost = '127.0.0.1';
$dbPort = '3308';
$dbName = 'name';
$dbUser = 'user';
$dbPassword = 'password';
try {
new pdo(
View vue-format-date-mixin.js
import moment from 'moment';
export default {
methods: {
formatDate: function (date, dateFormat) {
return moment(date).format(dateFormat);
}
}
}
View google-login.html
<html lang="en">
<head>
<meta name="google-signin-scope" content="profile email">
<meta name="google-signin-client_id" content="{client_id}">
<script src="https://apis.google.com/js/platform.js" async defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script>
</head>
<body>
<div class="g-signin2" data-onsuccess="onSignIn" data-theme="dark"></div>
@gentritabazi01
gentritabazi01 / Logger.php
Created Jan 12, 2021
Logger Middleware Laravel
View Logger.php
<?php
namespace Infrastructure\Http\Middlewares;
use Closure;
use DB;
use Illuminate\Http\Request;
use Log;
class Logger
View autoexec.cfg
// Autoexec file
// Download file
// Copy file to {SteamPath}\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg
// Open CSGO and run in console: exec autoexec
// General
sensitivity "2.0"
// Rates
View delete-comments.php
<?php
function deleteCommentsFromFolder($dir)
{
$di = new RecursiveDirectoryIterator($dir, RecursiveDirectoryIterator::SKIP_DOTS);
$it = new RecursiveIteratorIterator($di);
$fileArr = [];
foreach ($it as $file) {
if (pathinfo($file, PATHINFO_EXTENSION) == 'php') {
View SSH Laravel Deploy
name: SSH Laravel Deploy
on:
push:
branches: [ master ]
jobs:
build:
name: Build
runs-on: ubuntu-latest
View SwaggerProtect.php
<?php
namespace Infrastructure\Http\Middlewares;
use Closure;
class SwaggerProtect
{
/**
* Handle an incoming request.
View Create a symbolic link in php