Skip to content

Instantly share code, notes, and snippets.

View mapsi's full-sized avatar

Angel Psiakis mapsi

View GitHub Profile
@mapsi
mapsi / zsh
Last active December 11, 2020 19:23
new Mac stuffs
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
// https://github.com/sindresorhus/quick-look-plugins
brew install qlcolorcode qlstephen qlmarkdown quicklook-json betterzip qlimagesize suspicious-package quicklookase qlvideo provisionql quicklookapk
brew tap homebrew/cask-fonts
brew install \
@mapsi
mapsi / AbstractEntity.php
Created June 17, 2020 17:50 — forked from wesrice/AbstractEntity.php
Self Validating Value Objects and Entities (Laravel Implementation)
<?php
abstract class AbstractEntity extends AbstractValueObject
{
/**
* Offset Set
*
* @param mixed $offset
* @param mixed $value
*
@mapsi
mapsi / codequality.md
Created July 19, 2019 10:32
Code quality - Codeclimate check
@mapsi
mapsi / .codeclimate.yml
Created July 19, 2019 10:31
Codeclimate PHP config for Laravel projects
---
version: "2"
plugins:
# https://docs.codeclimate.com/docs/duplication
duplication:
enabled: true
config:
languages:
# - ruby:
# - javascript:
@mapsi
mapsi / .env.gitlab
Created July 29, 2017 11:41
Laravel Dusk (PHPUNIT) Test for Gitlab-ci with docker chromdriver , headless chrome, vnc, screenshots, pipeline, artifacts
APP_ENV=testing
APP_KEY=base64:DimZ0aVNA8ZWtWxTB4fDxFc6lL1wM2C7evETA4QK3+c=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost:8081
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=secca_testing
@mapsi
mapsi / docker-compose.yml
Created July 29, 2017 03:44 — forked from wojas/docker-compose.yml
docker-compose for nginx with php5-fpm using small alpine images
version: '2'
services:
php:
image: php:5.6-fpm-alpine
volumes:
- data:/_data
- ./site:/var/www/html:ro
networks:
- backend
command: sh -c 'chown www-data /_data && exec php-fpm'
@mapsi
mapsi / gist:91f72ed08dc48c929aab
Created December 11, 2014 15:00
Find tables that have a referential constraint on a table_name
SELECT *
FROM information_schema.REFERENTIAL_CONSTRAINTS
WHERE REFERENCED_TABLE_NAME = 'table_name'
AND CONSTRAINT_SCHEMA='scheman_name';
@mapsi
mapsi / gist:44d2f5d6ccecd5943856
Created May 28, 2014 09:20
git configuration
git config --global push.default simple
git config --global branch.autosetuprebase always
git config --global pull.rebase true
@mapsi
mapsi / array2table.js
Created February 11, 2014 17:41
Convert JS array to HTML table
// build HTML table data from an array (one or two dimensional)
function generateTable(data) {
var html = '';
if (typeof (data[0]) === 'undefined') {
return null;
}
if (data[0].constructor === String) {
html += '<tr>\r\n';
@mapsi
mapsi / .bashrc
Last active February 22, 2016 06:39
My .bashrc for Mac OSX 10.9.1
## Colorize the ls output ##
alias ls='ls -G'
## Use a long listing format ##
alias ll='ls -la'
## Show hidden files ##
alias l.='ls -d .*'
## Colorize the grep command output for ease of use (good for log files)##