Skip to content

Instantly share code, notes, and snippets.

@Haran
Haran / gist:6e3d2d8d08b8f58e76904dc8fae22dd9
Last active June 7, 2021 11:58 — forked from discordier/gist:ed4b9cba14652e7212f5
options for phpStorm 2017.3.1 @noinspection annotation
+----------------------------------------------------------+------------------------------------------------------------------------------+
| Inspection | Description |
+----------------------------------------------------------+------------------------------------------------------------------------------+
| -- angularjs | |
| EmptyEventHandlerInspection | Empty Event Handler |
+----------------------------------------------------------+------------------------------------------------------------------------------+
| -- coffeescript | |
| CoffeeScriptUnusedLocalSymbolsInspection
@Haran
Haran / foldersize.php
Last active July 5, 2017 13:26 — forked from eusonlito/foldersize.php
PHP function to get the folder size including subfolders
<?php
/**
* Retrieve folder size including subfolders
* and including 'hidden' files and folders
*
* @param string $dir Directory path
* @return int Size of the directory in bytes
*/
function folderSize($dir)
@Haran
Haran / Syntax
Created January 13, 2017 09:56
YAML and Config Midnight Commander highlight
file ..\*\\.(properties|config|conf|cnf|cfg) Java\sFile
include properties.syntax
file ..\*\\.(ya?ml|YML)$ YAML\sFile
include yaml.syntax
@Haran
Haran / AccessBehavior.php
Last active September 13, 2016 13:45 — forked from r3verser/AccessBehavior.php
Yii2 Redirects all users to login (or any) page if not logged in, but allow access to some pages (like signup, password recovery etc.)
<?php
/*
* In configuration file
* ...
* 'as AccessBehavior' => [
* 'class' => 'app\components\AccessBehavior',
* 'allowedRoutes' => [
* '/',
* ['/user/registration/register'],