Skip to content

Instantly share code, notes, and snippets.

View full-sized avatar

Rohan rohan-molloy

View GitHub Profile
rohan-molloy /
Created August 15, 2022 09:24
How to stop teams starting at logon

Disable Teams Autostart

  1. Create the file C:\Windows\System32\GroupPolicy\User\Scripts\Logon\disableteams.cmd with the following contents
%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe -File %WINDIR%\System32\GroupPolicy\User\Scripts\Logon\disableteams.ps1
  1. Create the file C:\Windows\System32\GroupPolicy\User\Scripts\Logon\disableteams.ps1 with the following contents
$entry = $null -eq (Get-ItemProperty HKCU:\Software\Microsoft\Windows\CurrentVersion\Run)."com.squirrel.Teams.Teams"
if ( !$entry ) {
# Variables
# Create the network namespace
echo "Creating ${NETNS}" 1>&2
rohan-molloy /
Created May 13, 2022 08:08
Download standalone docker cli
export DOCKERVERSION=20.10.5
curl -fsSLO${DOCKERVERSION}.tgz \
&& tar xzvf docker-${DOCKERVERSION}.tgz --strip 1 \
-C /usr/local/bin docker/docker \
&& rm docker-${DOCKERVERSION}.tgz
rohan-molloy / Install Windows from command
Created April 30, 2022 04:59
Install windows from the command line
View Install Windows from command
rohan-molloy / Install Vmware Kernel Modules on
Created March 23, 2022 07:20
Install Vmware Kernel Modules on
View Install Vmware Kernel Modules on
View init.vim
call plug#begin()
Plug 'elzr/vim-json' " For metadata.json
Plug 'mrk21/yaml-vim' " For hieradata
"Plug 'neoclide/coc.nvim', {'do': { -> coc#util#install()}} " Language Server support
Plug 'rodjek/vim-puppet' " For Puppet syntax highlighting
Plug 'vim-ruby/vim-ruby' " For Facts, Ruby functions, and custom providers
Plug 'vimwiki/vimwiki'
Plug 'airblade/vim-gitgutter'
Plug 'ryanoasis/vim-devicons'
rohan-molloy / randomIPv6.js
Created August 21, 2021 05:10
generate a random ipv6 address
View randomIPv6.js
// Generate a Random Mac
function randomMac() {
return "XX:XX:XX:XX:XX:XX".replace(/X/g, function() {
return "0123456789ABCDEF".charAt(Math.floor(Math.random() * 16))
// Generate IPv6 EUI64
rohan-molloy /
Created September 17, 2020 10:15
How to Convert Qemu images to VMWare

How to Convert Qemu images to VMWare

qemu-img convert \
         -f $INPUT_FORMAT \
         -O $OUTPUT_FORMAT \

For example qemu-img convert -f qcow2 -O vmdk esxi.qcow2 esxi.vmdk

#! /bin/bash
# Set the country code (in lower case)
# Create the ipset
ipset create allowed_country hash:net
# Load the country set
wget -qO- "$cc.netset" | grep -v ^# | xargs -n1 ipset add allowed_country