ln -s /usr/local/bin/php7-70LATEST-CLI ~/php
In den neuen ManagedHosting 64 Bit Umgebungen (ManagedHosting 64, ManagedServer 64 oder Reseller Dedicated 64) ist der Pfad anders, z.B. so:
ln -s /usr/bin/php74 ~/php
<?php | |
/** | |
* Registers the "One time hook" functionality. | |
* | |
* Note that this file is intentionally in the *global* namespace! | |
* | |
* @author Growella | |
* @license MIT | |
*/ |
function delay(msec, value) { | |
return new Promise(done => window.setTimeout((() => done(value)), msec)); | |
} | |
function isResolved(promise) { | |
return Promise.race([delay(0, false), promise.then(() => true, () => false)]); | |
} | |
function isRejected(promise) { | |
return Promise.race([delay(0, false), promise.then(() => false, () => true)]); |
<?php | |
add_filter( 'acf/load_field/name=flex_layout', __CLASS__ . '::craft_content_layouts' ); | |
static function craft_content_layouts( $field ) { | |
// Remove the layouts | |
// that are named in this list | |
$remove_list = [ | |
'paragraph', | |
'banner', |
define( 'WP_CACHE', true ); | |
define( 'WPCACHEHOME', $webroot_dir . '/app/plugins/wp-super-cache/'); |
Number.prototype.map = function (in_min, in_max, out_min, out_max) { | |
return (this - in_min) * (out_max - out_min) / (in_max - in_min) + out_min; | |
} |
<?php | |
// Add additional setting option called "Notes" | |
add_action('acf/render_field_group_settings', 'my_acf_add_field_group_notes'); | |
function my_acf_add_field_group_notes($field_group){ | |
acf_render_field_wrap(array( | |
'label' => __('Notes','acf'), | |
'instructions' => __('Notes','acf'), | |
'type' => 'textarea', | |
'name' => 'notes', | |
'prefix' => 'acf_field_group', |
Use the -f option to git tag: | |
-f | |
--force | |
Replace an existing tag with the given name (instead of failing) | |
You probably want to use -f in conjunction with -a to force-create an annotated tag instead of a non-annotated one. | |
Example |
.cursor { | |
cursor: url("cursor.png") 0 0, pointer; /* Legacy */ | |
cursor: url("cursor.svg") 0 0, pointer; /* FF */ | |
cursor: -webkit-image-set(url("cursor.png") 1x, url("[email protected]") 2x) 0 0, pointer; /* Webkit */ | |
} |
# ---------------------------------- | |
# Colors | |
# ---------------------------------- | |
NOCOLOR='\033[0m' | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
ORANGE='\033[0;33m' | |
BLUE='\033[0;34m' | |
PURPLE='\033[0;35m' | |
CYAN='\033[0;36m' |