Skip to content

Instantly share code, notes, and snippets.

View rostreim's full-sized avatar

Ron Ostreim rostreim

  • Desert Software
View GitHub Profile
@rostreim
rostreim / .gitconfig
Last active March 27, 2020 18:19
gitconfig aliases I frequently use
[alias]
# lga = log --graph --oneline --all --decorate
# lg = log --graph --all --pretty=format:'%C(bold)%h%Creset -%C(auto)%d%Creset %s %C(green dim)(%cr)%Creset %C(ul)<%an>'
# log adog
lga = log --all --decorate --oneline --graph
# excluded for now (commit subjects only) lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(green)%h%C(reset)%C(auto)%d%C(reset) %C(cyan)<%an>%C(reset) %C(green dim)(%ar)%C(reset)%n %C(white)%s%C(reset)%n' --all
# log adog but with time, author, and full commit body
lg = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(green)%h%C(reset)%C(auto)%d%C(reset) %C(cyan)<%an>%C(reset) %C(green dim)(%ar)%C(reset)%n %C(white)%s%C(reset)%n%C(dim white)%b%C(reset)' --all
# deprecated: lgd = log --graph --abbrev-commit --decorate --format=format:'%C(green)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(res
@rostreim
rostreim / XElementExtensions.cs
Last active October 7, 2015 15:26
XML to dynamic functionality
//
// Copyright 2014, Desert Software Solutions Inc.
// XElementExtensions.cs: https://gist.github.com/rostreim/6fc46cba62effd24d2f6
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@rostreim
rostreim / ServiceKit.cs
Last active October 2, 2015 23:18
Windows ServiceFactory and helper classes in a single file (depends on Gel for logging)
//
// Copyright 2015, Desert Software Solutions Inc.
// ServiceKit.cs: https://gist.github.com/rostreim/47e63f01fbaf8556b847
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@rostreim
rostreim / TableMethod.cs
Last active August 29, 2015 14:15
Database.cs Table method
/// <summary>
/// Returns the result Table of the specified SQL.
/// </summary>
/// <param name="sql">The SQL.</param>
/// <param name="parameters">The parameters.</param>
/// <param name="commandType">Type of the command.</param>
/// <returns></returns>
internal DataTable Table(string sql, dynamic parameters = null, CommandType? commandType = null) {
DataTable table = new DataTable();
@rostreim
rostreim / LogWriter.cs
Last active August 29, 2015 14:04
A text writer implementation that provides a Gel log writer
//
// Copyright 2014, Desert Software Solutions Inc.
// LogWriter.cs: https://gist.github.com/rostreim/9461bb88b097f36b34ce
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@rostreim
rostreim / CommandShellControl.cs
Last active August 29, 2015 13:59
A WinForm Console Shell Control
//
// Copyright 2014, Desert Software Solutions Inc.
// CommandShellControl.cs: https://gist.github.com/rostreim/10558496
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@rostreim
rostreim / Database.cs
Last active August 29, 2015 13:57
Data Helpers
//
// Copyright 2013, Desert Software Solutions Inc.
// Database.cs: https://gist.github.com/rostreim/9453953
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
@rostreim
rostreim / MultiStreamWriter.cs
Last active November 20, 2024 21:20
A text writer implementation that supports writing to multiple writers in one operation
//
// Copyright 2014, Desert Software Solutions Inc.
// MultiStreamWriter.cs: https://gist.github.com/rostreim/9441193
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//