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
# Rename an email address in all old commits. | |
# WARNING: Will change all your commit SHA1s. | |
# Based off of the script from here: | |
# http://coffee.geek.nz/how-change-author-git.html | |
git filter-branch -f --commit-filter ' | |
if [ "$GIT_COMMITTER_EMAIL" = "joern.zaefferer@googlemail.com" ]; | |
then | |
GIT_AUTHOR_EMAIL="joern.zaefferer@gmail.com"; | |
GIT_COMMITTER_EMAIL="joern.zaefferer@gmail.com"; | |
git commit-tree "$@"; |
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
using System.Collections.Generic; | |
using MongoDB.Driver; | |
namespace DynoMongo | |
{ | |
public class DynoCollection | |
{ | |
private IMongoCollection _col; | |
public DynoCollection(IMongoCollection col) |
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
C:\installs\trunk3_installed>cd bin | |
C:\installs\trunk3_installed\bin>rake -T | |
C:/installs/trunk3_installed/lib/ruby/1.9.1/rubygems.rb:340:in `bin_path': can't find executable rake for rake-0.8.7 (Gem::Exception) | |
from C:/installs/trunk3_installed/bin/rake:19:in `<main>' | |
C:\installs\trunk3_installed\bin>cd .. | |
C:\installs\trunk3_installed>cat ./lib/ruby/gems/1.9.1/specifications/rake.gemspec | |
Gem::Specification.new do |s| |
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
#!/bin/bash | |
# For recursive operation, I saved the script below to this location: "/usr/local/bin/symtohard". | |
# Any directory in your $PATH will work just fine. After putting it there, make sure to run: | |
# | |
# chmod +x /usr/local/bin/symtohard | |
# | |
# Converts all symbolic links in a directory to hard links. See http://ubuntuforums.org/showthread.php?t=1508728 for any updates/problems. | |
# | |
# Run via cmd below without [] | |
# |
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
using System; | |
using System.Globalization; | |
using System.Web.Mvc; | |
namespace Zomg.Web.ModelBinders | |
{ | |
public class Iso8601DateTimeBinder : DefaultModelBinder | |
{ | |
public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) | |
{ |
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
pik_info() { | |
version= pik info | awk '/full_version/ {print $2,$3}' | sed 's/\"//;s/\s/\-/' | |
printf "${version}" | |
} | |
function prompt { | |
local LIGHT_RED="\[\033[1;31m\]" | |
local LIGHT_GREEN="\[\033[1;32m\]" | |
local NO_COLOUR="\[\033[0m\]" |
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 class DateTimeHelpers | |
{ | |
private static readonly string[] Iso8601Format = new[] | |
{ | |
"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", | |
@"yyyy-MM-dd\THH:mm:ssK" | |
}; | |
//SortableDateTimePattern (ISO 8601) | |
public static string ToIso8601(DateTime 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
#!/bin/bash | |
# https://gist.github.com/949831 | |
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/ | |
# command line OTA distribution references and examples | |
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson | |
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution | |
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/ | |
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html |
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
using System.Web; | |
namespace NetflixDemo | |
{ | |
public class AppHarborHttpContextWrapper : HttpContextWrapper | |
{ | |
private readonly HttpContext httpContext; | |
public AppHarborHttpContextWrapper(HttpContext httpContext) : base(httpContext) | |
{ |
OlderNewer