This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'prime' | |
def number_type(number) | |
is_esoteric = (number % 3 == 0 || number % 5 == 0) ? true : false | |
is_prime = Prime.prime?(number) | |
" O numéro é #{is_esoteric ? "esotérico" : "cético"} e #{ is_prime ? "primo" : "não primo"}" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'date' | |
ROOM_1 = 9207 # limit in number of days for 25 years, 2 months and 15 days | |
ROOM_2 = 16467 # limit in number of days for 45 years and one month | |
ROOM_3 = 23741 # limit in number of days for 65 years | |
def room_selection(birthday) | |
now = Date.today | |
birthdate = Date.parse(birthday) | |
difference = (now - birthdate).to_i |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fetch and install dependencie? [Yn] Y | |
* running mix deps.get | |
* running mix deps.compile | |
* running cd assets && npm install && node | |
node_modules/webpack/bin/webpack.js --mode development | |
$ cd contasapp | |
Then configure your database in config/dev.exs and run: | |
$ mix ecto.create | |
Start your Phoenix app with: | |
$ mix phx.server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
<title>Contasapp · Phoenix Framework</title> | |
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const glob = require('glob'); | |
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | |
const TerserPlugin = require('terser-webpack-plugin'); | |
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
module.exports = (env, options) => ({ | |
optimization: { | |
minimizer: [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// We need to import the CSS so that webpack will load it. | |
// The MiniCssExtractPlugin is used to separate it out into | |
// its own CSS file. | |
import css from "../css/app.css" | |
// webpack automatically bundles all modules in your | |
// entry points. Those entry points can be configured | |
// in "webpack.config.js". | |
// | |
// Import dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This file is for your main application css. */ | |
@import "../node_modules/bootstrap/dist/css/bootstrap.min.css"; | |
@import "../node_modules/@fortawesome/fontawesome-free/css/all.min.css"; | |
@import "./theme/cosmo.min.css"; | |
.alert:empty{ | |
display: none; | |
} |
NewerOlder