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
| export GREP_OPTIONS="--color=auto" | |
| export GREP_COLOR="4;33" | |
| export CLICOLOR="auto" | |
| alias ls="ls -G" | |
| alias ll="ls -l" | |
| function parse_git_branch () { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } |
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
| // Código com JSX | |
| var HelloMessage = React.createClass({ | |
| render: function() { | |
| return <div>Hello {this.props.name}</div>; | |
| } | |
| }); | |
| React.render(<HelloMessage name="John" />, mountNode); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script type="text/javascript" src="node_modules/angular/angular.min.js"></script> | |
| <style type="text/css"> | |
| li { | |
| display: none; | |
| } | |
| li:first-child { | |
| display:block; |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <!-- The core React library --> | |
| <script src="http://fb.me/react-0.13.1.js"></script> | |
| <!-- In-browser JSX transformer, remove when pre-compiling JSX. --> | |
| <script src="http://fb.me/JSXTransformer-0.13.1.js"></script> | |
| </head> | |
| <body> |
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
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| <iframe id="teste" src="http://wilivro.adaptativa.com.br/educational_platform/dashboard"></iframe> | |
| <script type="text/javascript"> | |
| setTimeout(function() { | |
| console.log(document.getElementById('teste').contentWindow.$('.module-bg.quiz').next('.module-button').attr('href')); | |
| }, 1000);//como falei. não funciona. |
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
| > db.tests.createIndex({a:1, b:1}); //A criação de indice pode ser simples ou composta | |
| { | |
| "createdCollectionAutomatically" : false, | |
| "numIndexesBefore" : 1, | |
| "numIndexesAfter" : 2, | |
| "ok" : 1 | |
| } | |
| > db.tests.createIndex({a:-1}); //Ao passar o parametro negativo o índice é para ordem decrescente | |
| { | |
| "createdCollectionAutomatically" : false, |
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
| > db.tests.explain().find({a:1}); | |
| { | |
| "queryPlanner" : { // Informações do Explain | |
| "plannerVersion" : 1, | |
| "namespace" : "tests.tests", | |
| "indexFilterSet" : false, | |
| "parsedQuery" : { | |
| "a" : { | |
| "$eq" : 1 | |
| } |
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
| $ mongod --profile 1 --slowms 2 |
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
| db.system.profile.find({millis:{$gt:500}}).sort({ts:-1}) |
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
| $ mongotop 3 | |
| ns total read write 2015-04-10T18:00:42-03:00 | |
| test.tests 196ms 0ms 196ms | |
| admin.system.roles 0ms 0ms 0ms | |
| admin.system.version 0ms 0ms 0ms |