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
$ServerName = $args[0] | |
if ($serverName -eq $Null) { | |
$serverName= $env:COMPUTERNAME | |
} | |
$timeVal = (Get-WmiObject -ComputerName $ServerName -Query "SELECT LastBootUpTime FROM Win32_OperatingSystem").LastBootUpTime | |
#$timeVal | |
$DbPoint = [char]58 | |
$Years = $timeVal.substring(0,4) | |
$Months = $timeVal.substring(4,2) | |
$Days = $timeVal.substring(6,2) |
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
Show hidden characters
{ | |
"installed_packages": | |
[ | |
"AngularJS", | |
"Enhanced Clojure", | |
"FileBrowser", | |
"Git", | |
"Highlight Whitespaces", | |
"HTML5", | |
"Jasmine BDD", |
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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Threading.Tasks; | |
namespace Tests | |
{ | |
public class CurrentThreadTaskScheduler : TaskScheduler | |
{ | |
protected override void QueueTask(Task task) |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
/// <summary> | |
/// NullTask is a task that does nothing in Null Object Pattern fashion | |
/// </summary> | |
public class NullTask : Task | |
{ | |
public NullTask() : base(() => { }) { } | |
} |
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
# adapted from http://notes.jimlindley.com/2008/3/25/git-svn-that-works-for-me | |
# initial slow setup (this will scan all of the base svn repo's history, and could take hours) | |
# - Change <svn_repo> to the base url of your svn repo, WITHOUT trunk at the end | |
# this will point master to /trunk and allow you to point git branches to svn branches | |
git svn clone <svn_repo> --stdlayout | |
# initial quick clone setup | |
# - Change $REV to the first revision of your repo, i.e. 24903 | |
# - Change <svn_repo> to the base url of your svn repo, WITHOUT trunk at the end |
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
dynamic cutRuleParameters = new ExpandoObject(); | |
cutRuleParameters.ToList = (Func<List<CutRuleParameterViewModel>>)(() => | |
new List<CutRuleParameterViewModel> { | |
new CutRuleParameterViewModel { ParamId = 77, IsDynamic = 'Y' , UIParamCode = "MedianRounding", ParamName = "MedianRounding" , ParamValue = "5000", ParamCode = "MedianRounding" }, | |
new CutRuleParameterViewModel { ParamId = 78, ParamName = "Rounding Direction", IsDynamic = 'Y' , UIParamCode = "RoundDirection", ParamCode = "RoundingDir" } | |
}); |
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
[HttpPost] | |
public ActionResult Edit(DonorViewModel model) | |
{ | |
try | |
{ | |
var donor = db.Donors.Get(model.Donor_ID); | |
model.CreatedOn = donor.CreatedOn; | |
model.DonorType_ID = donor.DonorType_ID; | |
model.ModifiedOn = DateTime.Now; |
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
phantom.casperPath = 'D:\\Dev\\Tools\\casperjs'; | |
phantom.injectJs(phantom.casperPath + '\\bin\\bootstrap.js'); | |
var casper = require("casper").create({ | |
logLevel: "debug" | |
}); | |
var utils = require('clientutils').create(); | |
casper.start("http://localhost:52125/ED/stockresearch/StockResearch", function() { |
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 static string ToBeTrim(this string givenString) | |
{ | |
if (!string.IsNullOrEmpty(givenString)) | |
return givenString.Trim(); | |
return string.Empty; | |
} |
NewerOlder