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
| var _sendEmail = true; | |
| function debugGoalStatus() { | |
| _sendEmail = false; | |
| sendGoalStatus(); | |
| } | |
| function sendGoalStatus() { | |
| // TODO: (Nice to have) Only send jubel-email if not already sent! | |
| var events = getEvents(); |
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 QueryStringRouting : RouteBase | |
| { | |
| public override RouteData GetRouteData(HttpContextBase httpContext) | |
| { | |
| NameValueCollection queryString = httpContext.Request.QueryString; | |
| if (!string.IsNullOrWhiteSpace(queryString["bla"])) | |
| { | |
| //add your logic here based on querystring | |
| var routeData = new RouteData(this, new MvcRouteHandler()); | |
| routeData.Values.Add("controller", "Home"); |
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
| private static string GetGravatarUrl( | |
| string email, | |
| int size = 200, | |
| string defaultPicture = null) | |
| { | |
| if (string.IsNullOrWhiteSpace(email)) | |
| return null; | |
| byte[] b1 = Encoding.UTF8.GetBytes(email.Trim().ToLower()); | |
| var provider = new MD5CryptoServiceProvider(); | |
| byte[] hash = provider.ComputeHash(b1); |
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
| $mergeIds = (git log --pretty=format:'%h' --merges) | |
| $mergeCount = $mergeIds.count | |
| $conflictCount = 0 | |
| $totalFileCount = 0 | |
| foreach ($mergeId in $mergeIds) { | |
| $log = (git log $mergeId -n 1) | |
| if ($log -contains " Conflicts:") { | |
| $log | |
| "Conflict: Yes" | |
| $fileCount = $log.count - 8 |
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
| # Input: | |
| $inputFolder = "D:\Projects" | |
| $destinationFolder = "D:\LocalNuGetFeed\" | |
| if (!(Test-Path $destinationFolder)) | |
| { | |
| mkdir $destinationFolder | |
| } | |
| $files = gci $inputFolder -recurse | |
| $packages = $files | where {$_.extension -eq ".nupkg"} |
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
| # My preferred prompt for Powershell. | |
| # Displays git branch (and stats) when inside a git repository. | |
| # See http://gist.github.com/180853 for gitutils.ps1. | |
| . (Resolve-Path D:/Users/ole/Documents/WindowsPowershell/gitutils.ps1) | |
| function prompt { | |
| $userLocation = $env:username + ' ' + $pwd | |
| $host.UI.RawUi.WindowTitle = $userLocation | |
| Write-Host($pwd) -nonewline -foregroundcolor Green |
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
| # Git functions | |
| # Mark Embling (http://www.markembling.info/) | |
| # Is the current directory a git repository/working copy? | |
| function isCurrentDirectoryGitRepository { | |
| if ((Test-Path ".git") -eq $TRUE) { | |
| return $TRUE | |
| } | |
| # Test within parent dirs |