Skip to content

Instantly share code, notes, and snippets.

🚀
// TODO: be life good

William C�rrea wilcorrea

🚀
// TODO: be life good
Block or report user

Report or block wilcorrea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wilcorrea
wilcorrea / ProductTable.vue
Last active Mar 25, 2020 — forked from phpricardo/ProductTable.vue
Fazer funcionar filtro conforme valor do combobox
View ProductTable.vue
<template>
<va-card :title="$t('menu.products')">
<div class="row">
<div class="flex xs12 md4">
<va-input
:value="term"
:placeholder="$t('tables.searchByProduct')"
@input="search"
removable
>
View https.yml
image: docker:git
before_script:
- git config --global user.email "ci@my-compnany.com"
- git config --global user.name "My Company"
stages:
# - test
- development
- stage
@wilcorrea
wilcorrea / install-docker.md
Created Mar 1, 2020 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command
View install-docker.md
View permissions.js
import $store from '../store'
const remove = (vnode) => vnode.elm.parentElement.removeChild(vnode.elm)
export default {
install (Vue) {
Vue.directive('permission', {
inserted (el, binding, vnode) {
if (binding.arg !== 'can') {
return
View BlaBlaBla.php
<?php
class BlaBlaBla extends Migration
{
// ... up, down whatever
protected function existsForeignKey($table, $foreignKey)
{
$sql = "SELECT KEY_COLUMN_USAGE.CONSTRAINT_NAME
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
WHERE KEY_COLUMN_USAGE.TABLE_NAME = '{$table}' AND KEY_COLUMN_USAGE.COLUMN_NAME = '{$foreignKey}'";
@wilcorrea
wilcorrea / AbstractController.php
Created Jan 28, 2020
Slim 4 Action Composition
View AbstractController.php
<?php
declare(strict_types=1);
namespace App\Application\Http;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Log\LoggerInterface;
use Slim\Exception\HttpBadRequestException;
View xpto.php
<?php
class Xpto
{
public function addPoints($amount)
{
return $this->processPoints($amount, function ($amount, $currentPointsAvailable, $conversionRate) {
return $currentPointsAvailable + ($amount * $conversionRate)
});
}
View .bashrc
export XDEBUG_REMOTE_HOST=$(ifconfig wlp6s0 | grep -oE 'inet [[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' | cut -c6-)
View makefile
#!/usr/bin/make
include .env
export
.PHONY: help
.DEFAULT_GOAL := help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
View docker-compose.sh
#!/bin/bash
if [[ ! -d /var/www/app/node_modules ]]; then
echo "~> installing dependencies"
yarn install
fi
if [[ ! -f /home/node/bin/node && -f /usr/local/bin/node ]]; then
echo "~> expose bin"
cp /usr/local/bin/node /home/node/bin/node
You can’t perform that action at this time.