Skip to content

Instantly share code, notes, and snippets.

View tkarpinski's full-sized avatar

Tod Karpinski tkarpinski

View GitHub Profile
$dontcare = git fetch origin --prune
$branches = git branch -a --merged |
?{$_ -match "remotes\/origin"} |
?{$_ -notmatch "\/master"} |
%{$_.Replace("remotes/origin/", "").Trim() }
if (-not $branches) {
echo "No merged branches detected"
exit 0
}
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
using System;
using System.Text;
using System.Web.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
namespace Website
{
public class JsonNetResult : ActionResult
{
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}