This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: Worst-Case Scenario I should be able to include the command to setup Chocolatey | |
# and the command to setup boxstarter at the top of this script | |
# And then provide a "download and run this script command" | |
# (Get-Host).Version | |
# (Get-WmiObject -Query 'SELECT * FROM Win32_OperatingSystem').Version | |
# Temporary Setup | |
Disable-UAC | |
Disable-MicrosoftUpdate | |
# More Permanent Setup -- https://boxstarter.org/WinConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Login to Azure PowerShell | |
Login-AzureRmAccount | |
# Create the self signed cert | |
$currentDate = Get-Date | |
$endDate = $currentDate.AddYears(1) | |
$notAfter = $endDate.AddYears(1) | |
$pwd = "P@ssW0rd1" | |
$thumb = (New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -DnsName com.foo.bar -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $notAfter).Thumbprint | |
$pwd = ConvertTo-SecureString -String $pwd -Force -AsPlainText |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Credit to SpiralOfHope for bugfix | |
### https://twitter.com/#!/spiralofhope | |
## Credit to Rene Sarsoo for original code | |
### http://stackoverflow.com/users/15982/rene-saarsoo | |
### http://stackoverflow.com/questions/3772864/how-do-i-remove-leading-whitespace-chars-from-ruby-heredoc/4465640#4465640 | |
class String | |
# Bug-fixed: If there is no indenting, this explodes. I changed \s+ to \s* | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'green_shoes' | |
require 'mechanize' | |
begin | |
require 'hpricot' | |
rescue LoadError | |
require File.join(Shoes::DIR, 'ext/hpricot') | |
end | |
include Hpricot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
(($#)) || (echo "Usage: mack PATTERN PATTERN [PATTERN...]"; exit 1) | |
if (($# == 1)); then | |
ack -l "$1" | |
else | |
grep -Ffx <(ack -l "$1") <(shift; mack "$@") | |
fi |