Check this out on Dev.to
- How to handle SSH keys with ec2-github actions https://zellwk.com/blog/github-actions-deploy/
- SSH_PRIVATE_KEY
- HOST_NAME / IP_ADDRESS
Check this out on Dev.to
Node Version Manager (https://github.com/nvm-sh/nvm) works perfectly across native node installations as well as emulated Rosetta installations. The trick I am using here is to install one LTS version of node under Rosetta and another stable version as native binary.
<x-layout> | |
<x-section> | |
<x-tabs active="First"> | |
<x-tab name="First"> | |
First content goes here. | |
</x-tab> | |
<x-tab name="Second"> | |
Second content goes here. | |
</x-tab> |
let arr1 = [3, 5, 2, 2, 5, 5]; | |
let arr2 = [2, 1, 66, 5]; | |
let unique = [...new Set([...arr1,...arr2])]; | |
console.log(unique); | |
// [ 3, 5, 2, 1, 66 ] |
#### | |
# | |
# Note this file should be place in: | |
# cd /etc/nginx/custom-sites/ | |
# Then be sure to restart nginx: | |
# $ sudo service nginx restart | |
location ~ ^/wp-content/uploads/(.*) { | |
if (!-f $request_filename) { | |
rewrite ^/wp-content/uploads/(.*)$ https://SOME-OTHER-URL-HERE.com/$1 redirect; | |
} |
var uniqueArray = function(arrArg) { | |
return arrArg.filter(function(elem, pos,arr) { | |
return arr.indexOf(elem) == pos; | |
}); | |
}; | |
var uniqEs6 = (arrArg) => { | |
return arrArg.filter((elem, pos, arr) => { | |
return arr.indexOf(elem) == pos; | |
}); |
<?php | |
/** | |
* Edit a Word 2007 and newer .docx file. | |
* Utilizes the zip extension http://php.net/manual/en/book.zip.php | |
* to access the document.xml file that holds the markup language for | |
* contents and formatting of a Word document. | |
* | |
* In this example we're replacing some token strings. Using | |
* the Office Open XML standard ( https://en.wikipedia.org/wiki/Office_Open_XML ) | |
* you can add, modify, or remove content or structure of the document. |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
<?php | |
/** | |
* Function that will automatically update ACF field groups via JSON file update. | |
* | |
* @link http://www.advancedcustomfields.com/resources/synchronized-json/ | |
*/ | |
function jp_sync_acf_fields() { | |
// vars |