Skip to content

Instantly share code, notes, and snippets.

public function DoSomething()
{
try
{
Stuff();
}
catch (IScrewedUpException ex)
{
}
catch (WheresMyBeerException ex)
private System.Collections.ObjectModel.ObservableCollection<MatchResultLineItem> _matchResults;
public System.Collections.ObjectModel.ObservableCollection<MatchResultLineItem> MatchResults
{
get { return _matchResults; }
set
{
if (Object.Equals(_matchResults, value) == false)
{
_matchResults = value;
OnPropertyChanged(() => MatchResults);
# Allow reboots
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false
$Boxstarter.AutoLogin=$true
# Basic setup
Update-ExecutionPolicy Unrestricted
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Disable-InternetExplorerESC
#The user/password isn't applied when the resource is written like this:
iis_pool 'Creating the AppPool' do
pool_name "MyAppPool"
runtime_version "4.0"
pipeline_mode :Integrated
pool_username "SomeUser"
pool_password "SomePW"
action [:add]
end
@mdw233
mdw233 / jQuery.titleAlternator
Created July 30, 2012 21:14
jQuery.titleAlternator
/*
Author: Matt Withum
Manages the page title, including swapping the title text.
Notes:
*/
;(function ($) {
Type type = typeof(Foo);
foreach ( var property in type.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly)) {
var getMethod = property.GetGetMethod(false);
if (getMethod.GetBaseDefinition() == getMethod) {
Console.WriteLine(getMethod);
}
}