This file contains 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 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 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/
- Git Flow: https://datasift.github.io/gitflow/IntroducingGitFlow.html
- Learn Git branching http://learngitbranching.js.org/
- Great git commit messages https://chris.beams.io/posts/git-commit/
This file contains 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)); | |
} | |
}; |
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: |
This file contains 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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
- Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any
*nix
based command prompt (but not the default Windows Command Prompt!) - Type
cd ~/.ssh
. This will take you to the root directory for Git (LikelyC:\Users\[YOUR-USER-NAME]\.ssh\
on Windows) - Within the
.ssh
folder, there should be these two files:id_rsa
andid_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Typels
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be namedid_rsa
andid_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default. - To create the SSH keys, type
ssh-keygen -t rsa -C "your_email@example.com"
. Th
NewerOlder