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
import System.Text.RegularExpressions | |
while true: | |
heads = /changeset:\s+(?<revision>\d+)(.|\n)+?summary:\s+.+\n/.Matches(shell("hg", "heads")) | |
break if len(heads) < 2 | |
for head as Match in heads: | |
continue if /tag:\s+tip/.IsMatch(head.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
elements, separator = argv | |
entries = elements.Split((separator,), System.StringSplitOptions.RemoveEmptyEntries) | |
for e in entries: print e | |
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
import System | |
// http://blog.8thlight.com/uncle-bob/2012/04/20/Why-Is-Estimating-So-Hard.html | |
// estimated to take 5, done in 4 ;) | |
text = """ | |
Four score and seven years ago our fathers brought forth upon this continent a new nation, conceived in liberty and dedicated to the proposition that all men are created equal… | |
""" | |
words = /\s+/.Split(text.Trim()) | |
currentLineLength = 0 |
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 class ObservableServiceClient : IObservableServiceClient | |
{ | |
private readonly string _baseUri; | |
public ObservableServiceClient(string baseUri) | |
{ | |
_baseUri = baseUri; | |
} | |
public IObservable<TResponse> ObserveMany<TResponse>(IReturn<IEnumerable<TResponse>> request) |
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.Collections.Generic; | |
using System.Disposables; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Reflection; | |
using Funq; | |
using ServiceStack.Common.Web; | |
using ServiceStack.Service; |
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
import Boo.Lang.Compiler | |
import Boo.Lang.Compiler.Ast | |
import Boo.Lang.PatternMatching | |
class GenericAttribute(AbstractAstAttribute): | |
_parameters as ArrayLiteralExpression | |
def constructor(parameters as ArrayLiteralExpression): | |
_parameters = parameters |
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
import Livity.Collections | |
import Livity.Composition | |
import Livity.Text.Data | |
import Livity.Text.UI.Commands | |
import Livity.Text.UI.Editor | |
import UnityEngine | |
[Export(IKeyboardModeProvider)] | |
class CustomKeyboardModeProvider(IKeyboardModeProvider): | |
Name: |
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 UnityEditor; | |
public class WindowStateIsLostWhenViewIsMaximized : EditorWindow { | |
[MenuItem("Window/Bugs/Window State Is Lost When View Is Maximized")] | |
static void Open() { | |
EditorWindow.GetWindow<WindowStateIsLostWhenViewIsMaximized>(); | |
} | |
string _state; |
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
namespace Spikes | |
import Boo.Lang.PatternMatching | |
import Boo.Lang.Compiler | |
import Boo.Lang.Compiler.Ast | |
import Boo.Lang.Compiler.MetaProgramming | |
class EnableResponsePatternAttribute(AbstractAstAttribute): | |
override def Apply(node as Node): | |
node.Accept(ResponseTransformer()) |
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 Livity.Collections; | |
using Livity.Composition; | |
using Livity.Text.Logic; | |
using Livity.Text.UI.Engine; | |
using Livity.Text.UI.Engine.Internal; | |
using UnityEngine; | |
namespace Livity.Mine | |
{ | |
[Export(typeof(IColorSchemeProvider))] |