When running the apt-get update
command, the process 'hangs' when checking security.ubuntu.com
endpoints.
This is apparantely due to an issue some sites face when trying to connect over IPv6 and whilst it is assumed that this will be
fixed at some point in the future (sooner rather than later judging by the transition to IPv6 by most), the fix below resolves
this issue, allowing the update process to complete successfully.
Function TimedPrompt($prompt,$secondsToWait){ | |
Write-Host -NoNewline $prompt | |
$secondsCounter = 0 | |
$subCounter = 0 | |
While ( (!$host.ui.rawui.KeyAvailable) -and ($count -lt $secondsToWait) ){ | |
start-sleep -m 10 | |
$subCounter = $subCounter + 10 | |
if($subCounter -eq 1000) | |
{ | |
$secondsCounter++ |
# Compare-Directory.ps1 | |
# Compare files in one or more directories and return file difference results | |
# Victor Vogelpoel <victor@victorvogelpoel.nl> | |
# Sept 2013 | |
# | |
# Disclaimer | |
# This script is provided AS IS without warranty of any kind. I disclaim all implied warranties including, without limitation, | |
# any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or | |
# performance of the sample scripts and documentation remains with you. In no event shall I be liable for any damages whatsoever | |
# (including, without limitation, damages for loss of business profits, business interruption, loss of business information, |
# Treat all files in this project as binary. This enables atomic | |
# checkins (no merges, these are signed files) and it preserves | |
# CRLF line endings | |
* binary |
# | |
# File: Get-HelpByMarkdown.ps1 | |
# | |
# Author: Akira Sugiura (urasandesu@gmail.com) | |
# | |
# | |
# Copyright (c) 2014 Akira Sugiura | |
# | |
# This software is MIT License. | |
# |
<# | |
.SYNOPSIS | |
Converts files to the given encoding. | |
Matches the include pattern recursively under the given path. | |
.EXAMPLE | |
Convert-FileEncoding -Include *.js -Path scripts -Encoding UTF8 | |
#> | |
function Convert-FileEncoding([string]$Include, [string]$Path, [string]$Encoding='UTF8') { | |
$count = 0 |
This script can help you find and remove unused AWS snapshots and volumes.
There is hardcoded list of regions that it searches, adjust the value to suit your needs.
Use snapshot.py snapshot-report
to generate report.csv
containing information about all snapshots.
snapshot.py snapshot-cleanup
lets you interactively delete snapshot if it finds it is referencing unexisting resources.
./snapshots.py --help
Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac