Skip to content

Instantly share code, notes, and snippets.

View thiagobraga's full-sized avatar

Thiago Braga thiagobraga

View GitHub Profile
@thiagobraga
thiagobraga / pt-sans.css
Created March 28, 2018 05:39
PT Sans Google Font snippet
@font-face {
font-family: 'PT Sans';
font-style: normal;
font-weight: 400;
src: local('PT Sans'), local('PTSans-Regular'), url(https://fonts.gstatic.com/s/ptsans/v9/JX7MlXqjSJNjQvI4heMMGvY6323mHUZFJMgTvxaG2iE.woff2) format('woff2');
unicode-range: U+0460-052F, U+20B4, U+2DE0-2DFF, U+A640-A69F;
}
/* cyrillic */
@font-face {
@thiagobraga
thiagobraga / .eslintrc.json
Created September 17, 2018 18:13
ESLint rules for ECMAScript 2015
{
"env": {
"browser": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2015
},
"rules": {
@thiagobraga
thiagobraga / launch.json
Created September 17, 2018 18:24
VS Code debug configurations for PHP and JavaScript
{
"version": "0.2.0",
"configurations": [
{
"name": "PHP Debug",
"type": "php",
"request": "launch",
"port": 9000
},
{
@thiagobraga
thiagobraga / .editorconfig
Created September 19, 2018 15:08
EditorConfig rules
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
https://help.github.com/articles/removing-sensitive-data-from-a-repository/
@thiagobraga
thiagobraga / _laravel-maintenance-mode.md
Last active October 11, 2018 18:20
Laravel | Colocar sites em pré-lançamento ou em manutenção (em desenvolvimento...)

Laravel | Customizando modo de manutenção

Neste artigo, mostramos como colocar um site em manutenção, ou ainda, utilizar o mesmo recurso para um pré-lançamento de um site.

  1. Navegue até a pasta do projeto e coloque-o em maintenance mode:
php artisan down
@thiagobraga
thiagobraga / _deploy-com-post-receive.md
Last active November 6, 2018 17:02
Deploy com post-receive

Deploy com post-receive

No artigo a seguir, vou adotar a seguinte estrutura de pastas:

  • TODO: Utilizar tree para gerar estrutura de pastas.

Criando repositório bare

  • Executar o script git-init-bare.sh
  • Copiar o conteúdo de post-receive.sh para /var/www/html/project/.git/hooks/post-receive
@thiagobraga
thiagobraga / _laravel-with-docker.md
Last active November 20, 2018 13:19
Laravel | Creating projects with Docker

Laravel | Creating projects with Docker

A minimal setup for creating Laravel projects with Docker. The containers use Alpine Linux as base image.

Technologies used

  • Nginx 1.15
  • PHP-FPM 7.2
  • Composer 1.7.2
  • Node 8.12
@thiagobraga
thiagobraga / Makefile
Last active May 17, 2019 17:03
Makefile for compiling and watching sass files
PWD := $(shell pwd)
PATH := ${PWD}/node_modules/.bin:$(PATH)
.SILENT: build clean install release watch
all: install build watch
clean:
rm -rf dist/debug node_modules
install:
if [ ! -d node_modules ]; then npm ci; fi
@thiagobraga
thiagobraga / one-dark-colors.css
Last active May 24, 2019 17:52
One Dark Colors
:root {
--background: #31343f;
--black: #1e2127;
--light-black: #5c6370;
--dark-white: #7f848e;
--white: #abb2bf;
--light-white: #ffffff;
--red: #e06c75;
--light-red: #e06c75;
--green: #98c379;