defaults write com.apple.dock persistent-apps -array-add '{tile-type="spacer-tile";}'
killall Dock
exit
// Get all the progress indicators | |
let progress = document.querySelectorAll('#progress'); | |
// Create an array from them | |
progress = Array.from(progress) | |
// Set all the text info cards to background of red | |
progress.map(p => p.parentElement.parentElement.parentElement.parentElement.nextElementSibling.style.backgroundColor = 'red') |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" | |
} | |
check_run composer.json "composer install" | |
check_run package.json "npm i" | |
check_run "/config/project/" "php craft project-config/apply" |
{# | |
display the number 9 with 2 0's in front of it | |
%'_3s would display the number 9 with 2 _ in front | |
%'%10s with format("123") would display 123 with 7 % in fron of it | |
% 3s would show 9 and 2 spaces in front | |
%'_-3s would have 9 then 2 _ after it | |
%'x-3s would have 2 x's after | |
#} |
{# Get the destinations from an entry query #} | |
{% set originalArrayQ = craft.entries().section("helloworld") %} | |
{# Turn the query into an array of results #} | |
{% set originalArray = originalArrayQ.all() %} | |
{# Create an empty array #} | |
{% set r = [] %} | |
{# Loop through an x amount of count e.g. 0 to 3 (4 values) #} | |
{% for item in 0..3 %} | |
{# Merge into the array above a random value from the original array that isn't already in the random (r) array #} | |
{% set r = r | merge([random(originalArray | filter(v => v not in r))]) %} |
<?php | |
return array( | |
// Fix for MySQL 5.7.5+ and Craft 2.x | |
'initSQLs' => array("SET SESSION sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';") | |
); | |
?> |
In console: | |
git config credential.helper | |
You will see: osxkeychain | |
git config credential.helper sourcetree | |
Then if you perform git config credential.helper again | |
You will see: sourcetree |
# ---------------------------------------------------------------------- | |
# | Cleaning URLs | | |
# ---------------------------------------------------------------------- | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
# Remove www from URL's | |
RewriteCond %{HTTP_HOST} ^www\.(.+) | |
# RewriteCond %{HTTPS}s/%1 ^(on(s)|offs)/(.+) | |
RewriteRule ^ http%2://%3%{REQUEST_URI} [L,R=301] |
<?php | |
// Array given from 'api' | |
$arr = array( | |
"action: Added; quantity: 1; item_code: RNA1; product_name: Mens Organic T-Shirt; colour: White; size: XL;", | |
"action: Subtracted; quantity: 7; item_code: RNC1; product_name: Kids Basic T-shirt; colour: Denim Blue; size: 3-4y", | |
"action: Added; quantity: 20; item_code: RNV1; product_name: Gift Voucher; style: Mens; value: £20" | |
); | |
// New array to hold the final output | |
$newArr = array(); |
Get-AppxProvisionedPackage -online | Where-Object {$_.packagename -like '*officehub*'} | Remove-AppxProvisionedPackage -online |