Skip to content

Instantly share code, notes, and snippets.

View levonlee's full-sized avatar
🎯
Focusing

misterlcanada levonlee

🎯
Focusing
View GitHub Profile
@jorgecc
jorgecc / php.csv
Created January 28, 2023 16:20
php inspections
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 12 columns, instead of 8. in line 4.
_language,_groupPath,_shortName,_groupKey,_enabledByDefault,_level,_implementationClass,_key,_bundle,_unfair,_cleanupTool,_editorAttributes
PHP,PHP,PhpUndefinedGotoLabelInspection,inspection.php.group.undefined,true,WARNING,com.jetbrains.php.lang.inspections.PhpUndefinedGotoLabelInspection,inspection.php.undefined.goto.label.inspection.display.name,messages.PhpBundle,,,
PHP,PHP,PhpUndefinedVariableInspection,inspection.php.group.undefined,true,ERROR,com.jetbrains.php.lang.inspections.PhpUndefinedVariableInspection,inspection.php.undefined.variable.inspection.display.name,messages.PhpBundle,,,
PHP,PHP,PhpUndefinedMethodInspection,inspection.php.group.undefined,true,WARNING,com.jetbrains.php.lang.inspections.PhpUndefinedMethodInspection,inspection.php.undefined.method.inspection.display.name,messages.PhpBundle,,,
PHP,PHP,PhpUndefinedNamespaceInspection,inspection.php.group.undefined,true,WARNING,com.jetbrains.php.lang.inspections.PhpUndefinedNamespaceInspection,inspection.php.undefined.namespace.inspection.disp
@gskema
gskema / noinspection.php
Last active July 16, 2024 22:08
PhpStorm @noinspection list of all tags
<?php
/** @noinspection ? */
// PhpUndefinedGotoLabelInspection Undefined goto label
// PhpUndefinedVariableInspection Undefined variable
// PhpUndefinedMethodInspection Undefined method
// PhpUndefinedNamespaceInspection Undefined namespace
// PhpUndefinedClassInspection Undefined class
// PhpUndefinedFunctionInspection Undefined function
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@mattclements
mattclements / function.php
Last active July 2, 2024 15:32
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@OrganicPanda
OrganicPanda / hacky-scrollbar-resize-listener.js
Last active April 7, 2024 10:53
A sham that will throw a window resize event even when scrollbars are added/removed (this is not something the standard window resize event does). Tested in IE9+, Chrome & Firefox latest.
// Demo: http://jsfiddle.net/pFaSx/
// Create an invisible iframe
var iframe = document.createElement('iframe');
iframe.id = "hacky-scrollbar-resize-listener";
iframe.style.cssText = 'height: 0; background-color: transparent; margin: 0; padding: 0; overflow: hidden; border-width: 0; position: absolute; width: 100%;';
// Register our event when the iframe loads
iframe.onload = function() {
// The trick here is that because this iframe has 100% width
@Craga89
Craga89 / ios-version.js
Created May 29, 2012 16:39
JavaScript iOS version detection
/*
* Outputs a float representing the iOS version if user is using an iOS browser i.e. iPhone, iPad
* Possible values include:
* 3 - v3.0
* 4.0 - v4.0
* 4.14 - v4.1.4
* false - Not iOS
*/
var iOS = parseFloat(