Cloud-Init is the defacto multi-distribution package that handles early initialization of a virtual machine instance. Using Cloud-Init, one can configure network
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
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# | |
# Mar 2013 Yad Smood | |
# VCS | |
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} " | |
YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}" |
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
const puppeteer = require('puppeteer'); | |
const devices = require('puppeteer/DeviceDescriptors'); | |
const Good3G = { | |
'offline': false, | |
'downloadThroughput': 1.5 * 1024 * 1024 / 8, | |
'uploadThroughput': 750 * 1024 / 8, | |
'latency': 40 | |
}; | |
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 | |
interface PagamentoInteface { | |
public function pagar(); | |
} | |
interface PegamentoCancelavelInteface extends PagamentoInteface { | |
public function cancelar(); | |
} |
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
#include <stdio.h> | |
// Cria uma estrutura para leitura do circuito | |
typedef struct { | |
float potenciaDijuntor; | |
float corrente; | |
float tensao; | |
} Circuito; | |
// Cria assinatura da função que vai soar o alarme |
Shortcut Keys | Function |
---|---|
Main | |
Escape key | Gets out of the current mode into the “command mode”. All keys are bound of commands. |
i | “Insert mode” for inserting text. Keys behave as expected. |
: | “Last-line mode” where Vim expects you to enter a command such as to save the document. |
Navigation keys | |
h |
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
import anime from 'animejs'; | |
const cartButton = document.querySelector('.header__cart'); | |
const cartIndicator = document.querySelector('.delivery__cart-indicator'); | |
document.body.addEventListener('click', event => { | |
const { pageX, pageY } = event; | |
const bodyRect = document.body.getBoundingClientRect(); | |
const cartButtonRect = cartButton.getBoundingClientRect(); | |
const cart = { |
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
INSERT INTO | |
clientes (cod_cliente, nome, cpf, rg, endereco, bairro, nome_cidade, estado, cep, email, ddd, telefone ) | |
VALUES | |
(1, 'Maria José Silva', '123 254 254 01', '12548', 'Rua Seis', 'Centro', 'São Luis', 'Maranhao', '65930820', '[email protected]', '98', '99918 8590') | |
(2, 'Marta jose', '897 254 354 11', '58964', 'Rua sete ', 'C.olimpica', 'São Luis', 'Maranhao', '65730125', '[email protected]', '98', '99918 8590') | |
(3, 'Maria das dores ', '143 254 254 0', '12558', 'Rua oito', 'Turu', 'São Luis', 'Maranhao', '65940120', '[email protected]', '98', '99918 8590') | |
(4, 'carlos Gustavo ', '126 254 254 0', '13548', 'Rua nove', 'janaina', 'São Luis', 'Maranhao', '65930120', '[email protected]', '98', '99918 8590') | |
INSERT INTO |
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
/** | |
* Debounce a function so that it will only fire once | |
* | |
* USAGE EXAMPLE: | |
* $scope.search = debounce(performSearch, 500); // Bind to ng-keyup | |
* | |
* http://davidwalsh.name/javascript-debounce-function | |
* | |
* @param func [Function] - The function to execute |
NewerOlder