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
| function isAnyPartOutsideViewPort($element) { //THIS SHOULD BE LIB FUNCTION | |
| var element = $element[0]; | |
| var rect = element.getBoundingClientRect(); | |
| return rect.top <= 0 || | |
| rect.left <= 0 || | |
| rect.bottom >= $(window).height() || | |
| rect.right >= $(window).width(); | |
| } |
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
| public class DataMapperTests | |
| { | |
| [TestFixture] | |
| public class WhenMap | |
| { | |
| internal class Source | |
| { | |
| public int id { get; set; } | |
| } |
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
| public static class StopwatchUtil | |
| { | |
| public class StopwatchRecord | |
| { | |
| public DateTime StartTime { get; set; } | |
| public string ActionName { get; set; } | |
| public TimeSpan Elapsed { get; set; } | |
| public override string ToString() | |
| { | |
| return string.Format("{0} - {1}: {2}", StartTime.ToShortDateString(), ActionName, Elapsed.ToString(@"hh'h'mm'm'ss's.'fffffff'ms'")); |
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
| $source = "C:\Scripts" | |
| $archiveDestination = "C:\ScriptsArchive" | |
| $type = "ps1" | |
| $offsiteDrive = "M" | |
| #Create mapping if missing | |
| .\Map-Azure.ps1 -DriveLetter "$offsiteDrive" -StorageKey "[storage key]" | |
| #Copy files to Archive |
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
| param ( | |
| [string] $dir | |
| ) | |
| cd $dir | |
| Get-ChildItem -File | Remove-Item | |
| Get-ChildItem -Directory | ForEach-Object { C:\Scripts\Delete-Recursive "$(Get-Location)\$_" } |
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
| This is a set of sysadmin scripts I've found useful in sql |
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
| HttpContext.Current = new HttpContext(new HttpRequest(null, "http://someurl", null), new HttpResponse(new StringWriter())); |
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
| function log { | |
| param([string] $message, [bool] $isOutput = $true) | |
| $logDate = (get-date).ToUniversalTime() | |
| $logFormatted = $logDate.ToString("yyyy-MM-dd HHmmss zzz") | |
| if($isOutput) { | |
| write-output "$($logFormatted): $message" | |
| } | |
| else { | |
| write-host "$($logFormatted): $message" |
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
| //eyy | |
| //https://jsfiddle.net/r479tc2n/101/ |