Skip to content

Instantly share code, notes, and snippets.

View ktquez's full-sized avatar
:octocat:
Creating cool and open source stuff

Alan Ktquez ktquez

:octocat:
Creating cool and open source stuff
View GitHub Profile
@ktquez
ktquez / Alert.vue
Created May 5, 2016 19:41 — forked from laracasts/Alert.vue
Alert .vue example.
<template>
<div class="Alert Alert--{{ type | capitalize }}">
<slot></slot>
</div>
</template>
<script>
export default {
props: {
type: {
// rm -rf ./build && webpack --config webpack.prod.config.js -p --progress
var path = require('path');
var webpack = require('webpack');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var ROOT = __dirname;
var PROJECT_ROOT = path.join(ROOT, 'src');
var BUILD_ROOT = path.join(ROOT, 'build');
@ktquez
ktquez / home.js
Created May 27, 2016 02:16 — forked from dewey92/home.js
Vue router
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
Vue.use(require('vue-resource'))
const router = new VueRouter({
history : true,
saveScrollPosition: true
});
@ktquez
ktquez / promise.md
Created July 4, 2016 12:31 — forked from wkrueger/promise.md
Guia Promise

Guia Promises

v. 1.0.

Pode-se afirmar que no momento Promises são a forma mais "padrão" de se tratar com assincronismo no JS. Para quem trabalha com javascript, conhecê-las é essencial. Uma dificuldade comum é que esta API tem uma curva de aprendizado um tanto acentuada de início, especialmente se comparado com as alternativas mais antigas: callbacks e o módulo async. No meu caso, levei ao menos uns 3 meses pra "cair a ficha".

@ktquez
ktquez / php5.6-pgsql.Dockerfile
Created October 11, 2016 07:03 — forked from ben-albon/php5.6-pgsql.Dockerfile
Docker PHP Image with PostgreSQL Driver
FROM php:5.6-apache
RUN apt-get update && apt-get install -y libpq-dev && docker-php-ext-install pdo pdo_pgsql
COPY src/ /var/www/html
@ktquez
ktquez / Dockerfile
Created October 11, 2016 07:14 — forked from zz/php7.Dockerfile
Dockerfile for PHP7 memcache and Redis ext
FROM php:7-fpm
# Install modules
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
libmemcached-dev \
libmysqlclient-dev \
libicu-dev \
@ktquez
ktquez / Dockerfile
Created October 11, 2016 07:17 — forked from tdutrion/Dockerfile
Dockerfile PHP7-FPM with extensions (Redis, pdo_mysql, pdo_pgsql, intl, curl, json, opcache and xml) - large image
FROM php:7-fpm
RUN apt-get update && apt-get install -y git libcurl4-gnutls-dev zlib1g-dev libicu-dev g++ libxml2-dev libpq-dev \
&& git clone -b php7 https://github.com/phpredis/phpredis.git /usr/src/php/ext/redis \
&& docker-php-ext-install pdo pdo_mysql pdo_pgsql pgsql intl curl json opcache xml redis \
&& apt-get autoremove && apt-get autoclean \
&& rm -rf /var/lib/apt/lists/*
@ktquez
ktquez / React-Directory-Layout.md
Created October 13, 2016 18:25 — forked from koistya/React-Directory-Layout.md
File and folder naming convention for React.js components

File and folder naming convention for React.js components

Directory Layout #1

/actions/...
/components/common/Link.js
/components/common/...
/components/forms/TextBox.js
/components/forms/TextBox.res/style.css
@ktquez
ktquez / Alert.vue
Created November 7, 2016 17:06 — forked from martinlindhe/Alert.vue
jasmine + karma for vue test
<style>
.Alert {
padding: 2em;
}
.Alert-Success {
border: 10px solid green;
}
.Alert-Error {
border: 10px solid red;
}