Skip to content

Instantly share code, notes, and snippets.

@tuksik
tuksik / README.md
Created September 28, 2017 13:15 — forked from tknerr/README.md
Vagrant with Ansible Provisioner on Windows

Vagrant with Ansible Provisioner on Windows

Long story short, ansible does not work on a Windows control machine, so you basically have to:

  • either run ansible --connection=local ... in the target vm
  • set up a separate control vm where ansible is installed via shell provisioner

Below are Vagrantfile examples for both approaches

Within the Target VM

@tuksik
tuksik / Autounattend.xml
Created September 27, 2017 11:12 — forked from sneal/Autounattend.xml
Windows Server 2012 R2 Autounattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
@tuksik
tuksik / github-pandoc.css
Created July 26, 2017 11:19 — forked from dashed/github-pandoc.css
GitHub-like CSS for pandoc standalone HTML files (perfect for HTML5 output). Based on Marked.app's GitHub CSS. Added normalize.css (v2.1.3) in the prior to GitHub css.
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
/* ==========================================================================
HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined in IE 8/9.
*/
@tuksik
tuksik / Docker-find-dependent-child-image.md
Created April 20, 2017 07:47 — forked from Siva-Charan/Docker-find-dependent-child-image.md
Docker: How to find the dependent child images?

Find the dependent child images on Docker

When you try to remove the docker image with the following command

docker rmi 6795374be8c1

Sometimes you might be facing below error:

Error response from daemon: conflict: unable to delete 6795374be8c1 (cannot be forced) - image has dependent child images

Below is the Docker command line used to find the dependent child images

@tuksik
tuksik / lambda_Snapshots.py
Created November 22, 2016 20:57
lambda_Snapshots Example
import boto3
import datetime
ec2 = boto3.resource('ec2')
def lambda_handler(event,handler):
print("nnAWS Snapshots starting at %s" % datetime.datetime.now())
instances = ec2.instances.filter(Filters=[
{'Name': 'instance-state-name', 'Values': ['running']}
])
@tuksik
tuksik / lambdaAMIBackups.py
Created November 21, 2016 14:34 — forked from bkozora/lambdaAMIBackups.py
AWS Lambda AMI Backups
# Automated AMI Backups
#
# @author Robert Kozora <robert.kozora@wheaton.com>
#
# This script will search for all instances having a tag with "Backup" or "backup"
# on it. As soon as we have the instances list, we loop through each instance
# and create an AMI of it. Also, it will look for a "Retention" tag key which
# will be used as a retention policy number in days. If there is no tag with
# that name, it will use a 7 days default value for each AMI.
#
## _includes/image.html
<div class="image-wrapper" >
{% if include.url %}
<a href="{{ include.url }}" title="{{ include.title }}" target="_blank">
{% endif %}
<img src="{{ site.url }}/{{ include.img }}" alt="{{ include.title }}"/>
{% if include.url %}
</a>
{% endif %}
{% if include.caption %}
@tuksik
tuksik / haproxy.cfg
Created April 30, 2016 18:14 — forked from thisismitch/haproxy.cfg
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@tuksik
tuksik / windowsnetworking.bat
Created January 28, 2016 06:26 — forked from alexandrinos/windowsnetworking.bat
Windows - Firewall / PortForwarding / Network
# ------------------ NETSH ---------------
#
#for help: $ netsh /?
#NETSTAT
#
#usefull
netstat -bn