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
;config.ini | |
[Network] | |
DataFeed=http://mydomain.com/feed.xml | |
Port=68 | |
NextUpdate=3/23/2009 9:11:48 PM | |
You can load it: | |
var configurationSource = new IniConfigurationSource("config.ini"); | |
var datafeed = configurationSource.Sections["Network"].Get<string>("DataFeed"); |
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
PS C:\Development\PowerStudio> set-executionpolicy default | |
Execution Policy Change | |
The execution policy helps protect you from scripts that you do not trust. Changing the execution | |
policy might expose you to the security risks described in the about_Execution_Policies help topic. | |
Do you want to change the execution policy? | |
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): Y | |
PS C:\Development\PowerStudio> type .\test.ps1 | |
gci | |
PS C:\Development\PowerStudio> .\test.ps1 |
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
#region Using Directives | |
using System.Threading; | |
#endregion | |
namespace ObjectExtensions.Tests | |
{ | |
public class Person | |
{ |
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
// Variable names have been changed to protect the guilty. Class and method names are real. | |
//If have the values, set foo and bar | |
if (!false) | |
{ | |
CommonFunctions.SetFieldValue(row, "foo", foo); | |
} | |
if (!false) | |
{ |
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
var codingMusic = from music in AllMusic | |
where !music.ContainsGrowling | |
where ( !music.IsInEnglish || music.HasNoLyrics ) | |
where music.Genres.Contains( "Metal", "FolkMetal" ) | |
where HasTalent( music.Artist ) | |
select music; |
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
// pulls the values from the configuration file | |
// you can have a separate config file per env | |
// Environment is a value set in the config file that ConfigurationBase uses to determine default values with the Default() method. | |
public class ServicesConfig : ConfigurationBase | |
{ | |
public Uri WebServer | |
{ | |
get { return Get(()=> WebServer, Default("DevDefault", "TestDefault", "ProdDefault")); } | |
} |
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
function Get-XADUserPasswordExpirationDate { | |
param ([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true, HelpMessage="Identity of the Account")] | |
$accountIdentity) | |
$accountObj = Get-ADUser $accountIdentity -properties PasswordExpired, PasswordNeverExpires, PasswordLastSet | |
if ($accountObj.PasswordExpired) { | |
Write-Host ("Password of account: $($accountObj.Name) already expired!") | |
return | |
} |
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
public void Sample() | |
{ | |
for ( int i = 0; i < 100; i++ ) | |
{ | |
Console.WriteLine(Locator.GetLocationNear()); | |
} | |
} | |
using System; |
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 'autotest/growl' | |
require 'autotest/fsevent' if RUBY_PLATFORM =~ /darwin/ |
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
<?xml version="1.0"?> | |
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | |
<metadata xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd"> | |
<id>Issue1949</id> | |
<version>0.2.2</version> | |
<authors>Ian Davis</authors> | |
<requireLicenseAcceptance>true</requireLicenseAcceptance> | |
<licenseUrl>https://raw.github.com/idavis/Toji/master/LICENSE.txt</licenseUrl> | |
<description>Toji is a bootstrapping project for setting up psake builds.</description> | |
<summary>Custom brewed psake goodness</summary> |