Skip to content

Instantly share code, notes, and snippets.

git config --global merge.tool p4merge
git config --global mergetool.p4merge.cmd 'p4merge.exe \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"'
git config --global mergetool.tortoisemerge.cmd \""c:/Program Files/TortoiseSVN/bin/TortoiseMerge.exe"\" -base:"$BASE" -theirs:"$REMOTE" -mine:"$LOCAL" -merged:"$MERGED"
In .git/config:
cmd = TortoiseMerge.exe /base:$(cygpath -d \"$BASE\") /theirs:$(cygpath -d \"$REMOTE\") /mine:$(cygpath -d \"$LOCAL\") /merged:$(cygpath -d \"$MERGED\")
MSBUILD.exe /t:Build,Package,Publish /p:Configuration=Debug .\MyProject\MyProject.csproj
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5"
DefaultTargets="compile"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks"/>
<Target Name="createdb">
<ItemGroup>
<SqlFiles Include="$(MSBuildProjectDirectory)\db\**\*.sql" />
@adautoneto
adautoneto / disable_foreign_keys.sql
Created November 29, 2012 04:45
Enabling and Disabling Foreign Keys on SQL Server
--Disable foreign keys on all tables
DECLARE @table_name SYSNAME;
DECLARE @cmd NVARCHAR(MAX);
DECLARE table_cursor CURSOR FOR SELECT name FROM sys.tables;
OPEN table_cursor;
FETCH NEXT FROM table_cursor INTO @table_name;
WHILE @@FETCH_STATUS = 0 BEGIN
SELECT @cmd = 'ALTER TABLE [' + @table_name + '] NOCHECK CONSTRAINT ALL';
public class ErrorController : Controller
{
public ActionResult Index()
{
return View();
}
public ActionResult NotFound(string aspxerrorpath)
{
return RedirectToAction("Index", "Home");
@adautoneto
adautoneto / BusinessLogicInstaller.cs
Created August 8, 2012 21:07 — forked from martinnormark/BusinessLogicInstaller.cs
Castle Windsor IoC Container setup for ASP.NET MVC
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using MyApp.BusinessLogic.Facades;
namespace MyApp.Web.PresentationLogic.Container
{
public class BusinessLogicInstaller : IWindsorInstaller
{
public void Install(IWindsorContainer container, IConfigurationStore store)
@adautoneto
adautoneto / WindsorContainerAdapter.cs
Created July 23, 2012 20:05
Twit: ServiceStack IContainerAdapter for Castle Windsor
internal sealed class WindsorContainerAdapter : IContainerAdapter
{
private readonly IWindsorContainer container;
public WindsorContainerAdapter(IWindsorContainer container)
{
this.container = container;
}
public T TryResolve<T>()
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js'></script>
<script type='text/javascript' src="slides-v2.js"></script>
<style type='text/css'>
.slide { display: none; }
@adautoneto
adautoneto / DataManager.h
Created May 9, 2012 17:40 — forked from AlexNachbaur/DataManager.h
Core Data singleton manager class capable of being run from a static library
// DataManager.h
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
extern NSString * const DataManagerDidSaveNotification;
extern NSString * const DataManagerDidSaveFailedNotification;
@interface DataManager : NSObject {
}