View resize_ubuntu.sh
This file contains 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
# Aumentar o tamanho do disco | |
virt-filesystems --long -h --all -a olddisk.qcow2 | |
qemu-img create -f qcow2 -o preallocation=metadata newdisk.qcow2 50G | |
# /dev/sda3 é o nome da partição do disco antigo que vai ser alterado | |
virt-resize --expand /dev/sda3 olddisk newdisk.qcow2 | |
# os dados são copiados para o disco novo, mova o disco novo sobre o antigo |
View teste
This file contains 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
@article{mijumbi_network_2016, | |
title = {Network function virtualization: {State}-of-the-art and research challenges}, | |
volume = {18}, | |
issn = {1553877X}, | |
doi = {10.1109/COMST.2015.2477041}, | |
number = {1}, | |
journal = {IEEE Communications Surveys and Tutorials}, | |
author = {Mijumbi, Rashid and Serrat, Joan and Gorricho, Juan Luis and Bouten, Niels and De Turck, Filip and Boutaba, Raouf}, | |
year = {2016}, |
View ip.sh
This file contains 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
#!/bin/bash | |
rm /etc/netplan/00-installer-config.yaml | |
echo " | |
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
enp0s3: | |
dhcp4: false |
View Caddyfile
This file contains 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
:443 { | |
tls internal { | |
on_demand | |
} | |
reverse_proxy localhost:8929 { | |
header_up Host {host} | |
header_up X-Real-IP {remote} | |
header_up X-Forwarded-For {remote} | |
header_up X-Forwarded-Port {server_port} |
View Dockerfile Sail SQLServer
This file contains 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
FROM ubuntu:21.04 | |
LABEL maintainer="Taylor Otwell" | |
ARG WWWGROUP | |
ARG NODE_VERSION=16 | |
WORKDIR /var/www/html | |
ENV DEBIAN_FRONTEND noninteractive |
View HD Pro Webcam C920 ubuntu 20.04
This file contains 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
# How to adjust brightness for HD Pro Webcam C920 on ubuntu 20.04 | |
# | |
# Install the v4l2-ctl | |
apt-get install v4l2-ctl | |
# list the decives | |
v4l2-ctl --list-devices | |
### | |
HD Pro Webcam C920 (usb-0000:00:14.0-1.2): |
View gist:44987dcab84ffe8aef83b1332d9259d5
This file contains 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
# If you already downloaded the repo, inside de folder run in the folder | |
git config http.sslVerify false | |
# If you will download the repo, checkout the repo using -c http.sslVerify=false like | |
git -c http.sslVerify=false clone repo_url/git |
View mochila.py
This file contains 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
from mip import * | |
import random | |
# Constantes | |
RANDOM_SEED = 1 | |
NUM_PRODUTOS = 10 | |
NUM_MOCHILAS = 2 | |
# Variável que armazena os Dados | |
produtos = {} |
View mininet_remote_controller.py
This file contains 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
#!/usr/bin/python | |
from mininet.net import Mininet | |
from mininet.node import Controller, RemoteController, OVSController | |
from mininet.node import CPULimitedHost, Host, Node | |
from mininet.node import OVSKernelSwitch, UserSwitch | |
from mininet.cli import CLI | |
from mininet.log import setLogLevel, info | |
from mininet.link import TCLink, Intf, OVSLink | |
from subprocess import call |
View Defined a fixed IP in ubuntu 18.04
This file contains 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
#!/bin/bash | |
rm /etc/netplan/00-installer-config.yaml | |
echo " | |
network: | |
version: 2 | |
renderer: networkd | |
ethernets: | |
enp0s3: | |
dhcp4: false |
NewerOlder