Skip to content

Instantly share code, notes, and snippets.

How to fetch fresh cloudflare ipv4 & ipv6 for real-ip

curl -s https://api.cloudflare.com/client/v4/ips | jq -r ".result | .ipv4_cidrs[], .ipv6_cidrs[]"

Sample output:

173.245.48.0/20
103.21.244.0/22
<?php
declare(strict_types=1);
use PhpCsFixer\Fixer\Strict\DeclareStrictTypesFixer;
use PhpCsFixer\Fixer\Import\NoUnusedImportsFixer;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use Symplify\EasyCodingStandard\Config\ECSConfig;
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
[*]
end_of_line = lf
insert_final_newline = true
[**.{php,tpl}]
charset = utf-8
indent_style = tab
indent_size = 4
trim_trailing_whitespace = true
@fizzka
fizzka / gist:70a5835d94e4eb091baa654d19251aac
Last active January 23, 2018 16:28
docker-php-variants
git clone --depth 1 https://github.com/docker-library/php.git php && \
VARIANTS=$(find php -name "Dockerfile" | sed 's/php\/\(.*\)\/Dockerfile/\1/') && \
rm -rf php &&
echo $VARIANTS
@fizzka
fizzka / Dockerfile
Last active January 23, 2018 16:20
как собрать расширение без _самостоятельной_ установки build_deps
FROM php:alpine
RUN pecl download xdebug-beta && \
tar xzf xdebug* && \
rm -rf xdebug*.tgz && \
docker-php-ext-install $(pwd)/xdebug* && \
rm -rf xdebug*
FROM php:5 AS build-amqp
ENV RABBITMQ_C_VERSION=0.8.0
RUN apt-get update && apt-get install -y cmake unzip libssl-dev
RUN curl -sL https://github.com/alanxz/rabbitmq-c/archive/v${RABBITMQ_C_VERSION}.zip \
-o rabbitmq-c-${RABBITMQ_C_VERSION}.zip
RUN unzip rabbitmq-c-${RABBITMQ_C_VERSION}.zip
RUN \