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
#!/bin/sh | |
# This script has 2 lines of fast code to resolve an issue with fortrabbit "universal" apps for PHP sites, but could be used for others. | |
# For background, see https://help.fortrabbit.com/git-deployment#toc-git-deployment-vs-universal-apps | |
# On reading that, I expected "overwrite but not delete" strategy meant files outside git would not be deleted. | |
# However it literally means a committed delete will not be deleted. | |
# In other words, if you change a file to be empty, it's nullified on push. But if you delete, nothing happens on push; could leave insecure code on your server. | |
# fortrabbit does not place the .gitignore but rsync requires it, so push it up | |
scp ~/SOURCEDIR/.gitignore [email protected]:~ |
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
/** | |
* https://shopify.dev/docs/api/ajax/reference/product | |
* https://stripe.com/docs/currencies#zero-decimal | |
*/ | |
function rebaseCurrency( | |
/** @type {number} */ price, | |
/** @type {string} */ isoCurrency, | |
/** @type {"toZeroDecimal" | "fromZeroDecimal"} */ transform | |
) { | |
const zeroDecimalCurrencies = [ |