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
# # | |
# # | |
# # | |
# # | |
# Instalação do Prometheus # | |
# # | |
# # | |
# # | |
# # | |
apiVersion: v1 |
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
/* | |
* as per https://www.youtube.com/watch?v=L_BK8zXGdBM&ab_channel=VueConfToronto | |
*/ | |
import {shallowMount} from '@vue/test-utils'; | |
describe('test using Component factory', ()=>{ | |
let wrapper; | |
//Factory |
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
$sql = "SELECT id, firstname, lastname FROM MyGuests"; | |
$result = mysqli_query($conn, $sql); | |
if (mysqli_num_rows($result) > 0) { | |
// output data of each row | |
while($row = mysqli_fetch_assoc($result)) { | |
echo '<pre>'; | |
print_r($row); | |
echo '</pre>'; | |
} |
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
docker-machine ip //Get a Docker machine ip | |
docker exec -it {$MONGO_INSTANCE_NAME} mongo admin //Enters the mongo admin CLI | |
docker run --name {$MONGO_INSTANCE_NAME} -p 27017:27017 mongo // Runs mongo and exposes and maps the port |
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
<md-content flex layout-padding> | |
<div layout="column" layout-fill layout-align="top center"> | |
<p> | |
The left sidenav will 'lock open' on a medium (>=960px wide) device. | |
</p> | |
<p> | |
The right sidenav will focus on a specific child element. | |
</p> | |
<div> | |
<md-button ng-click="toggleLeft()" class="md-primary" hide-gt-md>Toggle Left</md-button> |
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
<?php | |
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
class Fornecedores extends CI_Controller { |
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
<?php | |
namespace Entity; | |
/** | |
* User Model | |
* | |
* @Entity | |
* @Table(name="fornecedor") | |
*/ |
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
var formulario = angular.module('formularioApp', []); | |
formulario.directive('formulario-contato', function(){ | |
return{ | |
restrict: 'E', | |
templateUrl: 'caminho/do/template/do/formulario.html', | |
controller: function(){ | |
// Aqui dentro vc vai programar o formulário em si. | |
} | |
} |
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
var python = require('child_process').spawn('python', ['file.py'], {stdio:'pipe'}); | |
var output = ""; | |
python.stdout.on('data', function(data){ | |
console.log(String(data)) | |
}) | |
console.log(output); |
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
//Essa é a função de callback | |
mostraPosts(posts){ | |
//mostra os posts | |
} | |
pegaPosts(callback){ | |
//Pega os posts, sei lá como. | |
posts = [] | |
callback(posts); | |
} |
NewerOlder