<script>
var salario = prompt('Digite o valor do salário: ');
salario = parseFloat(salario);
var quilowatts = prompt('Digite o valor do quilowatts: ');
quilowatts = parseFloat(quilowatts);
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 java.nio.file.Path; | |
| import java.nio.file.Files; | |
| public class Usuario { | |
| void criarPostagem(Database db, String mensagem) { | |
| try { | |
| db.save(mensagem); | |
| } catch (Exception ex) { | |
| Logger logger = new Logger(db); |
In some cases, using istio and some services like prometheus-adapter, you can get this error.
namespaces "default" is forbidden: User "system:serviceaccount:kube-system:default" cannot get namespaces in the namespace "default"
That's because you don't have the permission to deploy tiller, add an account for it.
To fix it, in a clean environment and before start istio, follow these steps.
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
| # -*- coding: utf-8 -*- | |
| """ | |
| """ | |
| import sys | |
| from bs4 import BeautifulSoup | |
| import requests | |
| import json | |
| import urllib.parse | |
| def crawl_teses(url): |
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
| effectors: | |
| rollOut: | |
| location: 127.0.0.1 | |
| command: M.rollOut($<deployment>, $<container>, $<image>) | |
| type: script | |
| scriptInfo: | |
| path: "kubectl" | |
| argument: "set image deployment.v1.apps/{0} {1}={2} --record" | |
| scaleUp: |
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
| version: '3' | |
| services: | |
| nginx: | |
| image: nginx:latest | |
| volumes: | |
| - ./nginx.conf:/etc/nginx/nginx.conf | |
| ports: | |
| - 80:80 | |
| - 443:443 | |
| db: |
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
| /* | |
| * Adaptation script for security attacks | |
| */ | |
| module dos.strategies; | |
| import op "org.sa.rainbow.stitch.lib.*"; | |
| import op "org.sa.rainbow.model.acme.znn.ZNN"; | |
| import lib "tactics.s"; | |
| define boolean cHighRespTime = exists c : T.ClientT in M.components | (c.experRespTime > M.MAX_RESPTIME); |
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
| { | |
| "kind": "MetricValueList", | |
| "apiVersion": "custom.metrics.k8s.io/v1beta1", | |
| "metadata": { | |
| "selfLink": "/apis/custom.metrics.k8s.io/v1beta1/namespaces/default/pods/%2A/http_requests" | |
| }, | |
| "items": [ | |
| { | |
| "describedObject": { | |
| "kind": "Pod", |
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
| version: '3' | |
| services: | |
| db: | |
| image: postgres:9.6-alpine | |
| restart: unless-stopped | |
| environment: | |
| POSTGRES_PASSWORD: s0n@R1 | |
| POSTGRES_USER: sonar | |
| POSTGRES_DB: sonar |