Skip to content

Instantly share code, notes, and snippets.

View metalcated's full-sized avatar
💭
I may be slow to respond.

metalcated metalcated

💭
I may be slow to respond.
View GitHub Profile
@metalcated
metalcated / Tail.reg
Created June 13, 2022 17:17 — forked from lordmilko/Tail.reg
Tail Context Menu Item - Right click text files to tail them!
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Classes\txtfile\shell\Tail]
[HKEY_CURRENT_USER\SOFTWARE\Classes\txtfile\shell\Tail\command]
@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" -noexit -command \"function tail($path) {$host.ui.RawUI.WindowTitle = $path; gc $path -tail 10 -wait} tail\" \"'%1'\""
- name: "Create OS Windows Server 2016"
theforeman.foreman.foreman_operatingsystem:
server_url: http://foreman.example.org/xxx
username: admin
password: xxxx
name: windows_2016
release_name: windows_2016
family: Windows
os_family: windows
media: Windows
@metalcated
metalcated / README.md
Created February 10, 2020 16:27 — forked from aheadley/README.md
Some scripts to help with turning a CentOS 7 VM into a template in Proxmox

EL7 VM Templatization for Proxmox

Description

These are some handy tools to turn a VM into a template, so that creating a new VM is as simple as (full) clone and boot. There are several assumptions made that may not necessarily match with anyone else's environment:

  • CentOS 7 minimal install (will probably work on any flavor of EL7)
  • DHCP server available
  • rootfs (/) is on the last partition of the primary disk, and is a primary partition
  • a centos user exists on the VM (this is not a hard requirement, nothing bad will happen if it's not true)

Installing SSHPASS

SSHPass is a tiny utility, which allows you to provide the ssh password without using the prompt. This will very helpful for scripting. SSHPass is not good to use in multi-user environment. If you use SSHPass on your development machine, it don't do anything evil.

Installing on Ubuntu

apt-get install sshpass

Installing on OS X

@metalcated
metalcated / Rename.ps1
Last active August 29, 2015 14:24 — forked from timnew/Rename.ps1
$ComputerName = "New Name"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname"
Remove-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "NV Hostname"
New-PSDrive -name HKU -PSProvider "Registry" -Root "HKEY_USERS"
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\Computername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Control\Computername\ActiveComputername" -name "Computername" -value $ComputerName
Set-ItemProperty -path "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters" -name "Hostname" -value $ComputerName