Skip to content

Instantly share code, notes, and snippets.

@csainty
csainty / gist:e15f5cb2fbf74c1e0901
Last active September 7, 2015 07:55 — forked from schacon/gist:942899
delete all remote branches that have already been merged into development
$ git branch -r --merged origin/development |
grep origin |
grep -v '>' |
grep -v 'master$' |
grep -v 'development$' |
xargs -L1 |
cut -d"/" -f2- |
xargs git push origin --delete
@csainty
csainty / gist:6536769
Last active December 22, 2015 21:59 — forked from jchannon/gist:6536653
using (var connection = new SqlConnection(ConfigurationManager.ConnectionStrings["DBConnString"].ConnectionString))
{
var parameters = model.Keywords.Select((keyword, index) => new { Name = "@P" + index, Value = keyword });
var sql = String.Format("SELECT * FROM Table WHERE Id IN ({0})", String.Join(",", parameters.Select(x => x.Name)));
connection.Open();
using (var command = new SqlCommand(sql))
{
foreach (var p in parameters)
{
using System;
using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
using Xunit;
public class Fixture
{
[Fact]
public void Should_FactMethodName()