- Move to the dotnet framework path
cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319
- Get the service path
C:\Services\XXXX.exe
- Run command
InstallUtil.exe C:\Services\XXXX.exe
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
// Original code by Joachim Lykke Andersen; http://devtalk.dk/2011/02/16/Workaround+EF+Code+First+On+AppHabour.aspx | |
using System.Data.Entity; | |
using System.Data.Entity.Database; | |
using System.Data.Entity.Design; | |
using System.Data.Entity.Infrastructure; | |
using System.Data.Metadata.Edm; | |
using System.Data.Objects; | |
using System.Globalization; | |
using System.Linq; |
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 class StructureMapJobFactory : IJobFactory | |
{ | |
private static readonly ILog Logger = LogProvider.GetCurrentClassLogger(); | |
private readonly IContainer _container; | |
public StructureMapJobFactory(IContainer container) | |
{ | |
this._container = container; | |
} |
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
[color] | |
branch = auto | |
interactive = auto | |
diff = auto | |
status = auto | |
[user] | |
name = #### | |
email = ###### | |
[remote "origin"] | |
receivepack = git receive-pack |
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 void Info(string message, params object[] args) | |
{ | |
Console.ForegroundColor = ConsoleColor.Cyan; | |
Console.WriteLine(message, args); | |
Console.ResetColor(); | |
} | |
public static void Debug(string message, params object[] args) | |
{ | |
Console.ForegroundColor = ConsoleColor.Yellow; |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
Either copy the aliases from the .gitconfig
or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from GitHub remotes:
git pr 4
- creates local branch pr/4 from theorigin
remote and checks it outgit pr 4 upstream
- creates local branch pr/4 fromupstream
remote and checks it out
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
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); | |
IDictionary<string, string> staticAppSettings = ConfigService.GetStaticAppSettings(); | |
foreach (var setting in staticAppSettings) | |
{ | |
if (ConfigurationManager.AppSettings[setting.Key] == null) | |
config.AppSettings.Settings.Add(setting.Key, setting.Value); | |
else | |
ConfigurationManager.AppSettings[setting.Key] = setting.Value; |
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 class BootstrapService : ServiceControl | |
{ | |
private readonly HostSettings _settings; | |
private Container _container; | |
private CaseMonitor _monitor; | |
public BootstrapService(HostSettings settings) | |
{ | |
_settings = settings; | |
} |
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
DELETE FROM [tableName] WHERE [UniqueId] NOT IN | |
(SELECT Min([UniqueId]) FROM [tableName] GROUP BY [fieldName]) |
OlderNewer