Skip to content

Instantly share code, notes, and snippets.

View meridius's full-sized avatar

Martin Lukeš meridius

View GitHub Profile
@meridius
meridius / composer.sh
Created March 4, 2019 06:31
Composer and PHP in Docker
#!/bin/bash
# Composer in Docker
composer_in_docker () {
tty=
tty -s && tty=--tty
docker run \
$tty \
--interactive \
@meridius
meridius / .phan\config.php
Created October 19, 2018 11:21
Phan configuration file
<?php declare(strict_types = 1);
use Phan\Issue;
return [
'directory_list' => [
'src',
'vendor',
],
@meridius
meridius / phan.image\Dockerfile
Created October 19, 2018 11:14
Dockerfiles for Phan
FROM my.registry/php72-cli:1
COPY ./docker/store/fs/home/app/.ssh/id_rsa.pub ${USER_DIR}/.ssh/authorized_keys
COPY ./docker/phan/fs /
USER root
# PKG php7-ast=0.1.7-r0 depends on php7=7.2.11-r0
RUN apk --no-cache add \
php7-ast=0.1.7-r0 \
@meridius
meridius / .bashrc
Created April 27, 2017 15:27
Docker PHP@Alpine not working couchbase PHP extension
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
PS1='\n\[\e[1;35m\]\u\[\e[1;34m\]@\[\e[1;32m\]\h \[\e[1;31m\]\w\[\e[1;32m\]\$\[\e[0m\] '
# Maintainer: Frederik Schwan <frederik dot schwan at linux dot com>
# Contributor: Vlad M. <vlad@archlinux.net>
# Contributor: Attila Bukor <r1pp3rj4ck[at]w4it[dot]eu>
# Contributor: D. Can Celasun <dcelasun[at]gmail[dot]com>
# Contributor: Slava Volkov <sv99sv[at]gmail[dot]com>
pkgname=phpstorm
_pkgname=PhpStorm
pkgver=2016.3
_pkgver=163.7743.50
@meridius
meridius / .bashrc
Last active August 18, 2016 11:07
my .bashrc at work
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# system
alias ls='ls --color=auto'
alias grep='grep --color=auto'
@meridius
meridius / .screenrc
Last active July 10, 2018 16:03 — forked from joaopizani/.screenrc
A killer GNU Screen Config
# the following two lines give a two-line status, with the current window highlighted
hardstatus alwayslastline
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%Y-%m-%d %{W}%c%{g}]'
# huge scrollback buffer
defscrollback 5000
# no welcome message
@meridius
meridius / my-php.ini
Created January 17, 2016 23:19
when running Debug on Nette/Tester test file in Netbeans and clicking to it or stopping the debugging. The Continue button is not doing anything.
[Zend]
zend_extension=xdebug.so
xdebug.remote_mode=req
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_log=/home/meridius/Projekty/movies/source/domains/test.movies.czlukes.cz/tests/xdebug.log
@meridius
meridius / gist:637b2d15ea948c08a4af
Last active August 29, 2015 14:26
PostgreSQL goodies
keywords (SELECT, FROM, ...) are case insensitive
SELECT DISTINCT ON (col1) col1, col2 FROM t1 ORDER BY col1, col2;
sort first, then group and take only the first row from each group at last
order of columns have to match for both DISTINCT and ORDER constructs
LIKE = case sensitive
ILIKE = case insensitive
aliases