Skip to content

Instantly share code, notes, and snippets.

View medeirosinacio's full-sized avatar
🤙
Stackoverflow Oriented Programming

Douglas Medeiros medeirosinacio

🤙
Stackoverflow Oriented Programming
View GitHub Profile
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'blank_line_after_namespace' => true,

Roadmap de estudos de SQL

Aviso: Muitas vezes detalhes de várias operações podem variar de banco para banco. Em questões onde fiquei em dúvida, este documento segue o funcionamento do PostgreSQL, pois é o banco que conheço melhor.

Pré-requisito: Álgebra Relacional básica

Antes de começar a escrever SQL, você precisa entender o modelo de como um banco de dados relacional funciona. Não precisa se aprofundar muito, mas você precisa entender como que dados e relacionamentos entre eles são representados. (Nota importante: Relacionamento e relação não são a

#! /usr/bin/python3
import sqlite3
import os
import subprocess
import sys
from datetime import datetime
if len(sys.argv) > 1:
conn = sqlite3.connect(f'/tmp/{sys.argv[1]}.sqlite')
brew tap homebrew/cask-fonts
brew install --cask font-cascadia-code
brew install --cask font-cascadia-code-pl
brew install --cask font-cascadia-mono
brew install --cask font-cascadia-mono-pl
@haxoza
haxoza / docker-compose.yml
Created July 24, 2019 11:11
Local S3 with Minio and created bucket on startup
version: '3'
services:
minio:
image: minio/minio:RELEASE.2019-07-17T22-54-12Z
volumes:
- data:/data
ports:
- "9000:9000"
networks:
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active July 5, 2024 10:55
Conventional Commits Cheatsheet

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@harshavardhana
harshavardhana / docker-compose.yml
Created September 15, 2017 19:32
Continuous mirroring
version: '2'
services:
minio:
image: minio/minio
container_name: miniobkp
ports:
- 9000:9000
env_file:
- ./minio.env
@SKempin
SKempin / Git Subtree basics.md
Last active June 27, 2024 07:56
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

@jacurtis
jacurtis / 1) Main.blade.php
Created February 16, 2017 16:37
Laravel 5.4 Components & Slots
<!-- This is the main Blade file that you want your components to show up in -->
<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
@nasrulhazim
nasrulhazim / 01.md
Last active October 23, 2023 07:19
Laravel Default API Login

Setup

Migration

Create new migration script:

php artisan make:migration add_api_token --table=users