Skip to content

Instantly share code, notes, and snippets.

@jpluimers
jpluimers / Personal Windows 10 customization script.bat
Created December 2, 2022 20:41 — forked from ScribbleGhost/Personal Windows 10 customization script.bat
A personal collection of Windows 10 customizations. Run as admin. Has to be run as a batch file, not in CMD.
REM ----------------------------------------------------------------------------------------------------------
REM ### Apps and app suggestions
REM ----------------------------------------------------------------------------------------------------------
REM TITLE: Turn Off Automatic Installation of Suggested Apps in Windows 10
REM LINK: https://www.tenforums.com/tutorials/68217-turn-off-automatic-installation-suggested-apps-windows-10-a.html
REM OPTIONS: 0x00000001=On, 0x00000000=Off
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /V "SilentInstalledAppsEnabled" /T "REG_DWORD" /D "0x00000000" /F 1>NUL 2>&1
@jpluimers
jpluimers / bookmarklet.js
Created October 3, 2022 10:16 — forked from elidupuis/bookmarklet.js
How to create a bookmarklet with an external js file.
// use this code as your href attribute on your 'Install this bookmarklet' anchor tag.
// borrowed from http://net.tutsplus.com/tutorials/javascript-ajax/create-bookmarklets-the-right-way/
javascript:(function(){var jsCode = document.createElement('script');jsCode.setAttribute('src', 'http://example.com/path/to/file.js');document.body.appendChild(jsCode);}());
@jpluimers
jpluimers / clonevm.sh
Created April 17, 2022 09:23
VMware ESXi – Script to clone a VM without vSphere or vCenter. Original: https://grangerx.wordpress.com/2020/09/23/vmware-esxi-script-to-clone-a-vm/
#!/bin/sh
#File: clonevm.sh
#Version: 2020.09.23.A
#Author: www.grangerx.com
#Set debug = true to enable debug echoes.
debug=false
#For format: accepts same, zeroedthick, eagerzeroedthick, thin, rdm:dev, rdmp:dev, or 2gbsparse.
format="thin"
@jpluimers
jpluimers / vm-rename.sh
Last active December 15, 2022 18:08 — forked from Gremgoll/vm-rename
Script to rename a virtual machine in ESXi 6
#!/bin/sh
#
# shell script to rename a virtual machine in ESXi
#set -x
if [ $# -ne 4 ]; then
echo "Usage: $0 VOLNAME DIRNAME OLDNAME NEWNAME
where VOLNAME is the volume name, e.g. datastore1,
DIRNAME is the the name of the directory of the virtual machine,
@allanger
allanger / Deploy_Kubernetes.md
Last active July 2, 2024 06:58
Deploy Kubernetes with Ansible

Deploy Kubernetes with Ansible

Requirements

We will need at least two nodes, Ansible, and a kubectl. That's enough to begin.

My ansible role: https://github.com/allanger/kubeadm-ansible-role

I am using Ubuntu 21.04 on all my servers so my Ansible role is written for Debian-based distros. (I will be happy if anybody adds support for other distros)

Preparing system

#!/bin/sh
######################################################################################
# Create a clone of a running machine on ESXi, without vCenter services available
# Disable networkcards on connecting at startup
# Start the cloned VM
#
# Created by : Jeroen van Schelt
# Creation date : jan 2015
@jpluimers
jpluimers / delimited vim-cmd help for each vmsvc command.txt
Created April 7, 2021 17:24
Delimited `vim-cmd help` for each `vmsvc` command
-----
help for vim-cmd help vmsvc/acquiremksticket
Usage: acquiremksticket vmid
Acquire mks ticket.
-----
help for vim-cmd help vmsvc/acquireticket
import argparse
import atexit
import getpass
import time
from pyVim import connect
from pyVmomi import vim
def get_args():
@AdamEldred
AdamEldred / netbox_import.py
Last active December 28, 2021 16:14 — forked from rlaneyjr/netbox_import.py
Import the devicetype-library into NetBox
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: noai:et:tw=80:ts=4:ss=4:sts=4:sw=4:ft=python
'''
Title: netbox_import.py
Description: Insert records from devicetype-library into NetBox
Author: Ricky Laney
Version: 0.1.5
==============================================================================
@jamesmishra
jamesmishra / README.md
Last active March 25, 2024 20:02
Using Terraform to run a docker-compose.yml file directly on an Amazon EC2

Introduction

This is a Hashicorp Terraform module that provisions an AWS EC2 instance for the purpose of running a given docker-compose.yml file.

Usage

# ===== OUR MAGIC DOCKER-COMPOSE.YML FILE HERE =====
# It is also possible to get Terraform to read an external `docker-compose.yml`
# file and load it into this variable.
# We'll be showing off a demo nginx page.