lower(http.user_agent) contains "semrushbot" or lower(http.user_agent) contains "ahrefsbot" or lower(http.user_agent) contains "dotbot" or lower(http.user_agent) contains "whatcms" or lower(http.user_agent) contains "rogerbot" or lower(http.user_agent) contains "blexbot" or lower(http.user_agent) contains "linkfluence" or lower(http.user_agent) contains "mj12bot" or lower(http.user_agent) contains "aspiegelbot" or lower(http.user_agent) contains "domainstatsbot"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace App\Console\Commands; | |
| use Illuminate\Console\Command; | |
| use Illuminate\Support\Facades\DB; | |
| use Illuminate\Support\Facades\Schema; | |
| use Illuminate\Support\Facades\File; | |
| /* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: Static Templates | |
| * | |
| * If most of your site content is in .php template files, and you're tired of | |
| * creating new pages, assigning them page templates, creating page templates | |
| * then doing it all over again on production, this plugin is for you. | |
| * | |
| * Examples: | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ($(window).width() > 992) { | |
| $(".navbar .dropdown-toggle").removeAttr("data-toggle"); | |
| } else { | |
| $(".navbar .dropdown-toggle").attr("data-toggle", "dropdown"); | |
| } |
All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.
The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.
Most sections are broken up into two parts:
- Overview of all rules with a quick example
- Each rule called out with examples of do's and don'ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/ruby | |
| urls = [ | |
| 'http://path.to/image/url', | |
| 'http://path.to/image/url' | |
| ] | |
| require 'open-uri' | |
| def download_image(url, dest) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| "always_prompt_for_file_reload": true, | |
| "auto_complete_commit_on_tab": true, | |
| "auto_complete_selector": "source, text", | |
| "auto_complete_triggers": | |
| [ | |
| { | |
| "characters": "<", | |
| "selector": "text.html" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="preloader"> | |
| <div class="preloader-wrapper"> | |
| <span></span> | |
| <span></span> | |
| <span></span> | |
| </div> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Removes unused default Wordpress widgets. | |
| */ | |
| function unregister_default_widgets() { | |
| unregister_widget( 'WP_Nav_Menu_Widget' ); | |
| unregister_widget( 'WP_Widget_Archives' ); | |
| unregister_widget( 'WP_Widget_Calendar' ); | |
| unregister_widget( 'WP_Widget_Categories' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Kullanıcıyı www-data grubuna tanımlamak. | |
| sudo usermod -a -G www-data $USER | |
| # Dizin sahipliğini değiştirmek | |
| sudo chown -R root:www-data /var/www | |
| # Yazma izni vermek | |
| sudo chmod -R g+w /var/www/ | |
| # Dizinlerin kullanıcı ve gruplarını görüntülemek |
NewerOlder