Skip to content

Instantly share code, notes, and snippets.

@roccoren
roccoren / get-subscriptions-creation-time.sh
Last active August 10, 2023 08:47
get-subscriptions-creation-time
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 subscription-id-1 subscription-id-2 ..."
exit 1
fi
subscription_ids=("$@")
get_subscription_creation_time() {

Enable bbr on Ubuntu 16.04

  1. Make sure kernel version is 4.9 or newer:

    uname -r

    Install Hardware Enablement Stack (HWE) to update kernel automaticly:

curl -L https://www.atom.io/api/updates/download -A "Atom/0.1 CFNetwork/1.5" > Atom.zip
unzip Atom.zip
mv Atom.app /Applications/
@roccoren
roccoren / RemoveVMs
Created October 7, 2013 16:19
Bluk Remove Windows Azure VMs.
$vm = Get-AzureService -ServiceName "PECVM3" | Get-AzureVM
foreach ($AzureVM in $vm)
{Remove-AzureVM -Name $AzureVM.Name -ServiceName $AzureVM.ServiceName}
@roccoren
roccoren / AddDomain
Last active December 24, 2015 19:39
Change IP and Add to Domain
$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'"
$wmi.SetDNSServerSearchOrder("10.10.0.3")
$computerName = Get-WmiObject Win32_ComputerSystem
$name = "TFSSQL"
$computername.Rename($name)
Add-Computer -Domain "pec.com" -Credential PEC\RoccoRen
Restart-Computer