Skip to content

Instantly share code, notes, and snippets.

View rodrigozan's full-sized avatar
💻
Studying JS frameworks and librarys

Rodrigo Zandonadi rodrigozan

💻
Studying JS frameworks and librarys
  • ACTi Tecnologia
  • São José dos Campos/SP
View GitHub Profile
@rodrigozan
rodrigozan / valida-email.php
Created October 29, 2021 19:05
Função de validação de email com PHP e expressões regulares
<?php
function validaEmail($email) {
$conta = "/^[a-zA-Z0-9\._-]+@";
$domino = "[a-zA-Z0-9\._-]+.";
$extensao = "([a-zA-Z]{2,4})$/";
$pattern = $conta.$domino.$extensao;
if (preg_match($pattern, $email, $check))
return true;
else
<!DOCTYPE html>
<html lang="en-US">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<body>
<div ng-app="">
<p>Name : <input type="text" ng-model="yourname"></p>
<h1>Hello {{yourname}}</h1>
</div>
<style>
#bg {
position: fixed;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
}
#bg img {
position: absolute;
img.bg {
/* Set rules to fill background */
min-height: 100%;
min-width: 1024px;
/* Set up proportionate scaling */
width: 100%;
height: auto;
/* Set up positioning */
html {
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
<!DOCTYPE html>
<html lang="pt-br">
<head>
<!-- Título da página -->
<title>Estrutura de um site HTML</title>
<!-- Tags Meta -->
<meta charset="utf-8"/>
<meta name="keywords" content="wordpress, desenvolvimento web, seo, blogosfera">
@rodrigozan
rodrigozan / WooCommerce - Tabela de parcelamento pagseguro
Created June 3, 2016 18:30
Uma tabela de parcelamento de preço WooCommerce - 12x baseado no pagseguro
<?php
/**
* Single Product Price, including microdata for SEO
*
* This template can be overridden by copying it to yourtheme/woocommerce/single-product/price.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you (the theme developer).
* will need to copy the new files to your theme to maintain compatibility. We try to do this.
* as little as possible, but it does happen. When this occurs the version of the template file will.
* be bumped and the readme will list any important changes.
public class InsertionSort2 {
public static void main(String[] args) {
//Estrutura básica
//Valores a serem ordenados
int vetor[] = {22, 9, 7, 6, 1, 49, 35, 3, 0};
//Armazenam o menor valor e o índice de menor valor
int valor, i;
@rodrigozan
rodrigozan / login_modal_bootstrap.html
Last active August 12, 2021 04:24
Formulário de Login em Janela Modal com Bootstrap
<!DOCTYPE html>
<!--
Author: Rodrigo Zan
Author site: www.rodrigozan.com
-->
<html lang="pt-br">
<head>
<title>Formulário de Login em Janela Modal com Bootstrap</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">