Skip to content

Instantly share code, notes, and snippets.

@arubacao
arubacao / gohugo.Dockerfile
Created May 12, 2019 20:15
Install and verfiy Hugo in Docker
#**************** HUGO *********************************************
ENV HUGO_VERSION="0.55.5"
RUN set -ex \
&& curl -fsSLO --compressed "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz" \
&& curl -fsSLO --compressed "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_checksums.txt" \
&& grep " hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz\$" hugo_extended_${HUGO_VERSION}_checksums.txt | sha256sum -c - \
&& tar -xzf hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz -C /usr/local/bin/ \
&& rm hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz \
&& rm hugo_extended_${HUGO_VERSION}_checksums.txt \
@arubacao
arubacao / Dockerfile
Created October 30, 2016 15:05
trying to get php curl updated
FROM php:7.0-fpm
MAINTAINER Christopher Lass <arubacao@gmail.com>
# Software's Installation
#--------------------------------------------------------------------------
#
# Installing tools and PHP extentions using "apt", "docker-php", "pecl",
#
@arubacao
arubacao / latlong.php
Last active February 10, 2024 00:55
Latitude Longitude Regular Expression Validation PHP
<?php
/**
* Validates a given latitude $lat
*
* @param float|int|string $lat Latitude
* @return bool `true` if $lat is valid, `false` if not
*/
function validateLatitude($lat) {
return preg_match('/^(\+|-)?(?:90(?:(?:\.0{1,6})?)|(?:[0-9]|[1-8][0-9])(?:(?:\.[0-9]{1,6})?))$/', $lat);