Skip to content

Instantly share code, notes, and snippets.

View mickambar19's full-sized avatar
🎱
Creating new impact

Alexis Jimenez mickambar19

🎱
Creating new impact
  • MX
  • 08:36 (UTC -06:00)
View GitHub Profile
# Get lines of a file where a term is not found
# TERMS_FILE_NAME - The terms to search
# TARGET_FILE_NAME - File to exract the lines without a term matching
#
# `-v`: Inverse search, display lines that do not match the pattern.
# `-o`: Display only the matched patterns.
# `-w`: Match whole words only.
# `-n`: Display the line number of each match.
# `-f`: Read patterns from a file.
@mickambar19
mickambar19 / FormContext.js
Last active March 25, 2019 20:17
Example for react context
import React, { Component, Fragment } from 'react'
import PropTypes from 'prop-types'
const FormContext = React.createContext()
const Step1 = () => {
return (
<div>
General Step:
<FormContext.Consumer>
@mickambar19
mickambar19 / jsconfig.json
Created March 23, 2018 22:26
Navigate to definition using intellisense path and babel module resolver
{
// This file is required for VSCode to understand webpack aliases
"compilerOptions": {
// This must be specified if "paths" is set
"baseUrl": ".",
"paths": {
"*": [
"*",
"globalComponents",
"styles",
@mickambar19
mickambar19 / jsconfig.json
Created March 23, 2018 22:26
Navigate to definition using intellisense path and babel module resolver
{
// This file is required for VSCode to understand webpack aliases
"compilerOptions": {
// This must be specified if "paths" is set
"baseUrl": ".",
"paths": {
"*": [
"*",
"globalComponents",
"styles",
@mickambar19
mickambar19 / .prettierrc.json
Created March 23, 2018 22:10
Prettier config to be standard js for vscode
{
"arrowParens": "avoid",
"bracketSpacing": true,
"eslintIntegration": false,
"jsxBracketSameLine": false,
"printWidth": 80,
"requireConfig": false,
"stylelintIntegration": false,
"useTabs": false,
"tabWidth": 2,
@mickambar19
mickambar19 / .eslintrc.json
Created March 23, 2018 21:50
Posible eslint with prettier
{
"parser": "babel-eslint",
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["eslint:recommended", "plugin:react/recommended", "prettier"],
"parserOptions": {
"ecmaFeatures": {
@mickambar19
mickambar19 / docker-compose-laravel.yml
Created November 20, 2017 18:02
You can use this file on any laravel project, just make sure to add the docker file with the correct name
version: '3.3'
services:
db:
image: postgres:9.4
restart: always
ports:
- 5432:5432
volumes:
- ./db-data:/var/lib/postgresql/data
@mickambar19
mickambar19 / Dockerfile-php-apache-composer-postgres
Last active November 20, 2017 18:03
Create an Image with apache php7 and enabling pgsql in Docker file
FROM php:7.0-apache
RUN echo "deb http://ftp.de.debian.org/debian stretch main" >> /etc/apt/sources.list
RUN apt-get update \
&& apt-get install -y \
curl \
libpq-dev \
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
&& docker-php-ext-install pdo pdo_pgsql pgsql
ENV COMPOSER_ALLOW_SUPERUSER 1