Skip to content

Instantly share code, notes, and snippets.

@armsteadj1
armsteadj1 / RunIISServer.bat
Created April 6, 2017 14:36
Batch to startup an IIS Server
set DATABASE=CI
"C:\Program Files (x86)\IIS Express\iisexpress" /port:8888 /path:%-dp0
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@armsteadj1
armsteadj1 / SVN Externals
Created January 20, 2011 14:13
Properly setting up SVN Externals from terminal
svn propset svn:externals '<folder> <svn:folder>' property 'svn:externals' set on '.'
if (showAliasName && user.Job.Title != null && user.Job.Title.Trim().Length > 0) {
binding.Name = ? (user.AliasName != null
? user.AliasName + " " + user.Job.Title
: user.Name + " " + user.Job.Title)
} else {
binding.Name = "N/A";
}
// For you, what's the ideal conditional structure in this situation?
// Notes:
// Assume user.Job.Title comes from an outside system that we cannot control the format of (thus requiring the Trim)
binding.Name = showAliasName ? (user.AliasName != null && user.Job.Title != null && user.Job.Title.Trim().Length > 0 ? user.AliasName + " " + user.Job.Title : "N/A") : (user.Name != null && user.Job.Title != null && user.Job.Title.Trim().Length > 0 ? user.Name + " " + user.Job.Title : user.Name);
// Or
binding.Name = showAliasName
? (user.AliasName != null && user.Job.Title != null && user.Job.Title.Trim().Length > 0
// For you, what's the ideal conditional structure in this situation?
// Notes:
// Assume user.Job.Title comes from an outside system that we cannot control the format of (thus requiring the Trim)
binding.Name = showAliasName ? (user.AliasName != null && user.Job.Title != null && user.Job.Title.Trim().Length > 0 ? user.AliasName + " " + user.Job.Title : "N/A") : (user.Name != null && user.Job.Title != null && user.Job.Title.Trim().Length > 0 ? user.Name + " " + user.Job.Title : user.Name);
// Or
binding.Name = showAliasName
? (user.AliasName != null && user.Job.Title != null && user.Job.Title.Trim().Length > 0
Public Class CustomException
Inherits Exception
Public Sub New(ByVal throwFunction As System.Func())
throwFunciton()
End Sub
End Class
new CustomException(Sub() Throw Me)