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 | |
if [ "$1" = "recent" ]; then | |
ADDITONAL_OPTIONS="-mmin -240" | |
else | |
ADDITONAL_OPTIONS="" | |
fi | |
find . $ADDITONAL_OPTIONS -name "*.php" -print0 | xargs -0 -n1 -P10 php -l | grep -v 'No syntax errors' |
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
<script> | |
/* track the sale in GTM */ | |
$(document).on(`page:load page:change`, function() { | |
try { | |
if (Shopify.checkout && Shopify.Checkout.page == 'thank_you') { | |
dataLayer.push({ | |
'event': 'eec.purchase', | |
'ecommerce': { | |
'currencyCode': Shopify.checkout.currency, |
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
function to_ruby_hash($array){ | |
$result = "{"; | |
foreach($array as $key => $value){ | |
$result .= "\"".$key."\" => "; | |
if(is_array($value) || is_object($value)){ | |
$result .= to_ruby_hash($value).",\n"; | |
}else{ | |
$result .= "\"".$value."\","; | |
} | |
} |
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
{"data":[{"title":"Sandwichs \u00e0 la salade de poulet revisit\u00e9s (UNCHANGEMENT)","etapes_preparation":"<p><b>Salade de poulet et c\u00e9leri<\/b><\/p><p><ol><li><span style=\"background-color: var(--white);\">Dans un bol, m\u00e9langer tous les ingr\u00e9dients. Saler et poivrer.<\/span><\/li><\/ol><\/p><p><b>Sandwichs<\/b><\/p><p><\/p><ol><li>Garnir la base du pain de salade de poulet. Y r\u00e9partir les \u00e9pinards, les feuilles de c\u00e9leri et arroser d\u2019huile. Refermer avec le pain. Piquer de quatre cure-dents et couper en quatre tron\u00e7ons.<\/li><\/ol><p><\/p>","image_recette":{"id":1,"storage":"local","filename":"500x675_5579.jpg","title":"500x675 5579","type":"image\/jpeg","uploaded_by":1,"uploaded_on":"2019-05-15T14:32:37+00:00","charset":"binary","filesize":36486,"width":500,"height":675,"duration":null,"embed":null,"folder":null,"description":"","location":"","tags":[],"checksum":"75b88973d3b6e6e96fcf212842e4d420","metadata":null,"data":{"full_url":"http:\/\/mcc-freego-api.onminion |
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
function mcc() { | |
if (Math.random() > 0.5) { | |
console.log("Wow je suis chanceux"); | |
} else { | |
console.log("Une autre fois?"); | |
} | |
} | |
mcc(); |
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/bash | |
ufw allow 2376/tcp | |
ufw allow 2377/tcp | |
ufw allow 7946 | |
ufw allow 4789/udp |
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/bash | |
TARGET_PREFIX=${1:-release} | |
TARGET_BASE=$TARGET_PREFIX-`date +%Y%m%d` | |
TARGET_REVISION=$((`git ls-remote --heads origin | awk "/$TARGET_BASE-(.*)/ { print $1 }" | awk -F'-' '{print $3}' | sort -nr | head -n 1` + 1)) | |
TARGET_BRANCH=$TARGET_BASE-$TARGET_REVISION | |
git checkout -b $TARGET_BRANCH | |
git push origin $TARGET_BRANCH | |
echo "tagging complete under branch $TARGET_BRANCH" | |
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
return 503; | |
error_page 503 @maintenance; | |
location @maintenance { | |
rewrite ^(.*)$ /index.html break; | |
proxy_pass http://roberttalbott-maintenance.s3-us-west-1.amazonaws.com; | |
proxy_set_header Host roberttalbott-maintenance.s3-us-west-1.amazonaws.com; | |
} |