Skip to content

Instantly share code, notes, and snippets.

@danielscholl
danielscholl / ieESC_disable
Created March 20, 2017 14:19
Disable IE Enhance Security PowerShell
function Disable-ieESC {
$AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}"
$UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}"
Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0
Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0
Stop-Process -Name Explorer
Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green
}
Disable-ieESC
@danielscholl
danielscholl / certgen.rb
Created March 24, 2017 13:33
Generate Certificates for Docker
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@danielscholl
danielscholl / MacPowerShellInstall.ps1
Created April 13, 2017 23:32
Install AzureRM for Mac Powershell
Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2/ -ProviderName NuGet -ExcludeVersion -Destination $home/powershell/modules
Import-Module $home/powershell/modules/AzureRM.Profile.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.Resources.NetCore.Preview
Import-Module $home/powershell/modules/AzureRM.NetCore.Preview
Login-AzureRmAccount
@danielscholl
danielscholl / DevLab.md
Last active May 12, 2017 14:57
Win10 Workstation Install Notes

DevLab Install Notes

Ubuntu Machine Setup

$ sudo apt-get -y install apt-transport-https ca-certificates curl
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable"
$ sudo apt-get update
#DOCKER
alias dpst='watch -n 3 "docker ps"'
alias dps='docker ps -a'
alias dclean='docker rm -v $(docker ps -a -q -f status=exited)'
alias rmc='docker ps -q -a | xargs docker rm -f'
alias rmi='docker images -q | xargs docker rmi -f'
alias d='docker $@'
alias registry-stop='docker rm -f registry'
alias registry-web='docker run -d -p 8000:80 --name registry-web --link registry -e ENV_DOCKER_REGISTRY_HOST=registry
-e ENV_DOCKER_REGISTRY_PORT=5000 konradkleine/docker-registry-frontend:v2'
@danielscholl
danielscholl / lbruleset.sh
Created April 21, 2017 22:07
Azure CLI 2.0 Load Balance Rule Set Addition (Simple)
#!/bin/bash
#set -o errexit -o pipefail
RESOURCE_GROUP=<your_resource_group>
if [[ ! $1 ]]; then
echo "\$1 Protocol Argument Required"
exit 1
fi
#!/bin/bash
if [[ ! $1 ]]; then
echo "\$1 Argument required for Virtual Machine Name"
exit 1
fi
VM=$1
GROUP=$1
@danielscholl
danielscholl / urlparser
Created June 10, 2017 22:39
URL Function Parser
module.exports = function (context, data) {
var parsedForm = parseQuery(data.form);
context.log(parsedForm);
context.res = {
body: parsedForm
}
context.done();
};
RESOURCE_GROUP=linux-group
LOCATION=southcentralus
IMG=UbuntuLTS
SIZE=Standard_DS1_v2
VNET=linux-group-vnet
ADDRESS_RANGE=10.10.0.0/16
SUBNET=Nodes
SUBNET_RANGE=10.10.0.0/24
LB=linux-group-lb
NSG=linux-group-vm-nsg
@danielscholl
danielscholl / jenkins.yml
Created September 18, 2017 18:11
Cloud Init for Jenkins
#cloud-config
package_upgrade: true
write_files:
- path: /etc/systemd/system/docker.service.d/docker.conf
content: |
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd
- path: /etc/docker/daemon.json
content: |