Skip to content

Instantly share code, notes, and snippets.

View john-clark's full-sized avatar
🛸
Out there

John Clark john-clark

🛸
Out there
View GitHub Profile
var Cleaner = {
run: function(from, to, interval) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var iter = new Enumerator(from.files);
var ATTR_HIDDEN = 2;
var ATTR_ALIAS = 64;
// WScript.Echo(recycle);
var now = new Date();
var limit = new Date();
limit.setTime(now.getTime() - interval * 24 * 60 * 60 * 1000);
@RadAd
RadAd / Steam Launcher
Last active August 3, 2022 04:52
Mini steam grid launcher
A launcher for your steam games.
@altrive
altrive / CreateNanoServerVHD.ps1
Last active October 11, 2016 16:10
Create Nano Server VHDX file from WIM
#Requires -RunAsAdministrator
#Requires -Version 3.0
#References:
#Getting Started with Nano Server <https://technet.microsoft.com/en-us/library/mt126167.aspx>
#Quick Guide - Deploying Nano Server using PowerShell <http://deploymentresearch.com/Research/Post/479/Quick-Guide-Deploying-Nano-Server-using-PowerShell>
param (
#[ValidateScript({ Test-Path $_ })]
$ConvertWindowsImageScriptPath = 'D:\work\NanoServerSetup\Convert-WindowsImage.ps1'
@thoroc
thoroc / Debloat-Windows10.ps1
Created August 18, 2015 14:46
Windows 10 PowerShell script to disable E.T. features ....
<#
NAME
Debloat-Windows10.ps1
DESCRIPTION
Debloats and customizes Windows 10 Enterprise N LTSB.
It changes your privacy options in the settings app and disables scheduled tasks and services that are there
to gather information about you. It also tweaks the registry to customize settings, make your font display properly
on DPI scaling 125% and disable OneDrive completely. Windows Features are also disabled, such as Internet Explorer
and XPS Viewer, while others are enabled such as .NET framework 3.5. On top of it all, it appends new lines to your
hosts file that block Microsoft from collecting data on you, as well as enables or disables local policies to
@LordJZ
LordJZ / Windows 10.bat
Created August 24, 2015 17:37
Windows 10 tweaks
sc delete DiagTrack
sc delete dmwappushservice
sc config diagnosticshub.standardcollector.service start= disabled
sc config WMPNetworkSvc start= disabled
sc config AdobeARMservice start= disabled
schtasks /Change /DISABLE /TN "Adobe Acrobat Update Task"
@jhochwald
jhochwald / Office2016_TelemetrySettings.ps1
Created November 26, 2016 14:26
Disable Office Telemetry Agent and other data collection and Block Macros in files downloaded from the Internet.
#requires -Version 1.0
<#
.SYNOPSIS
Disable Office Telemetry Agent and other data collection
.DESCRIPTION
Disable Office Telemetry Agent and other data collection and Block Macros in files downloaded from the Internet.
Makes Office less spying on us...
@JonnyTech
JonnyTech / win10_privacy.ps1
Created December 14, 2016 13:49
Windows 10: Powershell Script to protect your privacy
###############################################################################
#
# Script to enhance your Privacy on Windows 10
# New-ItemProperty is used to set registry values, therefore the "if exist"
# operation is not requiered <img src="https://s.w.org/images/core/emoji/72x72/1f642.png" alt="🙂" class="emoji" draggable="false">
#
# created 16.12.2015 Michael Albert info@michlstechblog.info
#
# changes:
# 1.0.1 Init release
@Informatic
Informatic / domain.xml
Last active May 28, 2024 11:44
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@mrpeardotnet
mrpeardotnet / PVE-host-backup.md
Created December 17, 2019 18:03
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@aw
aw / explain.md
Last active April 28, 2024 10:05
[SOLVED] Proxmox VE and cloud-init snippets etc

Proxmox VE 6.x release includes a feature to add custom cloud-init configs. Unfortunately there is poor documentation, so I had to figure this out by adding pieces of information together.

The custom cloud-init files (user-data, meta-data, network-config)

The cloud-init files need to be stored in a snippet. This is not very well documented:

  1. Go to Storage View -> Storage -> Add -> Directory
  2. Give it an ID such as snippets, and specify any path on your host such as /snippets
  3. Under Content choose Snippets and de-select Disk image (optional)
  4. Upload (scp/rsync/whatever) your user-data, meta-data, network-config files to your proxmox server in /snippets/snippets/ (the directory should be there if you followed steps 1-3)