Skip to content

Instantly share code, notes, and snippets.

View faeliaso's full-sized avatar
💙
MERAKI

Elias de Oliveira faeliaso

💙
MERAKI
View GitHub Profile
@faeliaso
faeliaso / docker_cheatsheet.md
Created April 3, 2022 03:35 — forked from jctosta/docker_cheatsheet.md
Docker - Comandos Úteis

Docker - Comandos Úteis

Containers

  • Abrir um shell em um container em execução:
    • docker exec -t -i <container_id> <shell>

Limpeza

  • Excluir containers com status equivalente a Exited:
@faeliaso
faeliaso / README.md
Created April 2, 2022 22:02 — forked from genomics-geek/README.md
Setting up a Dockerized web application with Django REST APIs, ReactJS with Redux pattern, and Webpack Hot Reloading! Mouthful.

Guide on how to create and set up a Dockerized web app using Django REST APIs and ReactJS

Hopefully this will answer "How do I setup or start a Django project using REST Framework and ReactJS?"

This is a guide to show you step by step how this can be setup. If you just want to get started, use the cookiecuter I set up cookiecutter-django-reactjs. It basically is a fork of pydanny's cookiecutter, just added the front-end stuff :).

I created this because it was SUCH a pain in the ass setting up a project using all the latest technologies. After some research, I figured it out and have it working. The repo that implements this is located here. Feel free to use it as a boilerplate ;)

Main features:

  • Django REST APIs
@faeliaso
faeliaso / StatusCode.kt
Created October 10, 2021 02:06 — forked from vlio20/StatusCode.kt
Kotlin Http Status Codes enum
package oogaday.commons.enums
enum class StatusCode(val code: Int) {
Continue(100),
SwitchingProtocols(101),
Processing(102),
OK(200),
Created(201),
Accepted(202),
package eu.anifantakis.composeapp
import android.os.Bundle
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.compose.foundation.*
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
@faeliaso
faeliaso / estados.json
Created August 28, 2021 14:35 — forked from rg3915/estados.json
Estados do Brasil
{
"Norte": {
"AC": "Acre",
"AM": "Amazonas",
"AP": "Amapá",
"PA": "Pará",
"RO": "Rondônia",
"RR": "Roraima",
"TO": "Tocantins"
},
@faeliaso
faeliaso / boilerplate2.sh
Created August 28, 2021 14:35 — forked from rg3915/boilerplate2.sh
Boilerplate: Shell script to create a complete Django project in Mac with Python 3.7 and Django 2.2.12
# Shell script to create a complete Django project.
# This script require Python 3.x and pyenv
# Settings.py is config to Django 2.2.12
# The project contains:
# Settings config
# Person model and form
# Person list and detail
# Person create, update and delete
# Admin config
@faeliaso
faeliaso / git-deployment.md
Created April 25, 2021 02:49 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

class MainActivity : AppCompatActivity() {
private val viewModel: NetworkStatusViewModel by lazy {
ViewModelProvider(
this,
object : ViewModelProvider.Factory {
override fun <T : ViewModel?> create(modelClass: Class<T>): T {
val networkStatusTracker = NetworkStatusTracker(this@MainActivity)
return NetworkStatusViewModel(networkStatusTracker) as T
}
@faeliaso
faeliaso / music_theory.py
Created April 22, 2021 15:59 — forked from mvanga/music_theory.py
Basic Music Theory in ~200 Lines of Python
# The code for my article with the same name. You can find it at the URL below:
# https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python
# MIT License
#
# Copyright (c) 2021 Manohar Vanga
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@faeliaso
faeliaso / fabfilter-remover.sh
Created March 14, 2021 22:37 — forked from kigster/fabfilter-remover.sh
Script to find and remove FabFilter plugins on Mac OS-X. Requires Terminal usage.
#!/usr/bin/env bash
if [[ ! -L lib || ! -L bootstrap ]]; then
[[ -z $(which curl) ]] && {
printf "Curl is required for this operation. Please install it with\n"
printf "brew install curl\n"
exit 1
}
curl -fsSL "http://bit.ly/bashmatic-bootstrap" | /usr/bin/env bash
fi