Skip to content

Instantly share code, notes, and snippets.

View stoneC0der's full-sized avatar

Cedric Megnie N. stoneC0der

View GitHub Profile
@stoneC0der
stoneC0der / .htaccess
Created June 24, 2022 12:04 — forked from davemackintosh/.htaccess
Working .htaccess for Single Page Apps
<ifModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) /index.html [QSA,L]
</ifModule>
@stoneC0der
stoneC0der / APACHE: .htaccess pushstate
Created June 24, 2022 12:04 — forked from rayfranco/APACHE: .htaccess pushstate
.htaccess for HTML5 Pushstate support
<ifModule mod_rewrite.c>
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.html
</ifModule>
@stoneC0der
stoneC0der / .php_cs
Last active February 19, 2021 09:26 — forked from pierophp/.php_cs
PHP CS Fixer Config File Example
<?php
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(
[
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP71Migration' => true,
'array_syntax' => ['syntax' => 'short'],
@stoneC0der
stoneC0der / workbench.colorCustomizations.json
Created March 16, 2020 06:38 — forked from jacklorusso/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
We can't make this file beautiful and searchable because it's too large.
pattern,cnt
^,1657
-$,376
--,355
root.*/file.*\n,348
(?m)^hello world,338
\s+,296
\s*,278
^[a-z],275
[cg]pu,245
@stoneC0der
stoneC0der / XSSProtection.php
Created May 13, 2019 19:48 — forked from kirkbushell/XSSProtection.php
Laravel 5 XSS protection middleware
class XSSProtection
{
/**
* The following method loops through all request input and strips out all tags from
* the request. This to ensure that users are unable to set ANY HTML within the form
* submissions, but also cleans up input.
*
* @param Request $request
* @param callable $next
* @return mixed