Skip to content

Instantly share code, notes, and snippets.

View dheysonalves's full-sized avatar
🧘‍♂️

Dheyson Alves dheysonalves

🧘‍♂️
View GitHub Profile
@dheysonalves
dheysonalves / model.md
Last active January 23, 2021 00:45
Como estruturar um diagrama de classes e modelar um banco relacional?

Introdução

Para iniciar o planejamento do módulo de atividades, primeiro deve-se definir qual conjunto de atividades o fluxograma irá cobrir. Em um diagrama de atividades, definimos um enquadradamento do fluxo de atividades de usuário. Por exemplo, conjunto de atividades relacionadas ao módulo de pagamento, então todo o fluxograma será enquadrado nessa funcionalidade.

Para criar um fluxograma de atividades, possuímos uma pequena nomenclatura básica. Mas antes, vamos definir sobre o que é diagrama de atividades?

Diagrama de Atividades

De maneira genérica, é um padrão para definir estrutura de projetos de software. Com ela, podemos visualizar de maneira ampla, o fluxo de atividades de usuário e as variantes de excessão - onde incluem erros, cenários específicos, entre outros.

@dheysonalves
dheysonalves / toggle-ajax-loading.css
Created January 21, 2021 02:57 — forked from maxparm/toggle-ajax-loading.css
Javascript - Toggling a loading screen with jQuery ajax
.loading-container {
position:absolute;
top:0;
right:0;
bottom:0;
left:0;
display:none;
}
.loading-container:before {
position:absolute;
@dheysonalves
dheysonalves / ellipsis.css
Created January 20, 2021 14:22
How to create an ellipsis text with limit line size?
.text {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2; /* number of lines to show */
-webkit-box-orient: vertical;
}
@dheysonalves
dheysonalves / combo_dinamico.html
Created January 10, 2021 19:01 — forked from ografael/combo_dinamico.html
Carregar combo com JQuery - Cidades e Estados
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON('estados_cidades.json', function (data) {
@dheysonalves
dheysonalves / policy.md
Created January 10, 2021 06:07
Disqus Comment Policy

Algumas regras simples para permitir o bom convívio nos comentários.

  • Seja educado - não seja rude com ninguém e respeite os outros.
  • Não troll. Agradecemos e agradecemos as críticas aos escritores aqui, mas comentários que não agregam valor à discussão ou que são meramente insultuosos seriam excluídos sem exceção.
  • Spam? Adeus.
@dheysonalves
dheysonalves / killport.md
Created December 13, 2020 16:20
How to kill a port?

Find Process id in windows using command prompt

netstat -ano | findstr

Kill the process using command prompt

taskkill /F /PID

@dheysonalves
dheysonalves / interpolation.tsx
Created December 8, 2020 01:43
Interpolation Example
import { StatusBar } from 'expo-status-bar';
import React, { useRef } from 'react';
import { StyleSheet, View, Animated, ImageBackground } from 'react-native';
export default function App() {
const fadeAnim = useRef(new Animated.Value(0)).current;
React.useEffect(() => {
return Animated.timing(
fadeAnim,
@dheysonalves
dheysonalves / background_splash.xml
Created December 7, 2020 19:30
splash_screen fill horizontal and vertical
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="match_parent" android:layout_width="match_parent">
<item android:drawable="@color/splashscreen_bg" />
<!-- Set the Background Image-->
<item android:gravity="fill_horizontal|fill_vertical" android:layout_width="match_parent" android:layout_height="match_parent">
<bitmap android:gravity="fill_horizontal|fill_vertical" android:src="@drawable/splash" />
</item>
@dheysonalves
dheysonalves / formatNumberToKLetter.js
Created November 26, 2020 15:43
Format number to K letter
function kFormatter(num) {
return Math.abs(num) > 999 ? Math.sign(num)*((Math.abs(num)/1000).toFixed(1)) + 'k' : Math.sign(num)*Math.abs(num)
}
@dheysonalves
dheysonalves / laravel-artisan-cheatsheet
Created August 6, 2020 10:45 — forked from hoandang/laravel-artisan-cheatsheet
Laravel artisan cheatsheet
Available commands:
clear-compiled Remove the compiled class file
down Put the application into maintenance mode
env Display the current framework environment
help Displays help for a command
inspire Display an inspiring quote
list Lists commands
migrate Run the database migrations
optimize Cache the framework bootstrap files
serve Serve the application on the PHP development server