Skip to content

Instantly share code, notes, and snippets.

View cassiompf's full-sized avatar
🏡
Working from home

Cássio Fontoura cassiompf

🏡
Working from home
View GitHub Profile
@cassiompf
cassiompf / gemfile_update.rake
Last active January 16, 2023 20:21
Task to write the latest versions of gems in your Gemfile using web-scraping - Ruby on Rails
namespace :gemfile do
desc 'Atualiza o seu arquivo Gemfile com as gems mais recentes'
task :update do
require 'tempfile'
require 'fileutils'
require 'nokogiri'
require 'net/http'
GEMFILE_PATH = "#{Rails.root}/Gemfile"
@cassiompf
cassiompf / FormAluno.php
Created September 5, 2019 11:55
Atividade "SistemaAcademico" do professor Edilson Palmas 05/09
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
@cassiompf
cassiompf / FormProduto.php
Created September 5, 2019 11:45
Atividade "EAD-2-Loja" do professor Edilson Palmas 05/09
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
@cassiompf
cassiompf / calculoGet.php
Last active September 3, 2019 15:18
Atividade "Calculadora" do professor Edilson Palmas 23/08
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Calc 2</title>
</head>
<body>
<?php
$num1 = $_GET["num1"];
$num2 = $_GET["num2"];
@cassiompf
cassiompf / imc.php
Created September 3, 2019 15:15
Atividade "IMC" do professor Edilson Palmas 20/08
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page Title</title>
</head>
<body>
<?php
$peso = $_POST["peso"];
@cassiompf
cassiompf / alterarSenha.php
Created September 3, 2019 15:13
Atividade "SolucaoLogin" do professor Edilson Palmas 03/09
<html>
<head>
<meta charset="utf-8">
<title>Site alteraSenha</title>
</head>
<body>
<?php
$var1 = $_POST["login"];
?>
@cassiompf
cassiompf / connect_mysql.php
Last active September 3, 2019 15:10
Sample connection and input data in mysql using Php
<?php
$host = "localhost";
$user = "root";
$senha = "";
$db = "database";
$conexao = mysqli_connect($host, $user, $senha, $db);
$sql = "insert into produto (nome, descricao, preco) values (?, ?, ?)";
@cassiompf
cassiompf / login.html
Last active August 6, 2019 23:14
Atividade de Login do professor Edilson Palmas 05/08
<!DOCTYPE html>
<html>
<head>
<title>
Site de Login
</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
@cassiompf
cassiompf / atv-04.html
Last active August 6, 2019 00:54
Atividades do livro JavaScript página 71
<!DOCTYPE html>
<html>
<head>
<title>Atividade</title>
<meta charset="utf-8">
</head>
<body>
<script>
alert("Feliz Aniversário!!!");
</script>
@cassiompf
cassiompf / testlambda01.java
Last active July 29, 2019 22:38
Lambda Ex-1 Java
public class Lambda {
interface Num{
double getValor();
}
interface ValorNumerico{
boolean teste(int n);
}