Skip to content

Instantly share code, notes, and snippets.

@thiagoeh
thiagoeh / cloud-init.txt
Last active August 10, 2020 17:20
Cloud Init - arquivo de exemplo
#cloud-config
timezone: "America/Sao_Paulo"
packages:
- htop
- nginx
@thiagoeh
thiagoeh / iperf3_tests.md
Last active July 14, 2020 22:11
Iperf3 Tests

Server side

iperf3 -s

Client Side

SERVER_IP=159.138.214.0 # SP
SERVER_IP=119.8.155.113 # Chile
iperf3 \
@thiagoeh
thiagoeh / postman_dl.sh
Last active June 19, 2020 13:19
Downloading an specific release of postman
wget https://dl.pstmn.io/download/version/7.25.3/win64
wget https://dl.pstmn.io/download/channel/canary/windows_64
kubectl run -i --tty --rm --image ubuntu test-shell bash
@thiagoeh
thiagoeh / youtube-dl_audio.sh
Created May 28, 2020 22:19
Getting audio from an youtube video
# https://askubuntu.com/questions/634584/how-to-download-youtube-videos-as-a-best-quality-audio-mp3-using-youtube-dl
youtube-dl -f bestaudio --extract-audio --audio-format mp3 --audio-quality 5 <URL>
@thiagoeh
thiagoeh / cce_sp_v1-13_storage_classes.txt
Last active May 19, 2020 21:10
Working with PersistentVolume and PersistentVolumeClaim in Kubernetes
kubectl get storageclass
NAME PROVISIONER AGE
efs-performance flexvolume-huawei.com/fuxiefs 102m
efs-standard flexvolume-huawei.com/fuxiefs 102m
nfs-rw flexvolume-huawei.com/fuxinfs 102m
obs-standard flexvolume-huawei.com/fuxiobs 102m
obs-standard-ia flexvolume-huawei.com/fuxiobs 102m
sas flexvolume-huawei.com/fuxivol 102m
sata flexvolume-huawei.com/fuxivol 102m
ssd flexvolume-huawei.com/fuxivol 102m
@thiagoeh
thiagoeh / clean_file.sh
Created May 14, 2020 21:21
Removing commented and blank lines from file
grep -v '^#' /etc/squid/squid.conf | grep -v '^$'
@thiagoeh
thiagoeh / hyper-v_nat_switch.ps1
Last active May 14, 2020 16:10
Hyper-V NAT Switch Setup
# https://docs.microsoft.com/en-us/powershell/module/hyper-v/New-VMSwitch
# https://docs.microsoft.com/en-us/powershell/module/hyper-v/Remove-VMSwitch
New-VMSwitch –SwitchName "NAT-Switch" –SwitchType Internal –Verbose
# https://docs.microsoft.com/en-us/powershell/module/netadapter/Get-NetAdapter
# https://docs.microsoft.com/en-us/powershell/module/hyper-v/Get-VMSwitch
Get-VMSwitch
Get-NetAdapter
New-NetIPAddress -IPAddress 192.168.200.1 -PrefixLength 24 -InterfaceAlias "vEthernet (NATSwitch)"
@thiagoeh
thiagoeh / hyper_v_on_windows_10.ps1
Last active March 27, 2020 12:23
Enable Hyper-V on Windows 10
# https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
Get-WindowsOptionalFeature -Online -FeatureName *hyper-v* | select DisplayName, FeatureName, State
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All