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 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 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 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 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 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 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 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 |
This file contains 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
$ cd ~/Sites/wordpress/ to get you in your working folder | |
$ wp core download - Downloads the latest wp to that folder | |
$ wp core config --dbname="wp-experiment" --dbuser="whatevs" --dbpass="shhh" --dbhost="127.0.0.1" --skip-check - creates your wp-config.php file for you. | |
$ wp db create - creates the db for you using the deets you entered into your wp-config.php file. | |
$ wp core install --url=example.com --title=Example --admin_user=supervisor --admin_password=strongpassword [email protected] - does the wp install in seconds. | |
You now have a running wordpress site! The cooler thing about the wp cli is that your average maintenance becomes a lot quicker. | |
$ wp core update - updates your wordpress installation | |
$ wp plugin update - updates all your plugins | |
$ wp plugin install bbpress --activate - install & activate a plugin |
NewerOlder