This file contains hidden or 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
trait FancyTrait { | |
def withContext(method: => () => Unit) = { | |
// define some context here, like: | |
val sender = this.sender | |
// run the method which can see the context | |
method() | |
} | |
} |
This file contains hidden or 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
# 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 |
NewerOlder