Skip to content

Instantly share code, notes, and snippets.

@mwjackson
mwjackson / .gitconfig
Created October 19, 2011 11:14
p4merge with git (msysgit)
[diff]
tool = p4merge
[difftool "p4merge"]
path = C:/Program Files/Perforce/p4merge.exe
[merge]
summary = true
tool = p4merge
[mergetool "p4merge"]
path = C:/Program Files/Perforce/p4merge.exe
keepBackup = false
@jmarnold
jmarnold / IntegrationTestExample.cs
Created February 2, 2013 15:48
Sample integration testing
[TestFixture]
public class IntegrationTestExample
{
// You'll want the FubuMVC.Katana package for this
private EmbeddedFubuMvcServer theServer;
[SetUp]
public void SetUp()
{
theServer = new MyApplication().RunEmbedded();
@stevenkuhn
stevenkuhn / gist:5062660
Last active March 7, 2023 16:03
This PowerShell script generates release notes for Octopus Deploy that contain the GitHub commits and JIRA issues from the current build to the latest production release. It will also create the Octopus release based on the TeamCity build number.
#
# Assumptions
#
# 1. If you have a Octopus release deployed, say 1.0.0.73, there is a git
# tag set for that commit in GitHub that is "v1.0.0.73".
#
# 2. You have TeamCity label each successful build in GitHub with the format
# "v{build number}. Sidenote: it appears that TeamCity only labels the
# default branch, but not feature branches.
#
@ceejbot
ceejbot / stashwoes.md
Last active March 14, 2019 02:57
A summary of things I miss about Github when I use Stash.

What I miss about github

See this Cloudup stream for visual references.

The short answer is that I miss everything. There is no comparing the two projects. Stash's feature set is a shadow of Github's.

What a project looks like on Github:

What a project looks like on Github

@darrelmiller
darrelmiller / gist:8548166
Created January 21, 2014 20:54
How to tell Web API 2.1 to allow errors to propagate up the MessageHandler pipeline so all exceptions can be converted to HttpResponseMessages in one place.
class Program
{
static void Main(string[] args)
{
var server = WebApp.Start("http://localhost:1002/", (app) =>
{
var config = new HttpConfiguration();
config.MapHttpAttributeRoutes();
config.Services.Replace(typeof(IExceptionHandler), new RethrowExceptionHandler());
@bitemyapp
bitemyapp / gist:8739525
Last active May 7, 2021 23:22
Learning Haskell
@liquidgecka
liquidgecka / cron_helper.sh
Last active September 28, 2023 15:35
Cron helper
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
//This is for your web api controllers.
public class HttpControllerActivator : IHttpControllerActivator
{
private readonly IContainer _container;
public HttpControllerActivator(IContainer container)
{
_container = container;
}
using System;
using System.Diagnostics;
using System.Numerics;
#if NETCOREAPP2_1_OR_GREATER
using System.Buffers.Binary;
#endif
#nullable enable