Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env php
<?php
declare(strict_types=1);
use Amp\Loop;
use Cli\Sources\SourceFactory;
use Cli\Sources\SourceInterface;
use Common\Console\Application;
use Common\Helper\Logger;
#!/usr/bin/env php
<?php
declare(strict_types=1);
declare(ticks=1);
use Common\Helper\Logger;
if (PHP_SAPI !== 'cli') {
exit();
'use strict'
const gulp = require('gulp')
const babel = require('gulp-babel')
const sass = require('gulp-sass')
const uglifyCss = require('gulp-uglifycss')
const uglifyJs = require('gulp-uglify')
const concat = require('gulp-concat')
const ts = require('gulp-typescript')
const del = require('del')
server {
listen 80;
server_name 127.0.0.1;
root /var/www/public;
index index.php;
client_max_body_size 10M;
access_log /proc/self/fd/1 combined;
error_log /proc/self/fd/2 warn;
#add_header X-UA-Compatible "IE=edge";
version: "3"
volumes:
composer:
services:
php:
image: php/php:7.4
build:
context: .
dockerfile: ./php.dockerfile
volumes:
FROM php:7.4-fpm-alpine
###########################################################
#PRODUCTION ENVIRONMENT
###########################################################
ENV PHP_FPM_USER="www-data" PHP_FPM_GROUP="www-data"
#TIMEZONE
RUN apk add --no-cache --virtual .deps tzdata &&\
version: "3"
volumes:
composer:
services:
php:
image: ah/php:1.0.0
build:
context: .
dockerfile: .docker/dev/php.dockerfile
restart: always
@yaredc
yaredc / cron.dockerfile
Last active December 1, 2020 16:36
PHP8
FROM app/php:8.0
USER root
RUN rm -f /etc/crontabs/root &&\
touch /etc/crontabs/root &&\
chown -R www-data:www-data /var/www &&\
chmod -R 0774 /var/www
CMD ["sh", "-c", "/usr/bin/crontab -u www-data /var/www/crontab && /usr/sbin/crond -f -L /proc/self/fd/1"]
@yaredc
yaredc / gist:8ff73d50485405ee7bf618a02403d64b
Last active December 12, 2020 16:14
Keyboard shortcut setup.
#!/bin/sh
touch .xinitrc
touch .Xmodmap
echo "keycode 134 = Menu" > .Xmodmap
echo "xmodmap ~/.Xmodmap" > .xinitrc
#SCAN KEYBOARD INPUT IN CONSOLE
sudo showkey
#!/bin/sh
SESSION_NAME="project-session"
if ! tmux has-session -t $SESSION_NAME 2>/dev/null; then
tmux new-session -d -A -s $SESSION_NAME
tmux split-window -h
tmux send-keys "docker-compose up" C-m
tmux select-pane -t 0
tmux split-window -v