Skip to content

Instantly share code, notes, and snippets.

Avatar

Emir Karşıyakalı emir

View GitHub Profile
View phishing.html
<div id="fakeurlbar" style="display: none; position: fixed; top: 0px; left: 0; height: 74.77037037037037px; width: 100vw; background-image: url('{% link assets/2019-04-27/bar_background.png %}'); background-size: 19px 74.77037037037037px;">
<img src="{% link assets/2019-04-27/bar_left.png %}" style="float: left; width: 211.72222222222223px;"/>
<img src="{% link assets/2019-04-27/bar_right.png %}" style="float: right; width: 124.74444444444444px;"/>
</div>
<script>
let scrollJailEl = null;
const initialHeight = window.innerHeight;
const fakeUrlBarEl = document.getElementById("fakeurlbar");
const fakeTopHeight = 1000;
@emir
emir / Detaylar.txt
Created Mar 23, 2019
CS:GO Turnuvası: DEV:GO
View Detaylar.txt
Yazılım şirketleri arasında CS:GO Turnuvası düzenliyoruz.
Turnuvaya Son Katılım Tarihi: 3 Nisan 2019.
Eşleşmeler 1 Nisan 2019'da yapılacaktır.
İlk maçlar 6 Nisan 2019'da yapılacaktır.
Maçlar Cumartesi günü saat 21:00'da başlayacak ve 3 oyun sonunda galibi bir üstteki tura taşıyacaktır. 2-0 olan maçlarda 3. oyun oynanmayacaktır.
Takımlar (5 AS, 1 yedek oyuncudan oluşmalıdır)
View LogRequestResponse.php
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\JsonResponse;
use Illuminate\Support\Facades\Log;
class LogRequestResponse
{
View api.php
<?php
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
View LocalLogger.php
<?php
namespace App\Loggers;
use Monolog\Formatter\LineFormatter;
class LocalLogger
{
public function __invoke($logger)
{
View logging.php
<?php
use Monolog\Handler\StreamHandler;
return [
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
@emir
emir / php-cs-fixer.txt
Created Jun 7, 2018
PHP Coding Standards Fixer
View php-cs-fixer.txt
The PHP Coding Standards Fixer (PHP CS Fixer) tool fixes your code to follow standards; whether you want to follow PHP coding standards as defined in the PSR-1, PSR-2, etc., or other community driven ones like the Symfony one
https://cs.sensiolabs.org/
1.0 wget https://cs.sensiolabs.org/download/php-cs-fixer-v2.phar -O php-cs-fixer
1.1 sudo chmod a+x php-cs-fixer
1.2 sudo mv php-cs-fixer /usr/local/bin/php-cs-fixer
veya Composer ile global kurabilirsin:
View AuthController.php
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use App\Entity\User;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
View routes.yml
register:
path: /register
controller: App\Controller\AuthController::register
methods: POST
api:
path: /api
controller: App\Controller\AuthController::api
login_check:
View security.yml
security:
encoders:
App\Entity\User:
algorithm: bcrypt
providers:
entity_provider:
entity:
class: App\Entity\User
property: username