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
.something:before{ | |
content:""; | |
width:100px; | |
height:100px; | |
display:block; | |
/*position:absolute;*/ | |
background-color:red; | |
} |
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> | |
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en" > <![endif]--> | |
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title> --Title--- </title> | |
<link rel="stylesheet" href="css/foundation.css" /> | |
<script src="js/vendor/custom.modernizr.js"></script> | |
</head> |
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
//<input type="text" onkeydown="return digita_numero(this, event);" /> | |
function digita_numero(input, e){ | |
var elementos = input.form.elements; | |
var maxlength = input.getAttribute('maxlength'); | |
//Se o evento for número ou teclas especiais, passa. | |
if(e.keyCode >= 96 && e.keyCode <= 105 || e.keyCode >= 48 && e.keyCode <= 57 || e.keyCode== 8 || e.keyCode== 9 || e.keyCode== 13 || e.keyCode== 27 || e.keyCode== 32 || e.keyCode>= 37 && e.keyCode <= 40 ){ | |
} | |
else if(e.which >= 96 && e.which <= 105 || e.which >= 48 && e.which <= 57 || e.keyCode== 8 || e.keyCode== 9 || e.keyCode== 13 || e.keyCode== 27 || e.keyCode== 32 || e.keyCode>= 37 && e.keyCode <= 40 ){ | |
} |
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
<?php | |
//Checa o e-mail | |
function check_email_address($email) { | |
// First, we check that there's one @ symbol, and that the lengths are right | |
if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $email)) { | |
// Email invalid because wrong number of characters in one section, or wrong number of @ symbols. | |
return false; | |
} // Split it into sections to make life easier | |
$email_array = explode("@", $email); | |
$local_array = explode(".", $email_array[0]); |
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
1- Baixar o driver no site da NVIDIA, vai vir um executável '.run' . | |
2- Parar o X Server usando 'sudo /etc/init.d/mdm stop'. Vai ir para uma tela preta com o terminal só. | |
3- Instalar o driver. 'cd /home/kiko/Downloads' 'sh ./NVIDIA-Linux-X86_64-300.200.run' | |
Se der um erro com o kernel Nouveau, ele vai oferecer a opção de instalar esse arquivo para bloquear a execução. Instalei e rebootei. Pronto. | |
'/etc/modprobe.d/nvidia-installer-disable-nouveau.conf' |
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
Para ter uma pasta de conteúdos do htdocs em um local externo, é necessário colocar um link simbólico | |
para a pasta, assim, o link /opt/lampp/htdocs/html será redirecionado para /home/kiko/html. | |
para criar o link simbólico: | |
sudo ln -sf /home/kiko/html /opt/lampp/htdocs/html | |
Windows: | |
mklink /D C:\wamp\www\Lampp\scss C:\Users\web02\Lampp\scss (Ordem inversa) |
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
1 -> Baixar o Xampp (~/Downloads/xampp-linux-1.8.1.tar.gz) | |
2 -> Extrair o lampp para a pasta /opt: "sudo tar xvfz xampp-linux-1.8.1.tar.gz -C /opt | |
" | |
3 -> Liberar o acesso do PhpMyAdmin: | |
"gedit /opt/lampp/etc/extra/httpd-xampp.conf" | |
Colocar um "Require all granted" no final da tag <Directory "/opt/lampp/phpmyadmin">: | |
<Directory "/opt/lampp/phpmyadmin"> | |
AllowOverride AuthConfig Limit | |
Order allow,deny | |
Allow from all |
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
Procurei por | |
# RewriteBase /drupal, descomentei: | |
RewriteBase /drupal, onde /drupal é a subpasta. É bom que toda a pasta esteja em 755. |
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
<meta name="viewport" content="width=device-width;"/> |
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
#produto-preview, .thumb { | |
display:inline-block; | |
vertical-align:top; | |
-moz-box-sizing: border-box; | |
-o-box-sizing: border-box; | |
-ms-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
} | |
#produto-preview img { width: 100%; } /* Todas as imagens ajustam às boxes */ |
OlderNewer