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
<html> | |
<head> | |
<title>Contact Us</title> | |
</head> | |
<body> | |
<?php | |
if ($_POST['message']) { | |
$message = $_POST['message']; |
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
ESTADOS_BRASILEIROS = [ | |
["Acre", "AC"], | |
["Alagoas", "AL"], | |
["Amapá", "AP"], | |
["Amazonas", "AM"], | |
["Bahia", "BA"], | |
["Ceará", "CE"], | |
["Distrito Federal", "DF"], | |
["Espírito Santo", "ES"], | |
["Goiás", "GO"], |
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
def fibonacci(n) | |
return 0 if n == 0 | |
return 1 if n > 0 && n <= 2 | |
first = 1 | |
second = 1 | |
until n < 3 | |
fibonacci = first + second | |
first = second | |
second = fibonacci | |
n -= 1 |
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
mkdir nameOfProject | |
cd nameOfProject | |
docker run --rm --user "$(id -u):$(id -g)" -v $(pwd):/usr/src -w /usr/src -ti ruby:latest bash | |
gem install rails | |
rails new . --database=postgresql --skip-bundle | |
--------------------- Dockerfile ---------------------- | |
FROM ruby:latest |
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
Headline: | |
"I’m a full-stack software engineer with a focus on education." | |
Bio: | |
"I’m a full-stack software engineer with a focus on education. In my past life, I was a digital media strategist and an international English teacher. From products to interactions, I live for creating joyful experiences and thrive in learning something new. You can say my continued passion for technology and learning led me here. | |
I see problems as opportunities to create and programming as my toolbox. You can often see me wondering out loud about developing better efficiencies on whatever project I am working on. If you are not planning on contacting me about my portfolio, I am also a certified wine taster so we can talk about that too. |
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
Ha uma chamada para a API direto na renderizacao do componente. | |
<vpaginator ref="paginator" :options="$defaultPaginatorConfig" resource_url="/atlas/planejamentos" @update="updateResource"></vpaginator> | |
--------------------------- | |
O script esta assim: | |
<script> |
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
#!/bin/sh | |
# Extract the archive $1 to a directory $2 with the program $3. If the | |
# archive contains a single top-level directory, that directory | |
# becomes $2. Otherwise $2 contains all the files at the root of the | |
# archive. | |
extract () ( | |
set -e | |
archive=$1 | |
case "$archive" in |
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
HTTP status code symbols for Rails | |
Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
Status Code Symbol | |
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing |
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
# List all models | |
ActiveRecord::Base.connection.tables.map do |model| | |
model.capitalize.singularize.camelize | |
end | |
# Get all associations of a model | |
User.reflect_on_all_associations |
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
docker run --name postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_USER=postgres -p 5432:5432 -d postgres | |
------------------- | |
development: | |
<<: &default | |
adapter: postgresql | |
encoding: unicode | |
database: anything_development | |
username: postgres |
OlderNewer