This is a description of how I take care of the animals. Some things have lots of detail, others don’t. Not all of the details are important. The important thing is for the animals to have enough food and water. They’ll let you know if you don’t give them enough.
This file contains hidden or 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.Collections.Generic; | |
| using System.Text.RegularExpressions; | |
| using Microsoft.VisualStudio.TestTools.UnitTesting; | |
| namespace SEP.Extensions.Tests | |
| { | |
| [TestClass] | |
| public class InspectExtensionTests | |
| { |
This file contains hidden or 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
| require 'zlib' | |
| print Zlib::GzipReader.new($<).read |
This file contains hidden or 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
| def printable(c) | |
| c.sub!(/\d/) { |d| "_#{d}" } | |
| { | |
| '/' => '_slash_', | |
| '_' => '_underscore_' | |
| }[c] || c | |
| end | |
| (0..127).each do |n| | |
| c = printable(n.chr) |
This file contains hidden or 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
| require 'albacore' | |
| require 'rexml/document' | |
| # Will submit this as a patch when github starts letting me push again. | |
| module Rake | |
| class MSBuildTask | |
| def define | |
| task name do | |
| fail unless @msbuild.build | |
| end |
This file contains hidden or 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
| @echo off | |
| setlocal | |
| set alias=%1 | |
| set host=%2 | |
| set user=%3 | |
| if "" == "%alias%" goto :help | |
| if "" == "%host%" set host=%alias% | |
| if "" == "%user%" set user=%USERNAME% | |
| rem echo Host: %host% | |
| rem echo User: %user% |
This file contains hidden or 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
| // an alternative to http://gist.github.com/158795 | |
| // note: this version doesn't deal with cycles at all. | |
| private string Inspect(object x) | |
| { | |
| return TryNullInspect(x) | |
| ?? TryInspect<string>(x, s => "\"" + s.Replace("\"", "\\\"")) | |
| ?? TryInspect<DictionaryEntry>(x, e => "{ " + e.Key + " => " + Inspect(e.Value) + " }") | |
| ?? TryInspect<IEnumerable>(x, e => "[ " + String.Join(", ", e.Cast<object>().Select(Inspect).ToArray()) + " ]") | |
| ?? x.ToString(); |
This file contains hidden or 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
| require 'stringio' | |
| require 'open3' | |
| require 'pp' | |
| $ref = 'HEAD' | |
| unless ARGV.size == 2 | |
| puts "Usage: #{$0} <subtree name> <destination branch>" | |
| exit 1 | |
| end |
This file contains hidden or 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
| def report_newlines filename, io | |
| windows_newlines = 0 | |
| unix_newlines = 0 | |
| last_line_is_bare = false | |
| while line = io.gets | |
| last_line_is_bare = false | |
| if line =~ /\r\n$/ | |
| windows_newlines += 1 | |
| elsif line =~ /\n$/ |