Skip to content

Instantly share code, notes, and snippets.

View GraxMonzo's full-sized avatar

Bekzat Samatov GraxMonzo

View GitHub Profile
@jakebathman
jakebathman / remove_laravel_comments.php
Last active February 19, 2024 10:28
Remove comments from fresh Laravel files
<?php
/*
|--------------------------------------------------------------------------
| Remove Laravel Comments
|--------------------------------------------------------------------------
|
| Just made a new Laravel project, but don't want all those big
| comment blocks? Put this in the root of your project and run
| "php remove_laravel_comments.php"
|
@dethi
dethi / unused-files.sh
Last active April 25, 2022 05:34
create-react-app: find files not used in the app bundle, i.e. unused source code
#!/bin/bash
# Launch inside a create-react-app project after building the production build.
# Require `jq`.
diff \
<(find src -type f \( -name '*.js' -o -name '*.jsx' -o -name '*.css' \) | sort) \
<(cat build/**/*.map | jq --raw-output '.sources | join("\n")' \
| grep -v '\.\./' | grep -E '\.(js|jsx|css)$' \
| sed "s#^#src/#" | sort | uniq) \
@ellefsen
ellefsen / Procfile
Last active October 28, 2020 02:47
Heroku with Google Cloud SQL and cloud_sql_proxy with PHP / Laravel
web: (bash ./start.sh) & vendor/bin/heroku-php-nginx public/
@Shelob9
Shelob9 / NoIE.php
Last active May 4, 2022 17:04
A Laravel middleware to prevent Internet Explorer from accessing route(s)
<?php
namespace App\Http\Middleware;
use Closure;
use UserAgentParser\Exception\NoResultFoundException;
use UserAgentParser\Provider\WhichBrowser;
/**
* Class DeviceDetect