π
This file contains hidden or 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
FROM php:8.1-fpm-alpine | |
# ENV & Build ARGS | |
ENV LARAVEL_DIR /var/www | |
ARG BRANCH=master | |
WORKDIR ${LARAVEL_DIR} | |
# Install Deps | |
RUN apk add --no-cache git sed nginx nodejs npm openssh-client libzip-dev libsodium-dev icu-dev mysql-client supervisor freetype-dev libjpeg-turbo-dev libpng-dev | |
RUN apk add --no-cache $PHPIZE_DEPS |
This file contains hidden or 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 | |
/** | |
* Adding the payment fragment to the WC order review AJAX response | |
*/ | |
add_filter( 'woocommerce_update_order_review_fragments', 'my_custom_payment_fragment' ); | |
/** | |
* Adding our payment gateways to the fragment #checkout_payments so that this HTML is replaced with the updated one. | |
*/ | |
function my_custom_payment_fragment( $fragments ) { |
This file contains hidden or 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
/** | |
* This class is purely immutable. | |
* PHP protects the string from changing by its copy-on-change mechanics | |
* If you do `$str = $immutable->getField();` and then change `$str` | |
* PHP will copy the value and change only second one. | |
*/ | |
class Immutable | |
{ | |
/** @var string */ | |
private $field; |
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install
Optionally, set the home dir and/or account info (if already have one).
If was previously using LetsEncrypt's certbot, can probably get account info from
/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory/*/regr.json
.
This file contains hidden or 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 | |
/** | |
* Checkout Form | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
- Semantic Versioning http://semver.org/
- Learn Git branching http://learngitbranching.js.org/
- Great git commit messages https://chris.beams.io/posts/git-commit/
This file contains hidden or 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
Math.tanh = Math.tanh || function(x) { | |
if(x === Infinity) { | |
return 1; | |
} else if(x === -Infinity) { | |
return -1; | |
} else { | |
return (Math.exp(x) - Math.exp(-x)) / (Math.exp(x) + Math.exp(-x)); | |
} | |
}; |
This file contains hidden or 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
// Date Object CheatSheet | |
// The Date object is used to work with dates and times. | |
// More: http://www.w3schools.com/jsref/jsref_obj_date.asp | |
// 1. Instantiating a Date. | |
var date = new Date(); | |
var date = new Date(milliseconds); |
People
![]() :bowtie: |
π :smile: |
π :laughing: |
---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |
NewerOlder