This file contains hidden or 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
Vue.component('meu-componente',{ | |
el: '.class', | |
// criamos funcao que retorna objetos para que nao interfiram com os outros componentes | |
data: function(){ | |
return { | |
foo: 'bar' | |
} | |
}, | |
template: '<p>{{foo}}</p>' | |
}); |
This file contains hidden or 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
$ vue init webpack-simple my-project | |
$ cd my-project | |
$ npm install | |
$ npm run dev |
This file contains hidden or 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
/* | |
HTTPS no Domain | |
Rate limiting | |
PDO Prepared statements | |
# Hash sensitive data | |
# Check the ORIGIN header | |
Check the REFERER header | |
If the Origin header is not present, verify the hostname in the | |
Referer header matches the site's origin. |
This file contains hidden or 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
///////////////////// | |
// Connect | |
try { | |
$host = "localhost"; | |
$database = "learning_pdo"; | |
$db = new PDO("mysql:host=$host;dbname=$database;charset=utf8","antonio","123"); | |
} |
This file contains hidden or 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
// BASICO | |
var img = $('img'), | |
h2 = $('h2'), | |
tl = new TimelineMax(); | |
tl | |
//from,fromTo, ou to, (elemento, tempo, opcoes) | |
.from(h2,0.3,{y:-15,autoAlpha:0,ease:Power1.easeOut}) | |
// 0.15 seconds earlier than previous | |
.from(img,1,{y:-15,autoAlpha:0,ease:Power1.easeOut},'-=0.15') |
NewerOlder