Skip to content

Instantly share code, notes, and snippets.

View ReubenBond's full-sized avatar
🧊

Reuben Bond ReubenBond

🧊
View GitHub Profile
trait FancyTrait {
def withContext(method: => () => Unit) = {
// define some context here, like:
val sender = this.sender
// run the method which can see the context
method()
}
}
@ReubenBond
ReubenBond / Disable-AutomaticallyDetectSettings.ps1
Created November 23, 2011 01:04
Disable 'Automatically detect settings' in Internet Explorer's proxy settings dialog.
# Disable 'Automatically detect proxy settings' in Internet Explorer.
function Disable-AutomaticallyDetectProxySettings
{
# Read connection settings from Internet Explorer.
$regKeyPath = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Connections\"
$conSet = $(Get-ItemProperty $regKeyPath).DefaultConnectionSettings
# Index into DefaultConnectionSettings where the relevant flag resides.
$flagIndex = 8