Skip to content

Instantly share code, notes, and snippets.

View steinkel's full-sized avatar

Jorge M. González Martín steinkel

View GitHub Profile
@steinkel
steinkel / gist:cc25ca16aa297993c444954e5937e1c9
Created October 6, 2020 08:04
cakefest2020 docker-compose.yaml file
version: '3'
services:
postgres:
image: postgres
container_name: postgres
environment:
- POSTGRES_USER=my_app
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=my_app
ports:
@steinkel
steinkel / gist:7a4860e2721872a28d7f6158e5bf3d89
Last active October 2, 2019 08:20
docker compose for cakephp and mysql
version: "3.1"
services:
mysql:
image: mysql:5.7
container_name: cakemysql
working_dir: /application
volumes:
- .:/application
- ./tmp/data/mysql_db:/var/lib/mysql
environment:
@steinkel
steinkel / gist:23da1ed14f84643d537648f957f0cfc5
Created September 30, 2019 17:46
test mysql target for cakedc dbtest
test:mysql:
services:
- mysql:5.7
script:
- mysql --version
- mysql -uroot -proot -h $MYSQL_PORT_3306_TCP_ADDR -e 'CREATE DATABASE test_myapp_template;';
- composer install --verbose --prefer-dist --optimize-autoloader --no-progress --no-interaction
- ( [ -f vendor/bin/phpunit ] && echo "phpunit already installed";) || composer require phpunit/phpunit
- DATABASE_TEST_TEMPLATE_URL="mysql://root:root@$MYSQL_PORT_3306_TCP_ADDR/test_myapp_template" bin/cake db_test -i
- DATABASE_TEST_URL="mysql://root:root@$MYSQL_PORT_3306_TCP_ADDR/app_test" DATABASE_TEST_TEMPLATE_URL="mysql://root:root@$MYSQL_PORT_3306_TCP_ADDR/test_myapp_template" QUEUE_DEFAULT_URL='null:///?queue=default&timeout=1' vendor/bin/phpunit --verbose --colors=never
@steinkel
steinkel / gist:774d1d249f085580c91150b247cd6bfc
Created January 19, 2018 09:40
create socket shell in ubuntu to feed a cakephp shell
in /etc/systemd/system/cakesocket.socket
[Unit]
Description=Cakesocket example
[Socket]
ListenStream=8088
Accept=yes
[Install]
source <(curl https://gist.githubusercontent.com/steinkel/4eb1cb0b67ddb92f5d5b04646f470cd5/raw/25ae1fb294ee2ce98c728329ce19686b7990e5ae/cloud9%2520php7%2520cakephp%2520)
@steinkel
steinkel / gist:a8c27b47ada34cb39b739444e482c43e
Created November 17, 2017 00:52
cakefest 2017 create database and import schema
mysql -uroot -e "CREATE DATABASE my_app; CREATE DATABASE test_myapp"
mysql -uroot -e "GRANT ALL PRIVILEGES ON *.* to my_app@localhost identified by 'secret'"
curl -L https://raw.githubusercontent.com/steinkel/cakefest2017/master/schema.sql |mysql -uroot my_app
@steinkel
steinkel / test
Created November 17, 2017 00:44
some test
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jan 29, 2015 at 12:12 AM
-- Server version: 5.5.40-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
vlc --no-video-deco --no-embedded-video --screen-fps=20 --screen-top=54 --screen-left=1280 --screen-width=1920 --screen-height=980 screen://
# In my case I have dual monitors, left is 1280x1024 and I want to share my right monitor, without the top and button bar provided by xfce
# Move the new window to the left monitor and leave it in the background, not minimized
# Then start sharing using a single window and point the newly created one
# Installation: add this to your .bash_aliases or .zshrc
# change the following line to point your phpcbf preferred tool
alias phpcbf3="/home/steinkel/phpcs-cake3/vendor/bin/phpcbf --standard=CakePHP"
# gitco function
# allow commit and comment with no quotes
# adds refs #id based on current feature/issue/hotfix branch
# run phpcbf on touched files
function gitco () {