title | category |
---|---|
Git config |
Git |
Ne pas oublier : l'aide en ligne de commande.
####################################################### | |
### nginx.conf site wp vhost include start | |
####################################################### | |
### | |
### deny crawlers without 403 response | |
### | |
if ($http_user_agent ~* (HTTrack|HTMLParser|libwww|wget) ) { | |
return 444; | |
} |
<?php | |
// Make sure WooCommerce Subscriptions is active | |
if ( class_exists( 'WC_Subscriptions_Switcher' ) ) { | |
// Get the key for the customer's current subscription | |
$subscription_key = WC_Subscriptions_Manager::get_subscription_key( $order_id, $product_id ); | |
// Check if the current subscription can be switched by the customer | |
if ( WC_Subscriptions_Manager::can_subscription_be_changed_to( 'new-subscription', $subscription_key, get_current_user_id() ) ) { |
<?php | |
/** | |
* Prevent Editing of a specified user | |
* | |
* This example shows how you can protect the original admin from being edited or deleted by anyone else | |
*/ | |
add_filter('map_meta_cap', 'prevent_user_edit', 10, 4 ); | |
function prevent_user_edit( $required_caps, $cap, $user_id, $args ){ | |
$protected_user = 1; // ID of user not editable |
Client Key: A2a9SfT4NeFBl6df5cu42 | |
API Key: mnqWGdu4OfLBwwJPee6cpjkeY70qv9mKicqZYvtHJ |
inotifywait --monitor --timefmt '%F %T' --format '%T %w%f %e' --recursive $1 |
var buttons; | |
buttons = document.getElementsByClassName('_42ft'); | |
for (var i = 0; i < buttons.length; i++) { | |
if(buttons[i].getAttribute('ajaxify') != null){ | |
if(buttons[i].getAttribute('ajaxify').indexOf('invite') != -1){ | |
buttons[i].click(); | |
} | |
} | |
} |
Please note I created that sheet as a personal side note/draft and not everything is fully tested. There could be errors or better things to do. So if you spot something wrong or something that can be improved, feel free to comment below and I will do the changes.
Image path: {{ file_url(content.field_name['#items'].entity.uri.value) }}
{# Get URL of single file field #} | |
{{ node.field_file.entity.uri.value }} | |
{# Get URL of multi file field #} | |
{{ node.field_file['#items'].entity.uri.value }} | |
{# Trun into link #} | |
{{ file_url(node.field_file.entity.uri.value) }} | |
{# Check if there is at least one value #} |
#!/bin/bash | |
SENDGRID_API_KEY="" | |
EMAIL_TO="" | |
FROM_EMAIL="" | |
FROM_NAME="" | |
SUBJECT="" | |
bodyHTML="<p>Email body goes here</p>" |