This file contains hidden or 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 | |
namespace App\Providers; | |
use App\Helpers\SentrySanitizeDataOnBeforeSendListener; | |
use Illuminate\Contracts\Config\Repository as ConfigRepository; | |
use Illuminate\Contracts\Foundation\CachesConfiguration; | |
use Sentry\Event as SentryEvent; | |
use Sentry\EventHint as SentryEventHint; | |
use Sentry\Laravel\ServiceProvider as SentryServiceProvider; |
This file contains hidden or 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 | |
declare(strict_types=1); | |
namespace App\Console\Commands\Apple; | |
use App\Console\Command; | |
use App\Helpers\Jwt; | |
use Carbon\Carbon; | |
use GuzzleHttp\ClientInterface as GuzzleClient; |
This file contains hidden or 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
FROM php:7.1 | |
RUN apt-get -y update && \ | |
apt-get install -y zip libzip-dev && docker-php-ext-install zip && \ | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | |
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \ | |
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \ | |
php -r "unlink('composer-setup.php');" && \ | |
pecl install xdebug-2.9.7 && docker-php-ext-enable xdebug | |
This file contains hidden or 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
FROM php:5.4 | |
RUN apt-get update && apt-get upgrade -y | |
RUN apt-get install -y zlib1g-dev libzip-dev unzip && \ | |
curl --insecure "https://getcomposer.org/download/latest-2.2.x/composer.phar" > "/usr/local/bin/composer" && \ | |
chmod a+x "/usr/local/bin/composer" && \ | |
cd /opt && \ | |
curl --insecure -O https://xdebug.org/files/xdebug-2.4.1.tgz && \ | |
tar -xvf xdebug-2.4.1.tgz && \ | |
cd xdebug-2.4.1 && \ | |
phpize && \ |
This file contains hidden or 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
#!/usr/bin/env sh | |
filename="${1:--}" | |
if [ "$filename" = "-" ]; then | |
filename="/dev/stdin" | |
fi | |
grep_options=( -Po ) | |
if [[ "$OSTYPE" == "darwin"* ]]; then |
This file contains hidden or 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
# | |
# docker build --target php-fpm_exporter -t php-fpm_exporter . | |
# | |
FROM golang:alpine AS builder | |
RUN apk add --update git | |
WORKDIR /php-fpm_exporter | |
RUN true && \ | |
git config --global user.email "[email protected]" && \ | |
git clone 'https://github.com/hipages/php-fpm_exporter.git' . && \ | |
git remote add stanxing https://github.com/stanxing/php-fpm_exporter.git && \ |
This file contains hidden or 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
package log | |
import ( | |
"context" | |
"github.com/sirupsen/logrus" | |
"time" | |
) | |
type Fields logrus.Fields |
This file contains hidden or 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
#!/usr/bin/env bash | |
PROJECT_CODE_NAME=${PROJECT_CODE_NAME:?} | |
PG_VERSION_FROM=${PG_VERSION_FROM:?} | |
PG_VERSION_TO=${PG_VERSION_TO:?} | |
ILLUMINATE_PROJECT_USERNAME="${ILLUMINATE_PROJECT_USERNAME:-$PROJECT_CODE_NAME}" | |
PGHOST=${PGHOST:-127.0.0.1} |
This file contains hidden or 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
NPROC=$(getconf _NPROCESSORS_ONLN) | |
mkdir -p /usr/src/php/ext | |
cd /usr/src/php/ext | |
pecl bundle redis | |
docker-php-ext-configure redis --enable-redis-igbinary --enable-redis-lzf | |
docker-php-ext-install -j${NPROC} redis | |
cd - |
This file contains hidden or 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
class GoogleMapsQueryArgsDeserializer | |
{ | |
public static function deserialize(string $input): array | |
{ | |
$params = explode('!', trim($input, '!')); | |
foreach ($params as $i => $param) { | |
$params[$i] = urldecode($param); | |
} |
NewerOlder