$ sudo apt-get install unattended-upgrades
$ sudo nano /etc/apt/apt.conf.d/10periodic
<# | |
Shamelessly liberated from http://foxdeploy.com/2015/02/11/automatically-delete-old-iis-logs-w-powershell/ | |
Because it was better than my own. | |
#> | |
$LogPath = "C:\inetpub\logs" | |
$maxDaystoKeep = -30 | |
$outputPath = "c:\CleanupTask\Cleanup_Old_logs.log" | |
$itemsToDelete = dir $LogPath -Recurse -File *.log | Where LastWriteTime -lt ((get-date).AddDays($maxDaystoKeep)) |
Follow [steps][1]:
Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:\scratch\vmx\VM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination c:\vm-disk1
#!/usr/bin/env python3 | |
""" | |
License: MIT License | |
Copyright (c) 2023 Miel Donkers | |
Very simple HTTP server in python for logging requests | |
Usage:: | |
./server.py [<port>] | |
""" | |
from http.server import BaseHTTPRequestHandler, HTTPServer |
It's great for beginners. Then it turns into a mess.
mkdir -p ~/.config && touch ~/.config/ssh-agent.pid
ssh-agent-manage.sh
into your .bashrc
or .bash_profile
or similarkillall -9 ssh-agent
This snippet, when included in .bashrc
, will ensure that your session has a working ssh-agent
with all your ssh keys loaded into it. It does this without creating separate ssh-agent
processes by: