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
@echo OFF | |
set tf=C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\TF.exe | |
"%tf%" folderdiff %1 %2 /recursive /filter:!.git/;!node_modules/;!WIP/ |
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
$destinationDirectory = "C:\LocalNuGetTest\" | |
$webClient = New-Object System.Net.WebClient | |
$webClient.Credentials = New-Object System.Net.NetworkCredential("USERNAME", "PASSWORD") | |
$feed =[xml]$webClient.DownloadString("https://hostednugetfeed.com/custom-feed/nuget/v2/Packages") | |
$records = $feed | select -ExpandProperty feed | select -ExpandProperty entry #| select -ExpandProperty content | |
for ($i=0; $i -lt $records.Length; $i++) { | |
$content = $records[$i] | select -ExpandProperty content | |
$properties = $records[$i] | select -ExpandProperty properties |
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
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions | |
function escapeRegExp(str) { | |
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); | |
} | |
function convertWildcardStringToRegExp(expression) { | |
var terms = expression.split('*'); | |
var trailingWildcard = 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
select | |
Today = cast(getdate() as Date), | |
LastMonth = cast((cast(DATEPART(YEAR, GETDATE()) as char(4)) + '-' + cast((DATEPART(MONTH, GETDATE()) - 1) as CHAR(2)) + '-1') as DATE), | |
ThisMonth = CAST((cast(DATEPART(YEAR, GETDATE()) as char(4)) + '-' + cast((DATEPART(MONTH, GETDATE())) as CHAR(2)) + '-1') as DATE) |
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
SELECT DAYOFWEEK(DATE_ADD(DATE('2007-01-07'), INTERVAL ((LOCATE(LEFT(@name, 2), 'SuMoTuWeThFrSa') - 1) / 2) DAY)) AS `DayOfWeek` |
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" encoding="utf-8"?> | |
<Configuration Product="ProPlus"> | |
<Display Level="basic" CompletionNotice="no" SuppressModal="yes" NoCancel="yes" AcceptEula="yes" /> | |
<Setting Id="SETUP_REBOOT" Value="NEVER" /> | |
</Configuration> |
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; | |
using System.IO; | |
using System.Reflection; | |
using System.Web; | |
class Project | |
{ | |
public static string GetRootDirectory() | |
{ | |
var webCtx = HttpContext.Current; |
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
# https://support.microsoft.com/en-us/kb/950683 | |
# These temporary files are erroneously generated by the installer into the | |
# root directory of one of your drives, instead of the temp directory. | |
# Possible causes: | |
# * WinMerge - http://forums.winmerge.org/viewtopic.php?f=4&t=1002 | |
$identity = [Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent() | |
if (!$identity.IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
throw "This script must be run as administrator." |
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 handleEvent(e) { | |
// NOTE: The use of 'parentNode' is important b/c the document is not returned by | |
// parentElement (because it's outside of the HTML and isn't a real element). | |
// http://www.w3schools.com/jsref/prop_node_parentelement.asp | |
var targetDocument = e.target.parentElement.parentNode; | |
// Document property 'defaultView' is supported in IE9+. | |
// https://developer.mozilla.org/en-US/docs/Web/API/Document/defaultView | |
// Alternative that is not as well supported: `e.view` -> https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/view | |
var targetWindow = targetDocument.defaultView; |
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
# http://boxstarter.org/Weblauncher | |
# https://gist.github.com/racingcow/3e099ee7dc4ad3e4c8ae | |
# Windows customization/settings | |
# ============================== | |
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
if (Test-PendingReboot) { Invoke-Reboot } |
NewerOlder