This file contains 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
// Define the interface for different logging strategies | |
class LoggerStrategy { | |
log(message) {} | |
} | |
class ConsoleLogger extends LoggerStrategy { | |
log(message) { | |
// Code logic to log message | |
} | |
} |
This file contains 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\Exceptions; | |
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |
use Throwable; | |
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; | |
class Handler extends ExceptionHandler | |
{ |
This file contains 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 | |
$dbHost = '127.0.0.1'; | |
$dbPort = '3308'; | |
$dbName = 'name'; | |
$dbUser = 'user'; | |
$dbPassword = 'password'; | |
try { | |
new pdo( |
This file contains 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
import moment from 'moment'; | |
export default { | |
methods: { | |
formatDate: function (date, dateFormat) { | |
return moment(date).format(dateFormat); | |
} | |
} | |
} |
This file contains 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
<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> |
This file contains 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 Infrastructure\Http\Middlewares; | |
use Closure; | |
use DB; | |
use Illuminate\Http\Request; | |
use Log; | |
class Logger |
This file contains 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
// 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 |
This file contains 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 | |
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') { |
This file contains 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
name: SSH Laravel Deploy | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest |
This file contains 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 Infrastructure\Http\Middlewares; | |
use Closure; | |
class SwaggerProtect | |
{ | |
/** | |
* Handle an incoming request. |
NewerOlder