Skip to content

Instantly share code, notes, and snippets.

View andrematias's full-sized avatar
🏠
Working from home

André Matias andrematias

🏠
Working from home
View GitHub Profile
@danilobatistaqueiroz
danilobatistaqueiroz / ddd.md
Last active January 14, 2023 22:52
DDD - Domain Driven Design

DDD é um conjunto de boas práticas de orientação a objetos e um padrão de modelagem de sistemas, uma metodologia para aplicação de conceitos e padrões no projeto.

DDD tende a ser uma idéia geral focando em entender primeiro o domínio.
Os problemas em questão, os objetos com os quais está trabalhando.
São construídos os modelos primeiro, ferramentas para manipulá-los em segundo lugar, e depois a lógica de negócios no topo para resolver os problemas de domínio por exigência de negócios.
Normalmente trabalha em mecanismos de persistência em seguida, e apresentação por último.

Isso vem em contrapartida com o uso comum do Data-Driven Design ou Projeto Orientado a Dados, que a maioria dos desenvolvedores usa sem mesmo ter consciência disso. Devemos em um primeiro momento esquecer de como os dados são persistidos e nos preocupar mais em como representar melhor as necessidades de negócio em classes e comportamentos.

@jameswpm
jameswpm / pomodoro.sh
Last active December 27, 2023 15:53
Minimalistic Pomodoro Timer
#!/bin/bash
#
# Minimalistic_Pomodoro_Timer
#
# Based on the SU answer found here: https://superuser.com/questions/224265/pomodoro-timer-for-linux/669811#669811
#
# Tested in Ubuntu 16.04 and Arch
pomodorotime () {
notify-send "Time to Work" "Focus" -u normal -a 'Pomodoro' -i $HOME/Documentos/icon.png
paplay /usr/share/sounds/freedesktop/stereo/window-attention.oga
@maxan
maxan / web.config
Last active November 14, 2023 11:43
IIS Config to React Router App
<system.webServer>
<rewrite>
<rules>
<rule name="React Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/(api)" negate="true" />
</conditions>
@takeit
takeit / INSTALL.md
Last active March 23, 2024 19:03
Write to NTFS on macOS Sierra (osxfuse + ntfs-3g)
  1. Install osxfuse:
brew cask install osxfuse
  1. Reboot your Mac.

  2. Install ntfs-3g:

@zakkak
zakkak / .git-commit-template
Last active May 15, 2024 00:06 — forked from adeekshith/.git-commit-template.txt
This commit message template that helps you write great commit messages and enforce it across your team.
# [<tag>] (If applied, this commit will...) <subject> (Max 72 char)
# |<---- Preferably using up to 50 chars --->|<------------------->|
# Example:
# [feat] Implement automated commit messages
# (Optional) Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# (Optional) Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@richardtorres314
richardtorres314 / flexbox.scss
Last active May 4, 2024 06:31
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
@escopecz
escopecz / commands.php
Last active April 18, 2023 22:43 — forked from alanhartless/cron.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMauticReallyIDo'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@feltnerm
feltnerm / Dockerfile
Last active February 21, 2023 08:36
Docker + MySQL + `lower_case_table_names=1`
FROM mysql
ADD my.cnf /etc/mysql/my.cnf
CMD ["mysqld", "--datadir=/var/lib/mysql", "--user=mysql"]
@umidjons
umidjons / index.html
Last active January 6, 2024 18:46
Upload File using jQuery.ajax() with progress support
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Upload File using jQuery.ajax() with progress support</title>
</head>
<body>
<input type="file" name="file" id="sel-file"/>